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
|
|
@ -232,7 +232,7 @@ func TestDefaultService_BuildAndRunScript(t *testing.T) {
|
|||
tests := []struct {
|
||||
name string
|
||||
derivation string
|
||||
pureEnv bool
|
||||
impureEnv bool
|
||||
mockBuildDrvOutput string
|
||||
mockBuildDrvError string
|
||||
mockBuildDrvExitCode string
|
||||
|
|
@ -252,7 +252,7 @@ func TestDefaultService_BuildAndRunScript(t *testing.T) {
|
|||
0, "Hello", "ErrOut", false, nil, "",
|
||||
},
|
||||
{
|
||||
"Success pure", "script.drv#sh", true, mockScriptPath, "", "0",
|
||||
"Success impure", "script.drv#sh", true, mockScriptPath, "", "0",
|
||||
"Hello", "ErrOut", "0",
|
||||
0, "Hello", "ErrOut", false, nil, "",
|
||||
},
|
||||
|
|
@ -277,7 +277,7 @@ func TestDefaultService_BuildAndRunScript(t *testing.T) {
|
|||
os.Setenv("MOCK_SCRIPT_STDERR", tt.mockScriptStderr)
|
||||
os.Setenv("MOCK_SCRIPT_EXIT_CODE", tt.mockScriptExitCode)
|
||||
|
||||
exitCode, stdout, stderr, err := service.BuildAndRunScript(tt.derivation, tt.pureEnv)
|
||||
exitCode, stdout, stderr, err := service.BuildAndRunScript(tt.derivation, tt.impureEnv)
|
||||
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Fatalf("BuildAndRunScript() error = %v, wantErr %v", err, tt.wantErr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue