mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Updating components to use v1beta3
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
@@ -140,6 +141,7 @@ func waitForGuestbookResponse(c *client.Client, cmd, arg, expectedResponse strin
|
||||
func makeRequestToGuestbook(c *client.Client, cmd, value string) (string, error) {
|
||||
result, err := c.Get().
|
||||
Prefix("proxy").
|
||||
Namespace(api.NamespaceDefault).
|
||||
Resource("services").
|
||||
Name("frontend").
|
||||
Suffix("/index.php").
|
||||
@@ -165,6 +167,7 @@ func getUDData(jpgExpected string) func(*client.Client, string) error {
|
||||
Logf("validating pod %s", podID)
|
||||
body, err := c.Get().
|
||||
Prefix("proxy").
|
||||
Namespace(api.NamespaceDefault).
|
||||
Resource("pods").
|
||||
Name(podID).
|
||||
Suffix("data.json").
|
||||
|
@@ -165,6 +165,7 @@ func ServeImageOrFail(c *client.Client, test string, image string) {
|
||||
for i, pod := range pods.Items {
|
||||
body, err := c.Get().
|
||||
Prefix("proxy").
|
||||
Namespace(api.NamespaceDefault).
|
||||
Resource("pods").
|
||||
Name(string(pod.Name)).
|
||||
Do().
|
||||
|
@@ -166,7 +166,6 @@ var _ = Describe("Services", func() {
|
||||
It("should provide RW and RO services", func() {
|
||||
svc := api.ServiceList{}
|
||||
err := c.Get().
|
||||
Namespace(api.NamespaceDefault).
|
||||
AbsPath("/api/v1beta1/proxy/services/kubernetes-ro/api/v1beta1/services").
|
||||
Do().
|
||||
Into(&svc)
|
||||
|
@@ -231,7 +231,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, "-l", testname)
|
||||
getPodsOutput := runKubectl("get", "pods", "-o", "template", getPodsTemplate, "--api-version=v1beta1", "-l", testname)
|
||||
pods := strings.Fields(getPodsOutput)
|
||||
if numPods := len(pods); numPods != replicas {
|
||||
By(fmt.Sprintf("Replicas for %s: expected=%d actual=%d", testname, replicas, numPods))
|
||||
@@ -239,13 +239,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)
|
||||
running := runKubectl("get", "pods", podID, "-o", "template", getContainerStateTemplate, "--api-version=v1beta1")
|
||||
if running == "false" {
|
||||
Logf("%s is created but not running", podID)
|
||||
continue
|
||||
}
|
||||
|
||||
currentImage := runKubectl("get", "pods", podID, "-o", "template", getImageTemplate)
|
||||
currentImage := runKubectl("get", "pods", podID, "-o", "template", getImageTemplate, "--api-version=v1beta1")
|
||||
if currentImage != containerImage {
|
||||
Logf("%s is created but running wrong image; expected: %s, actual: %s", podID, containerImage, currentImage)
|
||||
continue
|
||||
@@ -345,7 +345,7 @@ func testContainerOutputInNamespace(ns, scenarioName string, c *client.Client, p
|
||||
for time.Now().Sub(start) < (60 * time.Second) {
|
||||
logs, err = c.Get().
|
||||
Prefix("proxy").
|
||||
Resource("minions").
|
||||
Resource("nodes").
|
||||
Name(podStatus.Spec.Host).
|
||||
Suffix("containerLogs", ns, podStatus.Name, containerName).
|
||||
Do().
|
||||
|
Reference in New Issue
Block a user