Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Fix comment of tests in sync_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ordovicia authored and hiddeco committed May 25, 2020
1 parent 2424eb6 commit ee13093
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/daemon/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ func TestDoSync_WithNewCommit(t *testing.T) {
t.Errorf("Sync was called with a nil syncDef")
}

// The emitted event has no workload ids
// An event is emitted and it only has a changed workload id
es, err := events.AllEvents(time.Time{}, -1, time.Time{})
if err != nil {
t.Error(err)
Expand All @@ -387,7 +387,6 @@ func TestDoSync_WithNewCommit(t *testing.T) {
} else {
gotResourceIDs := es[0].ServiceIDs
resource.IDs(gotResourceIDs).Sort()
// Event should only have changed workload ids
if !reflect.DeepEqual(gotResourceIDs, []resource.ID{resource.MustParseID("default:deployment/helloworld")}) {
t.Errorf("Unexpected event workload ids: %#v, expected: %#v", gotResourceIDs, []resource.ID{resource.MustParseID("default:deployment/helloworld")})
}
Expand Down Expand Up @@ -493,7 +492,7 @@ func TestDoSync_WithKustomize(t *testing.T) {
t.Errorf("Sync was called with a nil syncDef")
}

// The emitted event has no workload ids
// An event is emitted and it only has a changed workload id
es, err := events.AllEvents(time.Time{}, -1, time.Time{})
if err != nil {
t.Error(err)
Expand All @@ -504,7 +503,6 @@ func TestDoSync_WithKustomize(t *testing.T) {
} else {
gotResourceIDs := es[0].ServiceIDs
resource.IDs(gotResourceIDs).Sort()
// Event should only have changed workload ids
if !reflect.DeepEqual(gotResourceIDs, []resource.ID{resource.MustParseID("default:namespace/foo")}) {
t.Errorf("Unexpected event workload ids: %#v, expected: %#v", gotResourceIDs, []resource.ID{resource.MustParseID("default:namespace/foo")})
}
Expand Down

0 comments on commit ee13093

Please sign in to comment.