Skip to content

Commit 815cc1c

Browse files
authored
Use ParamsFromEnvironment for windows VM (#46098)
### What does this PR do? Check env for test signing and provisions VMs as test signing. This reenables ability to run test signed drivers and verify they work with the agent correctly. ### Motivation https://datadoghq.atlassian.net/browse/WINA-2369 ### Describe how you validated your changes Pipeline still succeeds, manually ran pipeline with test signing a verified that test signing is enabled again. ### Additional Notes Co-authored-by: jack.phillips <[email protected]>
1 parent 3bd2365 commit 815cc1c

File tree

1 file changed

+10
-0
lines changed
  • test/e2e-framework/scenarios/aws/ec2/windows

1 file changed

+10
-0
lines changed

test/e2e-framework/scenarios/aws/ec2/windows/run_args.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ func newRunParams() *RunParams {
5858
// GetRunParams returns RunParams after applying options
5959
func GetRunParams(opts ...RunOption) *RunParams {
6060
p := newRunParams()
61+
62+
// Enable TestSigning when testsigned drivers are requested via environment
63+
// this is used for kicking off testsigned windows drivers on CI
64+
if v := os.Getenv("WINDOWS_DDNPM_DRIVER"); v == "testsigned" {
65+
p.testsigningOptions = append(p.testsigningOptions, testsigning.WithTestSigningEnabled())
66+
}
67+
if v := os.Getenv("WINDOWS_DDPROCMON_DRIVER"); v == "testsigned" {
68+
p.testsigningOptions = append(p.testsigningOptions, testsigning.WithTestSigningEnabled())
69+
}
70+
6171
if err := optional.ApplyOptions(p, opts); err != nil {
6272
panic(fmt.Errorf("unable to apply RunOption, err: %w", err))
6373
}

0 commit comments

Comments
 (0)