-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added more endtoend tests Signed-off-by: anishakj <[email protected]> * Fixed formatting errors Signed-off-by: anishakj <[email protected]> * Fixed secret creation Signed-off-by: anishakj <[email protected]> * Added pull secrets Signed-off-by: anishakj <[email protected]>
- Loading branch information
Showing
7 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,7 @@ jobs: | |
sudo kubectl cluster-info | ||
echo "cluster info" | ||
sudo kubectl -n kube-system get pod -o wide | ||
sudo kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username="testanisha" --docker-password="123456789" [email protected] | ||
- name: E2E | ||
run: sudo make test-e2e | ||
publish: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/** | ||
* Copyright (c) 2018 Dell Inc., or its subsidiaries. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
|
||
package e2e | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/gomega" | ||
framework "github.com/operator-framework/operator-sdk/pkg/test" | ||
zk_e2eutil "github.com/pravega/zookeeper-operator/pkg/test/e2e/e2eutil" | ||
v1 "k8s.io/api/core/v1" | ||
) | ||
|
||
// Test create and recreate a Zookeeper cluster with the same name | ||
func testImagePullSecret(t *testing.T) { | ||
g := NewGomegaWithT(t) | ||
|
||
doCleanup := true | ||
ctx := framework.NewTestCtx(t) | ||
defer func() { | ||
if doCleanup { | ||
ctx.Cleanup() | ||
} | ||
}() | ||
|
||
namespace, err := ctx.GetNamespace() | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
f := framework.Global | ||
|
||
defaultCluster := zk_e2eutil.NewDefaultCluster(namespace) | ||
|
||
defaultCluster.WithDefaults() | ||
defaultCluster.Status.Init() | ||
defaultCluster.Spec.Persistence.VolumeReclaimPolicy = "Delete" | ||
defaultCluster.Spec.Image.Repository = "testanisha/zookeeper" | ||
defaultCluster.Spec.Image.Tag = "checksecret_1" | ||
defaultCluster.Spec.Pod.ImagePullSecrets = []v1.LocalObjectReference{ | ||
{ | ||
Name: "regcred", | ||
}, | ||
} | ||
zk, err := zk_e2eutil.CreateCluster(t, f, ctx, defaultCluster) | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
|
||
// A default Zookeeper cluster should have 3 replicas | ||
podSize := 3 | ||
err = zk_e2eutil.WaitForClusterToBecomeReady(t, f, ctx, zk, podSize) | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
|
||
err = zk_e2eutil.CheckAdminService(t, f, ctx, zk) | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
|
||
err = zk_e2eutil.DeleteCluster(t, f, ctx, zk) | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
|
||
err = zk_e2eutil.WaitForClusterToTerminate(t, f, ctx, zk) | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters