runtime: Ignoring deprecated warning.

In the latest oci-spec, the prestart hook is deprecated.
However, the docker & nerdctl tests failed when I switched
to one of the newer hooks which don't run at quite the same time,
so ignore the deprecation warnings for now to unblock the security fix

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman
2025-05-01 11:39:52 +01:00
parent 37dda6060c
commit 4de79b9821
4 changed files with 5 additions and 5 deletions

View File

@@ -497,7 +497,7 @@ func IsDockerContainer(spec *specs.Spec) bool {
return false
}
for _, hook := range spec.Hooks.Prestart {
for _, hook := range spec.Hooks.Prestart { //nolint:all
for _, arg := range hook.Args {
if strings.HasPrefix(arg, "libnetwork") {
return true

View File

@@ -595,7 +595,7 @@ func TestIsDockerContainer(t *testing.T) {
}
assert.False(IsDockerContainer(ociSpec))
ociSpec.Hooks.Prestart = append(ociSpec.Hooks.Prestart, specs.Hook{
ociSpec.Hooks.Prestart = append(ociSpec.Hooks.Prestart, specs.Hook{ //nolint:all
Args: []string{"libnetwork-xxx"},
})
assert.True(IsDockerContainer(ociSpec))