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

test: Update error string for --file-locks test #12367

Merged
merged 2 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/api/handlers/libpod/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func Checkpoint(w http.ResponseWriter, r *http.Request) {
PrintStats bool `schema:"printStats"`
PreCheckpoint bool `schema:"preCheckpoint"`
WithPrevious bool `schema:"withPrevious"`
FileLocks bool `schema:"fileLocks"`
}{
// override any golang type defaults
}
Expand All @@ -246,6 +247,7 @@ func Checkpoint(w http.ResponseWriter, r *http.Request) {
PrintStats: query.PrintStats,
PreCheckPoint: query.PreCheckpoint,
WithPrevious: query.WithPrevious,
FileLocks: query.FileLocks,
}

if query.Export {
Expand Down Expand Up @@ -305,6 +307,7 @@ func Restore(w http.ResponseWriter, r *http.Request) {
IgnoreStaticIP bool `schema:"ignoreStaticIP"`
IgnoreStaticMAC bool `schema:"ignoreStaticMAC"`
PrintStats bool `schema:"printStats"`
FileLocks bool `schema:"fileLocks"`
PublishPorts string `schema:"publishPorts"`
}{
// override any golang type defaults
Expand All @@ -324,6 +327,7 @@ func Restore(w http.ResponseWriter, r *http.Request) {
IgnoreStaticIP: query.IgnoreStaticIP,
IgnoreStaticMAC: query.IgnoreStaticMAC,
PrintStats: query.PrintStats,
FileLocks: query.FileLocks,
PublishPorts: strings.Fields(query.PublishPorts),
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/checkpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ var _ = Describe("Podman checkpoint", func() {
result := podmanTest.Podman([]string{"container", "checkpoint", "test_name"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(125))
Expect(result.ErrorToString()).To(ContainSubstring("criu failed"))
Expect(result.ErrorToString()).To(ContainSubstring("failed: exit status 1"))
rst0git marked this conversation as resolved.
Show resolved Hide resolved
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))

// Checkpoint is expected to succeed with --file-locks
Expand Down