cleanup test code in lifecycle, servicecatalog and ui package
This commit is contained in:
@@ -28,12 +28,12 @@ import (
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
"k8s.io/kubernetes/test/e2e/common"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
|
||||
|
||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||
)
|
||||
|
||||
func addMasterReplica(zone string) error {
|
||||
e2elog.Logf(fmt.Sprintf("Adding a new master replica, zone: %s", zone))
|
||||
framework.Logf(fmt.Sprintf("Adding a new master replica, zone: %s", zone))
|
||||
_, _, err := framework.RunCmd(path.Join(framework.TestContext.RepoRoot, "hack/e2e-internal/e2e-grow-cluster.sh"), zone, "true", "true", "false")
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -42,7 +42,7 @@ func addMasterReplica(zone string) error {
|
||||
}
|
||||
|
||||
func removeMasterReplica(zone string) error {
|
||||
e2elog.Logf(fmt.Sprintf("Removing an existing master replica, zone: %s", zone))
|
||||
framework.Logf(fmt.Sprintf("Removing an existing master replica, zone: %s", zone))
|
||||
_, _, err := framework.RunCmd(path.Join(framework.TestContext.RepoRoot, "hack/e2e-internal/e2e-shrink-cluster.sh"), zone, "true", "false", "false")
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -51,7 +51,7 @@ func removeMasterReplica(zone string) error {
|
||||
}
|
||||
|
||||
func addWorkerNodes(zone string) error {
|
||||
e2elog.Logf(fmt.Sprintf("Adding worker nodes, zone: %s", zone))
|
||||
framework.Logf(fmt.Sprintf("Adding worker nodes, zone: %s", zone))
|
||||
_, _, err := framework.RunCmd(path.Join(framework.TestContext.RepoRoot, "hack/e2e-internal/e2e-grow-cluster.sh"), zone, "true", "false", "true")
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -60,7 +60,7 @@ func addWorkerNodes(zone string) error {
|
||||
}
|
||||
|
||||
func removeWorkerNodes(zone string) error {
|
||||
e2elog.Logf(fmt.Sprintf("Removing worker nodes, zone: %s", zone))
|
||||
framework.Logf(fmt.Sprintf("Removing worker nodes, zone: %s", zone))
|
||||
_, _, err := framework.RunCmd(path.Join(framework.TestContext.RepoRoot, "hack/e2e-internal/e2e-shrink-cluster.sh"), zone, "true", "true", "true")
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -83,7 +83,7 @@ func findRegionForZone(zone string) string {
|
||||
region, err := exec.Command("gcloud", "compute", "zones", "list", zone, "--quiet", "--format=csv[no-heading](region)").Output()
|
||||
framework.ExpectNoError(err)
|
||||
if string(region) == "" {
|
||||
e2elog.Failf("Region not found; zone: %s", zone)
|
||||
framework.Failf("Region not found; zone: %s", zone)
|
||||
}
|
||||
return string(region)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user