Skip to content

Commit

Permalink
Merge pull request containers#12367 from rst0git/file-locks-1
Browse files Browse the repository at this point in the history
test: Update error string for --file-locks test
  • Loading branch information
openshift-merge-robot authored Nov 19, 2021
2 parents f82f6c1 + b2623ce commit 671e5ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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"))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))

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

0 comments on commit 671e5ee

Please sign in to comment.