fix: baremetal mismatch with empty Guid

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

View File

@@ -191,3 +191,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)
}
}
}