mirror of
https://gitlab.com/TECHNOFAB/nixtest.git
synced 2025-12-12 10:10:09 +01:00
chore!: default to pure mode, rename --pure flag to --impure for switching
This commit is contained in:
parent
22b43c9fe8
commit
c9298b91f4
11 changed files with 29 additions and 29 deletions
|
|
@ -32,7 +32,7 @@ type Config struct {
|
|||
SnapshotDir string
|
||||
UpdateSnapshots bool
|
||||
SkipPattern string
|
||||
PureEnv bool
|
||||
ImpureEnv bool
|
||||
}
|
||||
|
||||
func New(cfg Config, nixService nix.Service, snapService snapshot.Service) (*Runner, error) {
|
||||
|
|
@ -181,7 +181,7 @@ func (r *Runner) handleUnitTest(result *types.TestResult, spec types.TestSpec, a
|
|||
|
||||
// handleScriptTest processes script type tests
|
||||
func (r *Runner) handleScriptTest(result *types.TestResult, spec types.TestSpec) {
|
||||
exitCode, stdout, stderrStr, err := r.nixService.BuildAndRunScript(spec.Script, r.config.PureEnv)
|
||||
exitCode, stdout, stderrStr, err := r.nixService.BuildAndRunScript(spec.Script, r.config.ImpureEnv)
|
||||
if err != nil {
|
||||
result.Status = types.StatusError
|
||||
result.ErrorMessage = fmt.Sprintf("[system] failed to run script derivation %s: %v", spec.Script, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue