Files
moby/daemon/containerd/image_import_test.go
Sebastiaan van Stijn d58dc493fe replace direct uses of nat types for api/types/container aliases
Follow-up to 494677f93f, which added
the aliases, but did not yet replace our own use of the nat types.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-31 02:57:39 +02:00

22 lines
521 B
Go

package containerd
import (
"testing"
"github.com/moby/moby/api/types/container"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
// regression test for https://github.com/moby/moby/issues/45904
func TestContainerConfigToDockerImageConfig(t *testing.T) {
ociCFG := containerConfigToDockerOCIImageConfig(&container.Config{
ExposedPorts: container.PortSet{
"80/tcp": struct{}{},
},
})
expected := map[string]struct{}{"80/tcp": {}}
assert.Check(t, is.DeepEqual(ociCFG.ExposedPorts, expected))
}