Update test cases to use default context

This commit is contained in:
derekwaynecarr
2014-09-29 17:18:18 -04:00
parent e4ec49ee6b
commit 0312d80ffa
5 changed files with 64 additions and 41 deletions

View File

@@ -46,6 +46,10 @@ func TestValidNamespaceOnCreateOrUpdate(t *testing.T) {
}
resource = api.ReplicationController{JSONBase: api.JSONBase{Namespace: "other"}}
if api.ValidNamespaceOnCreateOrUpdate(ctx, &resource.JSONBase) {
t.Errorf("Expected error that resource and context errors do not match")
t.Errorf("Expected error that resource and context errors do not match because resource has different namespace")
}
ctx = api.NewContext()
if api.ValidNamespaceOnCreateOrUpdate(ctx, &resource.JSONBase) {
t.Errorf("Expected error that resource and context errors do not match since context has no namespace")
}
}