Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 093b693

Browse files
committed
e2e: actually randomize the namespace name.
Also fix some log messages.
1 parent 8f74fd5 commit 093b693

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

e2e/main_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ var (
2121
client kubernetes.Interface
2222
sshClient *SSHClient
2323
expectedMasters int // hint for tests to figure out how to fail or block on resources missing
24-
namespace = fmt.Sprintf("bootkube-e2e-%x", rand.Int31())
24+
namespace string
2525
)
2626

27+
func init() {
28+
rand.Seed(time.Now().UTC().UnixNano())
29+
namespace = fmt.Sprintf("bootkube-e2e-%x", rand.Int31())
30+
}
31+
2732
// TestMain handles setup before all tests
2833
func TestMain(m *testing.M) {
2934
var kubeconfig = flag.String("kubeconfig", "../hack/quickstart/cluster/auth/kubeconfig", "absolute path to the kubeconfig file")

e2e/network_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func TestNetwork(t *testing.T) {
3131
// if absent skip this test
3232
if _, err := client.ExtensionsV1beta1().DaemonSets("kube-system").Get("kube-calico", metav1.GetOptions{}); err != nil {
3333
if apierrors.IsNotFound(err) {
34-
t.Skip("skipping as kube-calico daemonset is not installed")
34+
t.Skip("kube-calico daemonset is not installed")
3535
}
36-
t.Fatalf("error getting kube-calio daemonset: %v", err)
36+
t.Fatalf("error getting kube-calico daemonset: %v", err)
3737
}
3838

3939
var nginx *testworkload.Nginx

0 commit comments

Comments
 (0)