mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
commit
10425ed4cb
3 changed files with 14 additions and 14 deletions
|
@ -17,7 +17,7 @@ import (
|
|||
|
||||
func TestPeerCertificateMarshalJSON(t *testing.T) {
|
||||
template := &x509.Certificate{
|
||||
IsCA: true,
|
||||
IsCA: true,
|
||||
BasicConstraintsValid: true,
|
||||
SubjectKeyId: []byte{1, 2, 3},
|
||||
SerialNumber: big.NewInt(1234),
|
||||
|
|
|
@ -16,11 +16,11 @@ import (
|
|||
|
||||
var (
|
||||
saveLoadTestCases = map[string]digest.Digest{
|
||||
"registry:5000/foobar:HEAD": "sha256:470022b8af682154f57a2163d030eb369549549cba00edc69e1b99b46bb924d6",
|
||||
"registry:5000/foobar:alternate": "sha256:ae300ebc4a4f00693702cfb0a5e0b7bc527b353828dc86ad09fb95c8a681b793",
|
||||
"registry:5000/foobar:latest": "sha256:6153498b9ac00968d71b66cca4eac37e990b5f9eb50c26877eb8799c8847451b",
|
||||
"registry:5000/foobar:master": "sha256:6c9917af4c4e05001b346421959d7ea81b6dc9d25718466a37a6add865dfd7fc",
|
||||
"jess/hollywood:latest": "sha256:ae7a5519a0a55a2d4ef20ddcbd5d0ca0888a1f7ab806acc8e2a27baf46f529fe",
|
||||
"registry:5000/foobar:HEAD": "sha256:470022b8af682154f57a2163d030eb369549549cba00edc69e1b99b46bb924d6",
|
||||
"registry:5000/foobar:alternate": "sha256:ae300ebc4a4f00693702cfb0a5e0b7bc527b353828dc86ad09fb95c8a681b793",
|
||||
"registry:5000/foobar:latest": "sha256:6153498b9ac00968d71b66cca4eac37e990b5f9eb50c26877eb8799c8847451b",
|
||||
"registry:5000/foobar:master": "sha256:6c9917af4c4e05001b346421959d7ea81b6dc9d25718466a37a6add865dfd7fc",
|
||||
"jess/hollywood:latest": "sha256:ae7a5519a0a55a2d4ef20ddcbd5d0ca0888a1f7ab806acc8e2a27baf46f529fe",
|
||||
"registry@sha256:367eb40fd0330a7e464777121e39d2f5b3e8e23a1e159342e53ab05c9e4d94e6": "sha256:24126a56805beb9711be5f4590cc2eb55ab8d4a85ebd618eed72bb19fc50631c",
|
||||
"busybox:latest": "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c",
|
||||
}
|
||||
|
|
|
@ -48,20 +48,20 @@ func TestNetworkModeTest(t *testing.T) {
|
|||
"something:weird": {true, false, false, false, false, false},
|
||||
"bridge": {true, true, false, false, false, false},
|
||||
DefaultDaemonNetworkMode(): {true, true, false, false, false, false},
|
||||
"host": {false, false, true, false, false, false},
|
||||
"container:name": {false, false, false, true, false, false},
|
||||
"none": {true, false, false, false, true, false},
|
||||
"default": {true, false, false, false, false, true},
|
||||
"host": {false, false, true, false, false, false},
|
||||
"container:name": {false, false, false, true, false, false},
|
||||
"none": {true, false, false, false, true, false},
|
||||
"default": {true, false, false, false, false, true},
|
||||
}
|
||||
networkModeNames := map[container.NetworkMode]string{
|
||||
"": "",
|
||||
"something:weird": "something:weird",
|
||||
"bridge": "bridge",
|
||||
DefaultDaemonNetworkMode(): "bridge",
|
||||
"host": "host",
|
||||
"container:name": "container",
|
||||
"none": "none",
|
||||
"default": "default",
|
||||
"host": "host",
|
||||
"container:name": "container",
|
||||
"none": "none",
|
||||
"default": "default",
|
||||
}
|
||||
for networkMode, state := range networkModes {
|
||||
if networkMode.IsPrivate() != state[0] {
|
||||
|
|
Loading…
Reference in a new issue