@@ -9,12 +9,12 @@ import (
9
9
10
10
func TestOSXKeychainHelper (t * testing.T ) {
11
11
creds := & credentials.Credentials {
12
- ServerURL : "https://foobar.docker.io :2376/v1" ,
12
+ ServerURL : "https://foobar.example.com :2376/v1" ,
13
13
Username : "foobar" ,
14
14
Secret : "foobarbaz" ,
15
15
}
16
16
creds1 := & credentials.Credentials {
17
- ServerURL : "https://foobar.docker.io :2376/v2" ,
17
+ ServerURL : "https://foobar.example.com :2376/v2" ,
18
18
Username : "foobarbaz" ,
19
19
Secret : "foobar" ,
20
20
}
@@ -66,18 +66,18 @@ func TestOSXKeychainHelperRetrieveAliases(t *testing.T) {
66
66
}{
67
67
{
68
68
doc : "stored with port, retrieved without" ,
69
- storeURL : "https://foobar.docker.io :2376" ,
70
- readURL : "https://foobar.docker.io " ,
69
+ storeURL : "https://foobar.example.com :2376" ,
70
+ readURL : "https://foobar.example.com " ,
71
71
},
72
72
{
73
73
doc : "stored as https, retrieved without scheme" ,
74
- storeURL : "https://foobar.docker.io :2376" ,
75
- readURL : "foobar.docker.io " ,
74
+ storeURL : "https://foobar.example.com :2376" ,
75
+ readURL : "foobar.example.com " ,
76
76
},
77
77
{
78
78
doc : "stored with path, retrieved without" ,
79
- storeURL : "https://foobar.docker.io :1234/one/two" ,
80
- readURL : "https://foobar.docker.io :1234" ,
79
+ storeURL : "https://foobar.example.com :1234/one/two" ,
80
+ readURL : "https://foobar.example.com :1234" ,
81
81
},
82
82
}
83
83
@@ -124,35 +124,35 @@ func TestOSXKeychainHelperRetrieveStrict(t *testing.T) {
124
124
}{
125
125
{
126
126
doc : "stored as https, retrieved using http" ,
127
- storeURL : "https://foobar.docker.io :2376" ,
128
- readURL : "http://foobar.docker.io :2376" ,
127
+ storeURL : "https://foobar.example.com :2376" ,
128
+ readURL : "http://foobar.example.com :2376" ,
129
129
},
130
130
{
131
131
doc : "stored as http, retrieved using https" ,
132
- storeURL : "http://foobar.docker.io :2376" ,
133
- readURL : "https://foobar.docker.io :2376" ,
132
+ storeURL : "http://foobar.example.com :2376" ,
133
+ readURL : "https://foobar.example.com :2376" ,
134
134
},
135
135
{
136
136
// stored as http, retrieved without a scheme specified (hence, using the default https://)
137
137
doc : "stored as http, retrieved without scheme" ,
138
- storeURL : "http://foobar.docker.io " ,
139
- readURL : "foobar.docker.io :5678" ,
138
+ storeURL : "http://foobar.example.com " ,
139
+ readURL : "foobar.example.com :5678" ,
140
140
},
141
141
{
142
142
doc : "non-matching ports" ,
143
- storeURL : "https://foobar.docker.io :1234" ,
144
- readURL : "https://foobar.docker.io :5678" ,
143
+ storeURL : "https://foobar.example.com :1234" ,
144
+ readURL : "https://foobar.example.com :5678" ,
145
145
},
146
146
// TODO: is this desired behavior? The other way round does work
147
147
// {
148
148
// doc: "non-matching ports (stored without port)",
149
- // storeURL: "https://foobar.docker.io ",
150
- // readURL: "https://foobar.docker.io :5678",
149
+ // storeURL: "https://foobar.example.com ",
150
+ // readURL: "https://foobar.example.com :5678",
151
151
// },
152
152
{
153
153
doc : "non-matching paths" ,
154
- storeURL : "https://foobar.docker.io :1234/one/two" ,
155
- readURL : "https://foobar.docker.io :1234/five/six" ,
154
+ storeURL : "https://foobar.example.com :1234/one/two" ,
155
+ readURL : "https://foobar.example.com :1234/five/six" ,
156
156
},
157
157
}
158
158
@@ -195,14 +195,14 @@ func TestOSXKeychainHelperStoreRetrieve(t *testing.T) {
195
195
tests := []struct {
196
196
url string
197
197
}{
198
- {url : "foobar.docker.io " },
199
- {url : "foobar.docker.io :2376" },
200
- {url : "//foobar.docker.io :2376" },
201
- {url : "https://foobar.docker.io :2376" },
202
- {url : "http://foobar.docker.io :2376" },
203
- {url : "https://foobar.docker.io :2376/some/path" },
204
- {url : "https://foobar.docker.io :2376/some/other/path" },
205
- {url : "https://foobar.docker.io :2376/some/other/path?foo=bar" },
198
+ {url : "foobar.example.com " },
199
+ {url : "foobar.example.com :2376" },
200
+ {url : "//foobar.example.com :2376" },
201
+ {url : "https://foobar.example.com :2376" },
202
+ {url : "http://foobar.example.com :2376" },
203
+ {url : "https://foobar.example.com :2376/some/path" },
204
+ {url : "https://foobar.example.com :2376/some/other/path" },
205
+ {url : "https://foobar.example.com :2376/some/other/path?foo=bar" },
206
206
}
207
207
208
208
helper := Osxkeychain {}
0 commit comments