forked from rosa/hakurei
internal/pkg: expose cure whence
Useful for cure determinism validation of KindExec. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
+10
-10
@@ -84,7 +84,7 @@ func TestExec(t *testing.T) {
|
||||
},
|
||||
}),
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
), ignorePathname, wantOffline, pkg.WNew, nil},
|
||||
|
||||
{"substitution", pkg.NewExec(
|
||||
"exec-offline", "", new(wantOffline.hash()), 0, false, false,
|
||||
@@ -108,7 +108,7 @@ func TestExec(t *testing.T) {
|
||||
},
|
||||
}),
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
), ignorePathname, wantOffline, pkg.WSubstitute, nil},
|
||||
|
||||
{"error passthrough", pkg.NewExec(
|
||||
"", "", nil, 0, false, true,
|
||||
@@ -118,7 +118,7 @@ func TestExec(t *testing.T) {
|
||||
[]string{"testtool"},
|
||||
|
||||
pkg.MustPath("/proc/nonexistent", false, failingArtifact),
|
||||
), nil, nil, &pkg.DependencyCureError{
|
||||
), nil, nil, pkg.WNew, &pkg.DependencyCureError{
|
||||
{
|
||||
A: failingArtifact,
|
||||
Err: stub.UniqueError(0xcafe),
|
||||
@@ -133,7 +133,7 @@ func TestExec(t *testing.T) {
|
||||
[]string{"testtool"},
|
||||
|
||||
pkg.ExecPath{},
|
||||
), nil, nil, pkg.ErrInvalidPaths},
|
||||
), nil, nil, pkg.WNew, pkg.ErrInvalidPaths},
|
||||
})
|
||||
|
||||
// check init failure passthrough
|
||||
@@ -225,7 +225,7 @@ func TestExec(t *testing.T) {
|
||||
},
|
||||
}),
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantNet, nil},
|
||||
), ignorePathname, wantNet, pkg.WNew, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
@@ -269,7 +269,7 @@ func TestExec(t *testing.T) {
|
||||
},
|
||||
}),
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
), ignorePathname, wantOffline, pkg.WNew, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
@@ -316,7 +316,7 @@ func TestExec(t *testing.T) {
|
||||
return os.MkdirAll(t.GetWorkDir().String(), 0700)
|
||||
},
|
||||
}), pkg.Path(pkg.AbsWork, false /* ignored */, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
), ignorePathname, wantOffline, pkg.WNew, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
@@ -385,7 +385,7 @@ func TestExec(t *testing.T) {
|
||||
},
|
||||
}),
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
), ignorePathname, wantOffline, pkg.WNew, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
@@ -438,7 +438,7 @@ func TestExec(t *testing.T) {
|
||||
},
|
||||
}),
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
), ignorePathname, wantOffline, pkg.WNew, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
@@ -503,7 +503,7 @@ func TestExec(t *testing.T) {
|
||||
".": {Mode: fs.ModeDir | 0500},
|
||||
|
||||
"check": {Mode: 0400, Data: []byte("binfmt")},
|
||||
}, nil},
|
||||
}, pkg.WNew, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
|
||||
Reference in New Issue
Block a user