From d3664957b1c365e9d1c6e1cbd50590cfbd71cc52 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 4 Jun 2015 11:15:51 -0700 Subject: [PATCH] replace v1beta3 with v1 in e2e tests --- test/e2e/cadvisor.go | 2 +- test/e2e/downward_api.go | 4 ++-- test/e2e/monitoring.go | 2 +- test/e2e/util.go | 6 +++--- test/e2e/volumes.go | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/e2e/cadvisor.go b/test/e2e/cadvisor.go index 69de64560a7..1f471c4181f 100644 --- a/test/e2e/cadvisor.go +++ b/test/e2e/cadvisor.go @@ -58,7 +58,7 @@ func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration) { for _, node := range nodeList.Items { // cadvisor is not accessible directly unless its port (4194 by default) is exposed. // Here, we access '/stats/' REST endpoint on the kubelet which polls cadvisor internally. - statsResource := fmt.Sprintf("api/v1beta3/proxy/nodes/%s/stats/", node.Name) + statsResource := fmt.Sprintf("api/v1/proxy/nodes/%s/stats/", node.Name) By(fmt.Sprintf("Querying stats from node %s using url %s", node.Name, statsResource)) _, err = c.Get().AbsPath(statsResource).Timeout(timeout).Do().Raw() if err != nil { diff --git a/test/e2e/downward_api.go b/test/e2e/downward_api.go index 86098feb1d4..15be7a95a89 100644 --- a/test/e2e/downward_api.go +++ b/test/e2e/downward_api.go @@ -67,7 +67,7 @@ var _ = Describe("Downward API", func() { Name: "POD_NAME", ValueFrom: &api.EnvVarSource{ FieldRef: &api.ObjectFieldSelector{ - APIVersion: "v1beta3", + APIVersion: "v1", FieldPath: "metadata.name", }, }, @@ -76,7 +76,7 @@ var _ = Describe("Downward API", func() { Name: "POD_NAMESPACE", ValueFrom: &api.EnvVarSource{ FieldRef: &api.ObjectFieldSelector{ - APIVersion: "v1beta3", + APIVersion: "v1", FieldPath: "metadata.namespace", }, }, diff --git a/test/e2e/monitoring.go b/test/e2e/monitoring.go index b48b210ba94..6fd2880ccb1 100644 --- a/test/e2e/monitoring.go +++ b/test/e2e/monitoring.go @@ -208,7 +208,7 @@ func testMonitoringUsingHeapsterInfluxdb(c *client.Client) { if !ok { Failf("failed to get master http client") } - proxyUrl := fmt.Sprintf("%s/api/v1beta3/proxy/namespaces/default/services/%s:api/", getMasterHost(), influxdbService) + proxyUrl := fmt.Sprintf("%s/api/v1/proxy/namespaces/default/services/%s:api/", getMasterHost(), influxdbService) config := &influxdb.ClientConfig{ Host: proxyUrl, // TODO(vishh): Infer username and pw from the Pod spec. diff --git a/test/e2e/util.go b/test/e2e/util.go index bcf870fa320..e9d6db1acad 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -501,7 +501,7 @@ func validateController(c *client.Client, containerImage string, replicas int, c By(fmt.Sprintf("waiting for all containers in %s pods to come up.", testname)) //testname should be selector for start := time.Now(); time.Since(start) < podStartTimeout; time.Sleep(5 * time.Second) { - getPodsOutput := runKubectl("get", "pods", "-o", "template", getPodsTemplate, "--api-version=v1beta3", "-l", testname, fmt.Sprintf("--namespace=%v", ns)) + getPodsOutput := runKubectl("get", "pods", "-o", "template", getPodsTemplate, "--api-version=v1", "-l", testname, fmt.Sprintf("--namespace=%v", ns)) pods := strings.Fields(getPodsOutput) if numPods := len(pods); numPods != replicas { By(fmt.Sprintf("Replicas for %s: expected=%d actual=%d", testname, replicas, numPods)) @@ -509,13 +509,13 @@ func validateController(c *client.Client, containerImage string, replicas int, c } var runningPods []string for _, podID := range pods { - running := runKubectl("get", "pods", podID, "-o", "template", getContainerStateTemplate, "--api-version=v1beta3", fmt.Sprintf("--namespace=%v", ns)) + running := runKubectl("get", "pods", podID, "-o", "template", getContainerStateTemplate, "--api-version=v1", fmt.Sprintf("--namespace=%v", ns)) if running != "true" { Logf("%s is created but not running", podID) continue } - currentImage := runKubectl("get", "pods", podID, "-o", "template", getImageTemplate, "--api-version=v1beta3", fmt.Sprintf("--namespace=%v", ns)) + currentImage := runKubectl("get", "pods", podID, "-o", "template", getImageTemplate, "--api-version=v1", fmt.Sprintf("--namespace=%v", ns)) if currentImage != containerImage { Logf("%s is created but running wrong image; expected: %s, actual: %s", podID, containerImage, currentImage) continue diff --git a/test/e2e/volumes.go b/test/e2e/volumes.go index 29e5f69f70e..11ce059ee91 100644 --- a/test/e2e/volumes.go +++ b/test/e2e/volumes.go @@ -79,7 +79,7 @@ func startVolumeServer(client *client.Client, config VolumeTestConfig) *api.Pod serverPod := &api.Pod{ TypeMeta: api.TypeMeta{ Kind: "Pod", - APIVersion: "v1beta3", + APIVersion: "v1", }, ObjectMeta: api.ObjectMeta{ Name: config.prefix + "-server", @@ -137,7 +137,7 @@ func testVolumeClient(client *client.Client, config VolumeTestConfig, volume api clientPod := &api.Pod{ TypeMeta: api.TypeMeta{ Kind: "Pod", - APIVersion: "v1beta3", + APIVersion: "v1", }, ObjectMeta: api.ObjectMeta{ Name: config.prefix + "-client", @@ -282,7 +282,7 @@ var _ = Describe("Volumes", func() { endpoints := api.Endpoints{ TypeMeta: api.TypeMeta{ Kind: "Endpoints", - APIVersion: "v1beta3", + APIVersion: "v1", }, ObjectMeta: api.ObjectMeta{ Name: config.prefix + "-server",