Skip to content

Commit

Permalink
Test the right directory for kocache (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr authored Feb 24, 2022
1 parent d48a621 commit ea93812
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/build/gobuild_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,10 @@ func TestGoBuild(t *testing.T) {
func TestGoBuildWithKOCACHE(t *testing.T) {
now := time.Now() // current local time
sec := now.Unix()
koCacheDir := t.TempDir()
t.Setenv("KOCACHE", filepath.Join(koCacheDir, strconv.FormatInt(sec, 10)))
tmpDir := t.TempDir()
koCacheDir := filepath.Join(tmpDir, strconv.FormatInt(sec, 10))

t.Setenv("KOCACHE", koCacheDir)
baseLayers := int64(3)
base, err := random.Image(1024, baseLayers)
if err != nil {
Expand Down

0 comments on commit ea93812

Please sign in to comment.