Skip to content

Commit

Permalink
libpod: fix TestPostDeleteHooks do not depend on version
Browse files Browse the repository at this point in the history
It really doesn't make sense to match the version one to one,
this just requires us to update it every time manually.
Use a regex instead.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Apr 19, 2023
1 parent 64b26df commit f2cec73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/container_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestPostDeleteHooks(t *testing.T) {
if err != nil {
t.Fatal(err)
}
stateRegexp := `{"ociVersion":"1\.1\.0-rc.1","id":"123abc","status":"stopped","bundle":"` + dir + `","annotations":{"a":"b"}}`
stateRegexp := `{"ociVersion":"[0-9]+\.[0-9]+\..*","id":"123abc","status":"stopped","bundle":"` + dir + `","annotations":{"a":"b"}}`
for _, p := range []string{statePath, copyPath} {
path := p
t.Run(path, func(t *testing.T) {
Expand Down

0 comments on commit f2cec73

Please sign in to comment.