Skip to content

Commit 658c19f

Browse files
committed
Revert "fix: avoid running cachedir mount commands via script (chainguard-dev#2070)"
This reverts commit 4e7b2c4.
1 parent b6eaa9d commit 658c19f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pkg/build/test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ func (t *Test) TestPackage(ctx context.Context) error {
335335
}
336336

337337
log.Infof("running the main test pipeline")
338-
339-
pr.config.TestRun = true
340338
if err := pr.runPipelines(ctx, t.Configuration.Test.Pipeline); err != nil {
341339
return fmt.Errorf("unable to run pipeline: %w", err)
342340
}
@@ -391,7 +389,6 @@ func (t *Test) TestPackage(ctx context.Context) error {
391389
}()
392390
}
393391

394-
pr.config.TestRun = true
395392
if err := pr.runPipelines(ctx, sp.Test.Pipeline); err != nil {
396393
return fmt.Errorf("unable to run pipeline: %w", err)
397394
}
@@ -456,6 +453,7 @@ func (t *Test) buildWorkspaceConfig(ctx context.Context, imgRef, pkgName string,
456453
Environment: map[string]string{},
457454
RunAsUID: runAsUID(imgcfg.Accounts),
458455
RunAs: runAs(imgcfg.Accounts),
456+
TestRun: true,
459457
}
460458
if t.Configuration.Capabilities.Add != nil {
461459
cfg.Capabilities.Add = t.Configuration.Capabilities.Add

pkg/build/test_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func TestBuildWorkspaceConfig(t *testing.T) {
7878
PackageName: testPkgName,
7979
ImgRef: testImgRef,
8080
WorkspaceDir: "/workspace",
81+
TestRun: true,
8182
Capabilities: container.Capabilities{Networking: true},
8283
Mounts: []container.BindMount{
8384
{Source: testWorkspaceDir, Destination: homeBuild},

0 commit comments

Comments
 (0)