Skip to content

Commit 5a355ef

Browse files
dd-gplassardclaude
andcommitted
[ACTP] e2e: provide fake remote-config roots for the executor test
The executor test runs without a fakeintake, so there is no RC backend. Inject the deterministic fake TUF roots (fakeintake.RCRootJSON) as remote_configuration.config_root/director_root so the remote config service initializes cleanly and the executor starts up properly. Environment: Datadog workspace Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 80b5691 commit 5a355ef

1 file changed

Lines changed: 19 additions & 4 deletions

File tree

test/new-e2e/tests/privateactionrunner/private_action_runner_executor_nix_test.go

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ import (
1111
"time"
1212

1313
"github.com/stretchr/testify/assert"
14+
"github.com/stretchr/testify/require"
1415

1516
"github.com/DataDog/datadog-agent/test/e2e-framework/components/datadog/agentparams"
17+
"github.com/DataDog/datadog-agent/test/e2e-framework/components/datadog/fakeintake"
1618
scenec2 "github.com/DataDog/datadog-agent/test/e2e-framework/scenarios/aws/ec2"
1719
"github.com/DataDog/datadog-agent/test/e2e-framework/testing/e2e"
1820
"github.com/DataDog/datadog-agent/test/e2e-framework/testing/environments"
@@ -40,11 +42,24 @@ type linuxPrivateActionRunnerExecutorSuite struct {
4042

4143
func TestLinuxPrivateActionRunnerExecutorSuite(t *testing.T) {
4244
t.Parallel()
43-
// Disable idle self-shutdown so the executor stays up for the whole test
44-
// (it would otherwise self-exit after being idle with no in-flight actions).
45-
config := GenerateTestPrivateActionRunnerConfig(t) + ` executor:
45+
46+
// Fake remote-config TUF roots. Without a fakeintake this environment has no
47+
// RC backend, so the remote config service would otherwise start against the
48+
// production roots and fail; the deterministic fake roots let it initialize
49+
// cleanly so the executor starts up properly.
50+
rcRoot, err := fakeintake.RCRootJSON()
51+
require.NoError(t, err, "failed to build fake RC root")
52+
53+
// PAR enabled with a valid identity; idle self-shutdown disabled so the
54+
// executor stays up for the whole test (it would otherwise self-exit after
55+
// being idle with no in-flight actions).
56+
config := GenerateTestPrivateActionRunnerConfig(t) + fmt.Sprintf(` executor:
4657
idle_shutdown_timeout_seconds: 0
47-
`
58+
remote_configuration:
59+
config_root: '%s'
60+
director_root: '%s'
61+
`, rcRoot, rcRoot)
62+
4863
e2e.Run(t, &linuxPrivateActionRunnerExecutorSuite{}, e2e.WithProvisioner(
4964
awshost.ProvisionerNoFakeIntake(
5065
awshost.WithRunOptions(

0 commit comments

Comments
 (0)