Skip to content

Commit 4a1fddd

Browse files
committed
Explicitly authorize internet access in failing E2E tests (pipeline 127765169)
All tests that use awshost.Provisioner (or variants) now opt-in to internet access via ec2.WithInternetAccess() / scenec2.WithInternetAccess(). This unblocks the 41 E2E test suites that were failing because the host provisioner now defaults to no-internet. Tests changed: - fleet/suite: fleet upgrade/config/extensions suites - installer/script, installer/unix: installer script/package suites - agent-platform/tests: install-script, ddot, package-signing suites - apm/vm_test: VM fakeintake suite (pulls docker images from ghcr.io) - ndm/snmp: snmp VM and autodiscovery suites - cws/ec2_test: CWS EC2 agent suite - cws/windows_test: CWS Windows agent suite - cspm/host_benchmarks_nix_test: CSPM host benchmark suites (RHEL/AlmaLinux repos) - remote-config/tracer_test: RC tracer suite - agent-subcommands: linux + windows subcommand suites - agent-configuration: linux + windows configuration suites - agent-runtimes: Windows agent runtime suites - netpath/netpath_int_win: Windows network path integration suite - agent-log-pipelines/file-tailing: Windows file tailing suite
1 parent ee1a0a9 commit 4a1fddd

41 files changed

Lines changed: 46 additions & 38 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/new-e2e/tests/agent-configuration/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type apiSuite struct {
4242

4343
func TestApiSuite(t *testing.T) {
4444
t.Parallel()
45-
e2e.Run(t, &apiSuite{}, e2e.WithProvisioner(awshost.ProvisionerNoFakeIntake(awshost.WithRunOptions(ec2.WithoutFakeIntake()))))
45+
e2e.Run(t, &apiSuite{}, e2e.WithProvisioner(awshost.ProvisionerNoFakeIntake(awshost.WithRunOptions(ec2.WithoutFakeIntake(), ec2.WithEC2InstanceOptions(ec2.WithInternetAccess())))))
4646
}
4747

4848
type agentEndpointInfo struct {

test/new-e2e/tests/agent-configuration/configrefresh_api_key_refresh_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type linuxAPIKeyRefreshSuite struct {
3131
func TestLinuxAPIKeyFreshSuite(t *testing.T) {
3232
t.Parallel()
3333
suite := &linuxAPIKeyRefreshSuite{descriptor: os.UbuntuDefault}
34-
e2e.Run(t, suite, e2e.WithProvisioner(awshost.Provisioner()))
34+
e2e.Run(t, suite, e2e.WithProvisioner(awshost.Provisioner(awshost.WithRunOptions(scenec2.WithEC2InstanceOptions(scenec2.WithInternetAccess())))))
3535
}
3636

3737
func (v *linuxAPIKeyRefreshSuite) TestIntakeRefreshAPIKey() {

test/new-e2e/tests/agent-configuration/configrefresh_nix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type configRefreshLinuxSuite struct {
2929

3030
func TestConfigRefreshLinuxSuite(t *testing.T) {
3131
t.Parallel()
32-
e2e.Run(t, &configRefreshLinuxSuite{}, e2e.WithProvisioner(awshost.Provisioner()))
32+
e2e.Run(t, &configRefreshLinuxSuite{}, e2e.WithProvisioner(awshost.Provisioner(awshost.WithRunOptions(scenec2.WithEC2InstanceOptions(scenec2.WithInternetAccess())))))
3333
}
3434

3535
func (v *configRefreshLinuxSuite) TestConfigRefresh() {

test/new-e2e/tests/agent-configuration/configrefresh_win_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type configRefreshWindowsSuite struct {
3030

3131
func TestConfigRefreshWindowsSuite(t *testing.T) {
3232
t.Parallel()
33-
e2e.Run(t, &configRefreshWindowsSuite{}, e2e.WithProvisioner(awshost.Provisioner(awshost.WithRunOptions(ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault))))))
33+
e2e.Run(t, &configRefreshWindowsSuite{}, e2e.WithProvisioner(awshost.Provisioner(awshost.WithRunOptions(ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault), ec2.WithInternetAccess())))))
3434
}
3535

3636
func (v *configRefreshWindowsSuite) TestConfigRefresh() {
@@ -68,7 +68,7 @@ func (v *configRefreshWindowsSuite) TestConfigRefresh() {
6868

6969
// start the agent with that configuration
7070
v.UpdateEnv(awshost.Provisioner(
71-
awshost.WithRunOptions(ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault)),
71+
awshost.WithRunOptions(ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault), ec2.WithInternetAccess()),
7272
ec2.WithAgentOptions(agentOptions...),
7373
ec2.WithAgentClientOptions(
7474
agentclientparams.WithAuthTokenPath(authTokenFilePath),

test/new-e2e/tests/agent-configuration/gui_nix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type guiLinuxSuite struct {
2929

3030
func TestGUILinuxSuite(t *testing.T) {
3131
t.Parallel()
32-
e2e.Run(t, &guiLinuxSuite{}, e2e.WithProvisioner(awshost.ProvisionerNoFakeIntake()))
32+
e2e.Run(t, &guiLinuxSuite{}, e2e.WithProvisioner(awshost.ProvisionerNoFakeIntake(awshost.WithRunOptions(scenec2.WithEC2InstanceOptions(scenec2.WithInternetAccess())))))
3333
}
3434

3535
func (v *guiLinuxSuite) TestGUI() {

test/new-e2e/tests/agent-configuration/gui_win_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestGUIWindowsSuite(t *testing.T) {
4141

4242
e2e.Run(t, &guiWindowsSuite{}, e2e.WithProvisioner(awshost.ProvisionerNoFakeIntake(
4343
awshost.WithRunOptions(
44-
ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault)),
44+
ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault), ec2.WithInternetAccess()),
4545
ec2.WithAgentOptions(
4646
agentparams.WithAgentConfig(guiWinConfig),
4747
agentparams.WithAdditionalInstallParameters(

test/new-e2e/tests/agent-configuration/inventory_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type inventoryAgentSuite struct {
2525

2626
func TestInventoryAgentSuite(t *testing.T) {
2727
t.Parallel()
28-
e2e.Run(t, &inventoryAgentSuite{}, e2e.WithProvisioner(awshost.Provisioner()))
28+
e2e.Run(t, &inventoryAgentSuite{}, e2e.WithProvisioner(awshost.Provisioner(awshost.WithRunOptions(scenec2.WithEC2InstanceOptions(scenec2.WithInternetAccess())))))
2929
}
3030

3131
func (v *inventoryAgentSuite) TestInventoryDefaultConfig() {

test/new-e2e/tests/agent-configuration/secret_nix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type secretLinuxRuntimeSuite struct {
2727

2828
func TestSecretLinuxRuntimeSuite(t *testing.T) {
2929
t.Parallel()
30-
e2e.Run(t, &secretLinuxRuntimeSuite{}, e2e.WithProvisioner(awshost.Provisioner()))
30+
e2e.Run(t, &secretLinuxRuntimeSuite{}, e2e.WithProvisioner(awshost.Provisioner(awshost.WithRunOptions(scenec2.WithEC2InstanceOptions(scenec2.WithInternetAccess())))))
3131
}
3232

3333
//go:embed secret/fixtures/secret_script.py

test/new-e2e/tests/agent-configuration/secret_win_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type secretWindowsRuntimeSuite struct {
2929
func TestSecretWindowsRuntimeSuite(t *testing.T) {
3030
t.Parallel()
3131
e2e.Run(t, &secretWindowsRuntimeSuite{}, e2e.WithProvisioner(awshost.Provisioner(
32-
awshost.WithRunOptions(ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault))),
32+
awshost.WithRunOptions(ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault), ec2.WithInternetAccess())),
3333
)))
3434
}
3535

@@ -54,7 +54,7 @@ hostname: ENC[hostname]`
5454
v.UpdateEnv(
5555
awshost.Provisioner(
5656
awshost.WithRunOptions(
57-
ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault)),
57+
ec2.WithEC2InstanceOptions(ec2.WithOS(os.WindowsServerDefault), ec2.WithInternetAccess()),
5858
ec2.WithAgentOptions(agentParams...),
5959
),
6060
),

test/new-e2e/tests/agent-configuration/sgc-embedded/sgc_multi_backend_nix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type linuxRuntimeSecretSuite struct {
3838

3939
func TestSGCMultiBackendLinuxSuite(t *testing.T) {
4040
t.Parallel()
41-
e2e.Run(t, &linuxRuntimeSecretSuite{}, e2e.WithProvisioner(awshost.Provisioner()))
41+
e2e.Run(t, &linuxRuntimeSecretSuite{}, e2e.WithProvisioner(awshost.Provisioner(awshost.WithRunOptions(scenec2.WithEC2InstanceOptions(scenec2.WithInternetAccess())))))
4242
}
4343

4444
// TestMultiBackend verifies that multi_secret_backends routes ENC[backendID;key] handles

0 commit comments

Comments
 (0)