Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
agent: assign fake unit hash for each case in TestDefaultPublisher
Browse files Browse the repository at this point in the history
Now that nil UnitHash is not allowed, we need to set a fake unit hash
string to each test case in TestDefaultPublisher to avoid test failures.
  • Loading branch information
Dongsu Park committed Jul 16, 2016
1 parent 8a3ed4f commit 8149e9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/unit_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,15 @@ func TestDefaultPublisher(t *testing.T) {
UnitName: "foo.service",
ActiveState: "active",
MachineID: "xyz",
UnitHash: "quickbrownfox",
},
nil,
[]*unit.UnitState{
&unit.UnitState{
UnitName: "foo.service",
ActiveState: "active",
MachineID: "xyz",
UnitHash: "quickbrownfox",
},
},
},
Expand All @@ -243,6 +245,7 @@ func TestDefaultPublisher(t *testing.T) {
&unit.UnitState{
UnitName: "foo.service",
ActiveState: "active",
UnitHash: "quickbrownfox",
},
nil,
[]*unit.UnitState{},
Expand All @@ -255,6 +258,7 @@ func TestDefaultPublisher(t *testing.T) {
unit.UnitState{
UnitName: "foo.service",
ActiveState: "active",
UnitHash: "quickbrownfox",
},
},
[]*unit.UnitState{},
Expand Down

0 comments on commit 8149e9b

Please sign in to comment.