libpod: fix TestPostDeleteHooks do not depend on version

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 <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-04-19 15:27:16 +02:00
parent 64b26df608
commit f2cec73486

View File

@ -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) {