Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
irenarindos committed Jan 22, 2025
1 parent fb28d47 commit 19a594d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/daemon/cluster/handlers/worker_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,7 @@ func TestRoutingInfo(t *testing.T) {
"tag1": []string{"value1"},
"tag2": []string{"value2"},
}
assert.Equal(t, len(expTags), len(w1.ConfigTags))
for k, v := range expTags {
assert.ElementsMatch(t, v, w1.ConfigTags[k])
}
Expand All @@ -1342,6 +1343,7 @@ func TestRoutingInfo(t *testing.T) {
require.NoError(t, err)

assert.Equal(t, w1.Address, "2.3.4.5:8080")
assert.Equal(t, len(expTags), len(w1.ConfigTags))
for k, v := range expTags {
assert.ElementsMatch(t, v, w1.ConfigTags[k])
}
Expand Down Expand Up @@ -1385,6 +1387,7 @@ func TestRoutingInfo(t *testing.T) {
"tag1": []string{"value1"},
"tag2": []string{"value2"},
}
assert.Equal(t, len(expTags), len(w3.ConfigTags))
for k, v := range expTags {
assert.ElementsMatch(t, v, w3.ConfigTags[k])
}
Expand All @@ -1407,6 +1410,7 @@ func TestRoutingInfo(t *testing.T) {
require.NoError(t, err)

assert.Equal(t, w3.Address, "2.3.4.5:8080")
assert.Equal(t, len(expTags), len(w3.ConfigTags))
for k, v := range expTags {
assert.ElementsMatch(t, v, w3.ConfigTags[k])
}
Expand Down
1 change: 1 addition & 0 deletions internal/server/repository_worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ func TestLookupWorker(t *testing.T) {
assert.Equal(t, server.Tags(map[string][]string{
"key": {"val"},
}), got.CanonicalTags())
assert.Equal(t, len(got.CanonicalTags()), len(got.ConfigTags))
for k, v := range got.CanonicalTags() {
assert.ElementsMatch(t, v, got.ConfigTags[k])
}
Expand Down
1 change: 1 addition & 0 deletions internal/server/worker_tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func TestConvertToTags(t *testing.T) {
}
tags := convertToTags(tagsSlice)

assert.Equal(t, len(tags), len(wantTags))
for k, v := range tags {
assert.ElementsMatch(t, v, wantTags[k])
}
Expand Down

0 comments on commit 19a594d

Please sign in to comment.