mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-06 03:10:07 +00:00
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:
@@ -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
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user