From f2cec7348636d5e6ef5a0bae83b2f31255c1f1cc Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 19 Apr 2023 15:27:16 +0200 Subject: [PATCH] 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 --- libpod/container_internal_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpod/container_internal_test.go b/libpod/container_internal_test.go index c03e0fc004..b1e2bc1483 100644 --- a/libpod/container_internal_test.go +++ b/libpod/container_internal_test.go @@ -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) {