Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v15] Attempt to reduce flakiness of TestIntegrations/DiscoveryNode #50137

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions integration/helpers/instance.go
Original file line number Diff line number Diff line change
@@ -444,6 +444,7 @@ func (i *TeleInstance) Create(t *testing.T, trustedSecrets []*InstanceSecrets, e
tconf.Proxy.DisableWebInterface = true
tconf.CircuitBreakerConfig = breaker.NoopBreakerConfig()
tconf.InstanceMetadataClient = imds.NewDisabledIMDSClient()
tconf.DebugService.Enabled = false
return i.CreateEx(t, trustedSecrets, tconf)
}

@@ -469,6 +470,7 @@ func (i *TeleInstance) GenerateConfig(t *testing.T, trustedSecrets []*InstanceSe
tconf.Auth.ClusterName, err = services.NewClusterNameWithRandomID(types.ClusterNameSpecV2{
ClusterName: i.Secrets.SiteName,
})
tconf.DebugService.Enabled = false
if err != nil {
return nil, trace.Wrap(err)
}
@@ -737,6 +739,7 @@ func (i *TeleInstance) StartNodeWithTargetPort(tconf *servicecfg.Config, authPor
}
tconf.Auth.Enabled = false
tconf.Proxy.Enabled = false
tconf.DebugService.Enabled = false

// Create a new Teleport process and add it to the list of nodes that
// compose this "cluster".
@@ -779,6 +782,7 @@ func (i *TeleInstance) StartApp(conf *servicecfg.Config) (*service.TeleportProce
conf.Testing.UploadEventsC = i.UploadEventsC
conf.Auth.Enabled = false
conf.Proxy.Enabled = false
conf.DebugService.Enabled = false

// Create a new Teleport process and add it to the list of nodes that
// compose this "cluster".
@@ -829,6 +833,7 @@ func (i *TeleInstance) StartApps(configs []*servicecfg.Config) ([]*service.Telep
cfg.Testing.UploadEventsC = i.UploadEventsC
cfg.Auth.Enabled = false
cfg.Proxy.Enabled = false
cfg.DebugService.Enabled = false

// Create a new Teleport process and add it to the list of nodes that
// compose this "cluster".
@@ -894,6 +899,7 @@ func (i *TeleInstance) StartDatabase(conf *servicecfg.Config) (*service.Teleport
conf.Proxy.Enabled = false
conf.Apps.Enabled = false
conf.SSH.Enabled = false
conf.DebugService.Enabled = false

// Create a new Teleport process and add it to the list of nodes that
// compose this "cluster".
@@ -956,6 +962,7 @@ func (i *TeleInstance) StartKube(t *testing.T, conf *servicecfg.Config, clusterN
conf.Apps.Enabled = false
conf.SSH.Enabled = false
conf.Databases.Enabled = false
conf.DebugService.Enabled = false

conf.Kube.KubeconfigPath = filepath.Join(dataDir, "kube_config")
if err := EnableKube(t, conf, clusterName); err != nil {
@@ -1031,6 +1038,7 @@ func (i *TeleInstance) StartNodeAndProxy(t *testing.T, name string) (sshPort, we
}
tconf.CircuitBreakerConfig = breaker.NoopBreakerConfig()
tconf.InstanceMetadataClient = imds.NewDisabledIMDSClient()
tconf.DebugService.Enabled = false

// Create a new Teleport process and add it to the list of nodes that
// compose this "cluster".
@@ -1124,6 +1132,7 @@ func (i *TeleInstance) StartProxy(cfg ProxyConfig, opts ...Option) (reversetunne
tconf.Proxy.DisableALPNSNIListener = cfg.DisableALPNSNIListener
tconf.CircuitBreakerConfig = breaker.NoopBreakerConfig()
tconf.InstanceMetadataClient = imds.NewDisabledIMDSClient()
tconf.DebugService.Enabled = false
tconf.FileDescriptors = cfg.FileDescriptors
// apply options
for _, o := range opts {
6 changes: 6 additions & 0 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
@@ -4420,12 +4420,18 @@ func testDiscoveryNode(t *testing.T, suite *integrationTestSuite) {
helpers.WaitForActiveTunnelConnections(t, main.Tunnel, helpers.Site, 1)
helpers.WaitForActiveTunnelConnections(t, proxyTunnel, helpers.Site, 1)

// Wait for the nodes to be visible to both Proxy instances.
require.NoError(t, main.WaitForNodeCount(ctx, helpers.Site, 1))
instance := helpers.TeleInstance{Tunnel: proxyTunnel}
require.NoError(t, instance.WaitForNodeCount(ctx, helpers.Site, 1))

// Execute the connection via first proxy.
cfg := helpers.ClientConfig{
Login: suite.Me.Username,
Cluster: helpers.Site,
Host: "cluster-main-node",
}

output, err := runCommand(t, main, []string{"echo", "hello world"}, cfg, 1)
require.NoError(t, err)
require.Equal(t, "hello world\n", output)
Loading