From bab89e95cee2a14b981cc9ddecc21db67a35019a Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Fri, 19 Feb 2016 13:09:12 -0800 Subject: [PATCH] Fix jobs integration test. --- test/integration/master_test.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test/integration/master_test.go b/test/integration/master_test.go index 0fd68feaf85..1a19d0b2b61 100644 --- a/test/integration/master_test.go +++ b/test/integration/master_test.go @@ -245,6 +245,16 @@ var jobV1 string = ` } ` +var deleteResp string = ` +{ + "kind": "Status", + "apiVersion": "v1", + "metadata":{}, + "status":"Success", + "code":200 +} +` + // TestBatchGroupBackwardCompatibility is testing that batch/v1 and ext/v1beta1 // Job share storage. This test can be deleted when Jobs is removed from ext/v1beta1, // (expected to happen in 1.4). @@ -262,12 +272,14 @@ func TestBatchGroupBackwardCompatibility(t *testing.T) { }{ // Post a v1 and get back both as v1beta1 and as v1. {"POST", batchPath("jobs", api.NamespaceDefault, ""), jobV1, code201, ""}, - {"GET", batchPath("jobs", api.NamespaceDefault, ""), "", code200, testapi.Batch.GroupVersion().String()}, - {"GET", extensionsPath("jobs", api.NamespaceDefault, ""), "", code200, testapi.Extensions.GroupVersion().String()}, + {"GET", batchPath("jobs", api.NamespaceDefault, "pi"), "", code200, testapi.Batch.GroupVersion().String()}, + {"GET", extensionsPath("jobs", api.NamespaceDefault, "pi"), "", code200, testapi.Extensions.GroupVersion().String()}, + {"DELETE", batchPath("jobs", api.NamespaceDefault, "pi"), "", code200, testapi.Default.GroupVersion().String()}, // status response // Post a v1beta1 and get back both as v1beta1 and as v1. {"POST", extensionsPath("jobs", api.NamespaceDefault, ""), jobV1beta1, code201, ""}, - {"GET", batchPath("jobs", api.NamespaceDefault, ""), "", code200, testapi.Batch.GroupVersion().String()}, - {"GET", extensionsPath("jobs", api.NamespaceDefault, ""), "", code200, testapi.Extensions.GroupVersion().String()}, + {"GET", batchPath("jobs", api.NamespaceDefault, "pi"), "", code200, testapi.Batch.GroupVersion().String()}, + {"GET", extensionsPath("jobs", api.NamespaceDefault, "pi"), "", code200, testapi.Extensions.GroupVersion().String()}, + {"DELETE", extensionsPath("jobs", api.NamespaceDefault, "pi"), "", code200, testapi.Default.GroupVersion().String()}, //status response } for _, r := range requests {