mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
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>
22 lines
521 B
Go
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))
|
|
}
|