Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot FS on first cache miss. #1214

Merged
merged 13 commits into from
May 4, 2020
Prev Previous commit
Next Next commit
remove read succesS
  • Loading branch information
tejal29 committed Apr 30, 2020
commit 44b35b28eb3618abb4ede53d9695cccdafdedff4
6 changes: 1 addition & 5 deletions pkg/commands/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ import (
)

func Test_caching(t *testing.T) {
c := caching{layer: fakeLayer{}, readSuccess: true}
c := caching{layer: fakeLayer{}}

actual := c.Layer().(fakeLayer)
expected := fakeLayer{}
actualLen, expectedLen := len(actual.TarContent), len(expected.TarContent)
if actualLen != expectedLen {
t.Errorf("expected layer tar content to be %v but was %v", expectedLen, actualLen)
}

if !c.ReadSuccess() {
t.Errorf("expected ReadSuccess to be %v but was %v", true, c.ReadSuccess())
}
}
4 changes: 0 additions & 4 deletions pkg/commands/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,6 @@ func Test_CachingCopyCommand_ExecuteCommand(t *testing.T) {
} else if c.layer != nil && !tc.expectLayer {
t.Error("expected the command to have no layer set but instead found a layer")
}

if c.readSuccess != tc.expectLayer {
t.Errorf("expected read success to be %v but was %v", tc.expectLayer, c.readSuccess)
}
})
}
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/commands/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,6 @@ func Test_CachingRunCommand_ExecuteCommand(t *testing.T) {
} else if c.layer != nil && !tc.expectLayer {
t.Error("expected the command to have no layer set but instead found a layer")
}

if c.readSuccess != tc.expectLayer {
t.Errorf("expected read success to be %v but was %v", tc.expectLayer, c.readSuccess)
}
})
}
}