1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

Move kind setup to e2e script

This moves the kind setup (previously used by Travis) to the e2e runner script
to accomodate the switch to Prow. This provides a KIND_E2E env var to specify
whether to run the tests in kind, or (by default) to run locally).
This commit is contained in:
Mike Dame
2020-07-13 13:17:30 -04:00
parent 05c69ee26a
commit f5e9f07321
2 changed files with 20 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ package e2e
import (
"context"
"math"
"os"
"testing"
"time"
@@ -144,10 +145,11 @@ func TestE2E(t *testing.T) {
// If we have reached here, it means cluster would have been already setup and the kubeconfig file should
// be in /tmp directory as admin.conf.
ctx := context.Background()
clientSet, err := client.CreateClient("/tmp/admin.conf")
clientSet, err := client.CreateClient(os.Getenv("KUBECONFIG"))
if err != nil {
t.Errorf("Error during client creation with %v", err)
}
nodeList, err := clientSet.CoreV1().Nodes().List(ctx, metav1.ListOptions{})
if err != nil {
t.Errorf("Error listing node with %v", err)
@@ -194,7 +196,7 @@ func TestE2E(t *testing.T) {
func TestDeschedulingInterval(t *testing.T) {
ctx := context.Background()
clientSet, err := client.CreateClient("/tmp/admin.conf")
clientSet, err := client.CreateClient(os.Getenv("KUBECONFIG"))
if err != nil {
t.Errorf("Error during client creation with %v", err)
}