mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-22 16:07:34 +00:00
fix: order error in the tests
This commit is contained in:
parent
8061abe279
commit
3d302441b6
@ -670,6 +670,7 @@ func getTags(
|
||||
owners, err := expandTagOwners(aclPolicy, tag, stripEmailDomain)
|
||||
if errors.Is(err, errInvalidTag) {
|
||||
invalidTagMap[tag] = true
|
||||
continue
|
||||
}
|
||||
var found bool
|
||||
for _, owner := range owners {
|
||||
|
@ -385,11 +385,17 @@ func Test_getTags(t *testing.T) {
|
||||
test.args.machine,
|
||||
test.args.stripEmailDomain,
|
||||
)
|
||||
if !reflect.DeepEqual(gotValid, test.wantValid) {
|
||||
t.Errorf("getTags() = %v, want %v", gotValid, test.wantValid)
|
||||
for _, valid := range gotValid {
|
||||
if !contains(test.wantValid, valid) {
|
||||
t.Errorf("valids: getTags() = %v, want %v", gotValid, test.wantValid)
|
||||
break
|
||||
}
|
||||
}
|
||||
if !reflect.DeepEqual(gotInvalid, test.wantInvalid) {
|
||||
t.Errorf("getTags() = %v, want %v", gotInvalid, test.wantInvalid)
|
||||
for _, invalid := range gotInvalid {
|
||||
if !contains(test.wantInvalid, invalid) {
|
||||
t.Errorf("invalids: getTags() = %v, want %v", gotInvalid, test.wantInvalid)
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user