Skip to content

Commit

Permalink
Try adding TLSOpts to all test mgrs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miles-Garnsey committed May 13, 2024
1 parent e49db2f commit 74019b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions apis/k8ssandra/v1alpha1/k8ssandracluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func TestWebhook(t *testing.T) {
Port: webhookInstallOptions.LocalServingPort,
Host: webhookInstallOptions.LocalServingHost,
CertDir: webhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Expand Down
1 change: 1 addition & 0 deletions apis/medusa/v1alpha1/medusa_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func TestMedusaWebhooks(t *testing.T) {
Port: webhookInstallOptions.LocalServingPort,
Host: webhookInstallOptions.LocalServingHost,
CertDir: webhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Expand Down
5 changes: 5 additions & 0 deletions controllers/medusa/controllers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package medusa

import (
"context"
"crypto/tls"
"testing"
"time"

Expand Down Expand Up @@ -95,6 +96,7 @@ func setupMedusaBackupTestEnv(t *testing.T, ctx context.Context) *testutils.Mult
Port: env.WebhookInstallOptions.LocalServingPort,
Host: env.WebhookInstallOptions.LocalServingHost,
CertDir: env.WebhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

dataPlaneMgr, err := ctrl.NewManager(env.Config, ctrl.Options{
Expand Down Expand Up @@ -169,6 +171,7 @@ func setupMedusaRestoreJobTestEnv(t *testing.T, ctx context.Context) *testutils.
Port: env.WebhookInstallOptions.LocalServingPort,
Host: env.WebhookInstallOptions.LocalServingHost,
CertDir: env.WebhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

dataPlaneMgr, err := ctrl.NewManager(env.Config, ctrl.Options{
Expand Down Expand Up @@ -242,6 +245,7 @@ func setupMedusaTaskTestEnv(t *testing.T, ctx context.Context) *testutils.MultiC
Port: env.WebhookInstallOptions.LocalServingPort,
Host: env.WebhookInstallOptions.LocalServingHost,
CertDir: env.WebhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

dataPlaneMgr, err := ctrl.NewManager(env.Config, ctrl.Options{
Expand Down Expand Up @@ -320,6 +324,7 @@ func setupMedusaConfigurationTestEnv(t *testing.T, ctx context.Context) *testuti
Port: env.WebhookInstallOptions.LocalServingPort,
Host: env.WebhookInstallOptions.LocalServingHost,
CertDir: env.WebhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

dataPlaneMgr, err := ctrl.NewManager(env.Config, ctrl.Options{
Expand Down
2 changes: 2 additions & 0 deletions pkg/test/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func (e *TestEnv) Start(ctx context.Context, t *testing.T, initReconcilers func(
Port: webhookInstallOptions.LocalServingPort,
Host: webhookInstallOptions.LocalServingHost,
CertDir: webhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

k8sManager, err := ctrl.NewManager(cfg, ctrl.Options{
Expand Down Expand Up @@ -238,6 +239,7 @@ func (e *MultiClusterTestEnv) Start(ctx context.Context, t *testing.T, initRecon
Port: webhookInstallOptions.LocalServingPort,
Host: webhookInstallOptions.LocalServingHost,
CertDir: webhookInstallOptions.LocalServingCertDir,
TLSOpts: []func(*tls.Config){func(config *tls.Config) {}},
})

k8sManager, err := ctrl.NewManager(cfgs[0], ctrl.Options{
Expand Down

0 comments on commit 74019b1

Please sign in to comment.