fix: baremetal mismatch with empty Guid

This commit is contained in:
Qiu Jian
2022-01-22 18:50:58 +08:00
parent 81994613a2
commit eb3447e97a
6 changed files with 67 additions and 52 deletions

View File

@@ -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)
}
}
}