Update scheduler tests

This commit is contained in:
Wojciech Tyczyński
2022-05-20 13:55:51 +02:00
parent 61b983a66b
commit c802118e81
5 changed files with 34 additions and 48 deletions

View File

@@ -22,6 +22,7 @@ import (
"net/http"
"os"
"path"
"strings"
"testing"
"time"
@@ -59,7 +60,7 @@ type TearDownFunc func()
// StartTestServer runs a kube-apiserver, optionally calling out to the setup.ModifyServerRunOptions and setup.ModifyServerConfig functions
func StartTestServer(t *testing.T, setup TestServerSetup) (client.Interface, *rest.Config, TearDownFunc) {
certDir, err := os.MkdirTemp("", "test-integration-"+t.Name())
certDir, err := os.MkdirTemp("", "test-integration-"+strings.ReplaceAll(t.Name(), "/", "_"))
if err != nil {
t.Fatalf("Couldn't create temp dir: %v", err)
}