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