Skip to content

Commit

Permalink
Fix integration tests version check
Browse files Browse the repository at this point in the history
  • Loading branch information
vapopov committed Nov 28, 2024
1 parent 2b977ef commit 35e1aed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions integration/hsm/hsm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,10 @@ func TestHSMDualAuthRotation(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
log := utils.NewLoggerForTests()
storageConfig := liteBackendConfig(t)

// start a cluster with 1 auth server
log.Debug("TestHSMDualAuthRotation: Starting auth server 1")
auth1Config := newHSMAuthConfig(t, storageConfig, log, clockwork.NewRealClock())
auth1Config := newHSMAuthConfig(t, liteBackendConfig(t), log, clockwork.NewRealClock())
auth1, err := newTeleportService(ctx, auth1Config, "auth1")
require.NoError(t, err)
t.Cleanup(func() {
Expand All @@ -227,7 +226,7 @@ func TestHSMDualAuthRotation(t *testing.T) {

// add a new auth server
log.Debug("TestHSMDualAuthRotation: Starting auth server 2")
auth2Config := newHSMAuthConfig(t, storageConfig, log, clockwork.NewRealClock())
auth2Config := newHSMAuthConfig(t, liteBackendConfig(t), log, clockwork.NewRealClock())
auth2, err := newTeleportService(ctx, auth2Config, "auth2")
require.NoError(t, err)
t.Cleanup(func() {
Expand Down Expand Up @@ -382,16 +381,17 @@ func TestHSMMigrate(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)
log := utils.NewLoggerForTests()
storageConfig := liteBackendConfig(t)

// start a dual auth non-hsm cluster
log.Debug("TestHSMMigrate: Starting auth server 1")
auth1Config := newHSMAuthConfig(t, storageConfig, log, clockwork.NewRealClock())
auth1Config := newHSMAuthConfig(t, liteBackendConfig(t), log, clockwork.NewRealClock())
auth1Config.Auth.KeyStore = servicecfg.KeystoreConfig{}
auth2Config := newHSMAuthConfig(t, storageConfig, log, clockwork.NewRealClock())
auth2Config.Auth.KeyStore = servicecfg.KeystoreConfig{}
auth1, err := newTeleportService(ctx, auth1Config, "auth1")
require.NoError(t, err)

auth2Config := newHSMAuthConfig(t, liteBackendConfig(t), log, clockwork.NewRealClock())
auth2Config.Auth.KeyStore = servicecfg.KeystoreConfig{}
auth2Config.DataDir = t.TempDir()
auth2, err := newTeleportService(ctx, auth2Config, "auth2")
require.NoError(t, err)

Expand Down
1 change: 1 addition & 0 deletions integration/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func basicDirCopy(src string, dst string) error {
// generated by an older teleport version that permitted token mix-and-match.
func TestInstanceCertReissue(t *testing.T) {
t.Setenv("_insecuredevmode_no_parallel", "1") // panic if the test is or will become parallel
t.Setenv("TELEPORT_UNSTABLE_SKIP_VERSION_UPGRADE_CHECK", "1")
lib.SetInsecureDevMode(true)
defer lib.SetInsecureDevMode(false)

Expand Down
1 change: 1 addition & 0 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,7 @@ func testTwoClustersProxy(t *testing.T, suite *integrationTestSuite) {
// TestHA tests scenario when auth server for the cluster goes down
// and we switch to local persistent caches
func testHA(t *testing.T, suite *integrationTestSuite) {
t.Setenv("TELEPORT_UNSTABLE_SKIP_VERSION_UPGRADE_CHECK", "1")
ctx := context.Background()
tr := utils.NewTracer(utils.ThisFunction()).Start()
defer tr.Stop()
Expand Down

0 comments on commit 35e1aed

Please sign in to comment.