Move to operator-sdk v.0.17.0

This commit is contained in:
Akram Ben Aissi
2020-05-04 18:57:14 +02:00
parent 6b96d2dd94
commit 92292ae698
7 changed files with 190 additions and 24 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ func TestLintHelmChart(t *testing.T) {
func TestDeployHelmChart(t *testing.T) {
// Given
t.Parallel()
ctx := framework.NewTestCtx(t)
ctx := framework.NewContext(t)
defer ctx.Cleanup()
namespace, err := ctx.GetNamespace()
+3 -3
View File
@@ -28,8 +28,8 @@ func TestMain(m *testing.M) {
framework.MainEntry(m)
}
func setupTest(t *testing.T) (string, *framework.TestCtx) {
ctx := framework.NewTestCtx(t)
func setupTest(t *testing.T) (string, *framework.Context) {
ctx := framework.NewContext(t)
err := ctx.InitializeClusterResources(nil)
if err != nil {
t.Fatalf("could not initialize cluster resources: %v", err)
@@ -53,7 +53,7 @@ func setupTest(t *testing.T) (string, *framework.TestCtx) {
t.Fatalf("could not add scheme to framework scheme: %v", err)
}
namespace, err := ctx.GetNamespace()
namespace, err := ctx.GetOperatorNamespace()
if err != nil {
t.Fatalf("could not get namespace: %v", err)
}
+4 -4
View File
@@ -125,8 +125,8 @@ func printKubernetesPods(t *testing.T, namespace string) {
}
}
func showLogsIfTestHasFailed(t *testing.T, ctx *framework.TestCtx) {
namespace, err := ctx.GetNamespace()
func showLogsIfTestHasFailed(t *testing.T, ctx *framework.Context) {
namespace, err := ctx.GetOperatorNamespace()
if err != nil {
t.Fatalf("Failed to get '%s' namespace", err)
}
@@ -140,8 +140,8 @@ func showLogsIfTestHasFailed(t *testing.T, ctx *framework.TestCtx) {
}
}
func showLogsAndCleanup(t *testing.T, ctx *framework.TestCtx) {
namespace, err := ctx.GetNamespace()
func showLogsAndCleanup(t *testing.T, ctx *framework.Context) {
namespace, err := ctx.GetOperatorNamespace()
if err != nil {
t.Fatalf("Failed to get '%s' namespace", err)
}