Skip to content

Commit

Permalink
Add missing ProgramTestOptions overrides in With
Browse files Browse the repository at this point in the history
These options were previously added without also adding the override handling in `With`.
  • Loading branch information
justinvp committed Sep 15, 2022
1 parent bc704af commit 9f5ec4a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/testing/integration/program.go
Expand Up @@ -536,15 +536,33 @@ func (opts ProgramTestOptions) With(overrides ProgramTestOptions) ProgramTestOpt
if overrides.PipenvBin != "" {
opts.PipenvBin = overrides.PipenvBin
}
if overrides.DotNetBin != "" {
opts.DotNetBin = overrides.DotNetBin
}
if overrides.Env != nil {
opts.Env = append(opts.Env, overrides.Env...)
}
if overrides.UseAutomaticVirtualEnv {
opts.UseAutomaticVirtualEnv = overrides.UseAutomaticVirtualEnv
}
if overrides.UsePipenv {
opts.UsePipenv = overrides.UsePipenv
}
if overrides.PreviewCompletedHook != nil {
opts.PreviewCompletedHook = overrides.PreviewCompletedHook
}
if overrides.JSONOutput {
opts.JSONOutput = overrides.JSONOutput
}
if overrides.ExportStateValidator != nil {
opts.ExportStateValidator = overrides.ExportStateValidator
}
if overrides.PrepareProject != nil {
opts.PrepareProject = overrides.PrepareProject
}
if overrides.LocalDependencies != nil {
opts.LocalDependencies = append(opts.LocalDependencies, overrides.LocalDependencies...)
}
return opts
}

Expand Down

0 comments on commit 9f5ec4a

Please sign in to comment.