mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-30 12:31:17 +08:00
fix: baremetal mismatch with empty Guid
This commit is contained in:
@@ -237,3 +237,23 @@ func TestRoleName(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestFilterEmpty(t *testing.T) {
|
||||
cases := []struct {
|
||||
input []string
|
||||
want []string
|
||||
}{
|
||||
{
|
||||
input: []string{
|
||||
"",
|
||||
},
|
||||
want: []string{},
|
||||
},
|
||||
}
|
||||
for _, c := range cases {
|
||||
got := FilterEmpty(c.input)
|
||||
if !reflect.DeepEqual(got, c.want) {
|
||||
t.Errorf("want: %#v got: %#v", c.want, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user