@@ -10,12 +10,12 @@ import (
10
10
11
11
func TestWinCredHelper (t * testing.T ) {
12
12
creds := & credentials.Credentials {
13
- ServerURL : "https://foobar.docker.io :2376/v1" ,
13
+ ServerURL : "https://foobar.example.com :2376/v1" ,
14
14
Username : "foobar" ,
15
15
Secret : "foobarbaz" ,
16
16
}
17
17
creds1 := & credentials.Credentials {
18
- ServerURL : "https://foobar.docker.io :2376/v2" ,
18
+ ServerURL : "https://foobar.example.com :2376/v2" ,
19
19
Username : "foobarbaz" ,
20
20
Secret : "foobar" ,
21
21
}
@@ -97,18 +97,18 @@ func TestWinCredHelperRetrieveAliases(t *testing.T) {
97
97
}{
98
98
{
99
99
doc : "stored with port, retrieved without" ,
100
- storeURL : "https://foobar.docker.io :2376" ,
101
- readURL : "https://foobar.docker.io " ,
100
+ storeURL : "https://foobar.example.com :2376" ,
101
+ readURL : "https://foobar.example.com " ,
102
102
},
103
103
{
104
104
doc : "stored as https, retrieved without scheme" ,
105
- storeURL : "https://foobar.docker.io " ,
106
- readURL : "foobar.docker.io " ,
105
+ storeURL : "https://foobar.example.com " ,
106
+ readURL : "foobar.example.com " ,
107
107
},
108
108
{
109
109
doc : "stored with path, retrieved without" ,
110
- storeURL : "https://foobar.docker.io /one/two" ,
111
- readURL : "https://foobar.docker.io " ,
110
+ storeURL : "https://foobar.example.com /one/two" ,
111
+ readURL : "https://foobar.example.com " ,
112
112
},
113
113
}
114
114
@@ -155,35 +155,35 @@ func TestWinCredHelperRetrieveStrict(t *testing.T) {
155
155
}{
156
156
{
157
157
doc : "stored as https, retrieved using http" ,
158
- storeURL : "https://foobar.docker.io :2376" ,
159
- readURL : "http://foobar.docker.io :2376" ,
158
+ storeURL : "https://foobar.example.com :2376" ,
159
+ readURL : "http://foobar.example.com :2376" ,
160
160
},
161
161
{
162
162
doc : "stored as http, retrieved using https" ,
163
- storeURL : "http://foobar.docker.io :2376" ,
164
- readURL : "https://foobar.docker.io :2376" ,
163
+ storeURL : "http://foobar.example.com :2376" ,
164
+ readURL : "https://foobar.example.com :2376" ,
165
165
},
166
166
{
167
167
// stored as http, retrieved without a scheme specified (hence, using the default https://)
168
168
doc : "stored as http, retrieved without scheme" ,
169
- storeURL : "http://foobar.docker.io " ,
170
- readURL : "foobar.docker.io :5678" ,
169
+ storeURL : "http://foobar.example.com " ,
170
+ readURL : "foobar.example.com :5678" ,
171
171
},
172
172
{
173
173
doc : "non-matching ports" ,
174
- storeURL : "https://foobar.docker.io :1234" ,
175
- readURL : "https://foobar.docker.io :5678" ,
174
+ storeURL : "https://foobar.example.com :1234" ,
175
+ readURL : "https://foobar.example.com :5678" ,
176
176
},
177
177
// TODO: is this desired behavior? The other way round does work
178
178
// {
179
179
// doc: "non-matching ports (stored without port)",
180
- // storeURL: "https://foobar.docker.io ",
181
- // readURL: "https://foobar.docker.io :5678",
180
+ // storeURL: "https://foobar.example.com ",
181
+ // readURL: "https://foobar.example.com :5678",
182
182
// },
183
183
{
184
184
doc : "non-matching paths" ,
185
- storeURL : "https://foobar.docker.io :1234/one/two" ,
186
- readURL : "https://foobar.docker.io :1234/five/six" ,
185
+ storeURL : "https://foobar.example.com :1234/one/two" ,
186
+ readURL : "https://foobar.example.com :1234/five/six" ,
187
187
},
188
188
}
189
189
@@ -226,14 +226,14 @@ func TestWinCredHelperStoreRetrieve(t *testing.T) {
226
226
tests := []struct {
227
227
url string
228
228
}{
229
- {url : "foobar.docker.io " },
230
- {url : "foobar.docker.io :2376" },
231
- {url : "//foobar.docker.io :2376" },
232
- {url : "https://foobar.docker.io :2376" },
233
- {url : "http://foobar.docker.io :2376" },
234
- {url : "https://foobar.docker.io :2376/some/path" },
235
- {url : "https://foobar.docker.io :2376/some/other/path" },
236
- {url : "https://foobar.docker.io :2376/some/other/path?foo=bar" },
229
+ {url : "foobar.example.com " },
230
+ {url : "foobar.example.com :2376" },
231
+ {url : "//foobar.example.com :2376" },
232
+ {url : "https://foobar.example.com :2376" },
233
+ {url : "http://foobar.example.com :2376" },
234
+ {url : "https://foobar.example.com :2376/some/path" },
235
+ {url : "https://foobar.example.com :2376/some/other/path" },
236
+ {url : "https://foobar.example.com :2376/some/other/path?foo=bar" },
237
237
}
238
238
239
239
helper := Wincred {}
0 commit comments