service/test: Improve TypesCommand filter assetion

This commit is contained in:
Derek Parker 2016-02-27 15:50:37 -08:00
parent c8f4cee97d
commit b3c1ca5384

@ -1108,10 +1108,10 @@ func TestTypesCommand(t *testing.T) {
t.Fatal("Type astruct not found in ListTypes output")
}
types, err = c.ListTypes("main.astruct")
types, err = c.ListTypes("^main.astruct$")
assertNoError(err, t, "ListTypes(\"main.astruct\")")
if len(types) <= 0 {
t.Fatal("ListTypes(\"main.astruct\") did not return anything")
if len(types) != 1 {
t.Fatalf("ListTypes(\"^main.astruct$\") did not filter properly, expected 1 got %d: %v", len(types), types)
}
})
}