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

@@ -243,7 +243,7 @@ func TestCreateController(t *testing.T) {
PodTemplate: validPodTemplate,
},
}
ctx := api.NewContext()
ctx := api.NewDefaultContext()
channel, err := storage.Create(ctx, controller)
if err != nil {
t.Fatalf("Unexpected error: %v", err)
@@ -279,8 +279,8 @@ func TestControllerStorageValidatesCreate(t *testing.T) {
DesiredState: api.ReplicationControllerState{},
},
}
ctx := api.NewDefaultContext()
for _, failureCase := range failureCases {
ctx := api.NewContext()
c, err := storage.Create(ctx, &failureCase)
if c != nil {
t.Errorf("Expected nil channel")
@@ -310,8 +310,8 @@ func TestControllerStorageValidatesUpdate(t *testing.T) {
DesiredState: api.ReplicationControllerState{},
},
}
ctx := api.NewDefaultContext()
for _, failureCase := range failureCases {
ctx := api.NewContext()
c, err := storage.Update(ctx, &failureCase)
if c != nil {
t.Errorf("Expected nil channel")