@@ -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
}
@@ -95,13 +95,13 @@ func TestWinCredHelperRetrieveAliases(t *testing.T) {
95
95
readURL string
96
96
}{
97
97
// stored with port, retrieved without
98
- {"https://foobar.docker.io :2376" , "https://foobar.docker.io " },
98
+ {"https://foobar.example.com :2376" , "https://foobar.example.com " },
99
99
100
100
// stored as https, retrieved without scheme
101
- {"https://foobar.docker.io " , "foobar.docker.io " },
101
+ {"https://foobar.example.com " , "foobar.example.com " },
102
102
103
103
// stored with path, retrieved without
104
- {"https://foobar.docker.io /one/two" , "https://foobar.docker.io " },
104
+ {"https://foobar.example.com /one/two" , "https://foobar.example.com " },
105
105
}
106
106
107
107
helper := Wincred {}
@@ -137,22 +137,24 @@ func TestWinCredHelperRetrieveStrict(t *testing.T) {
137
137
readURL string
138
138
}{
139
139
// stored as https, retrieved using http
140
- {"https://foobar.docker.io :2376" , "http://foobar.docker.io :2376" },
140
+ {"https://foobar.example.com :2376" , "http://foobar.example.com :2376" },
141
141
142
142
// stored as http, retrieved using https
143
- {"http://foobar.docker.io :2376" , "https://foobar.docker.io :2376" },
143
+ {"http://foobar.example.com :2376" , "https://foobar.example.com :2376" },
144
144
145
145
// same: stored as http, retrieved without a scheme specified (hence, using the default https://)
146
- {"http://foobar.docker.io " , "foobar.docker.io :5678" },
146
+ {"http://foobar.example.com " , "foobar.example.com :5678" },
147
147
148
148
// non-matching ports
149
- {"https://foobar.docker.io :1234" , "https://foobar.docker.io :5678" },
149
+ {"https://foobar.example.com :1234" , "https://foobar.example.com :5678" },
150
150
151
- // non-matching ports TODO is this desired behavior? The other way round does work
152
- //{"https://foobar.docker.io", "https://foobar.docker.io:5678"},
151
+ // non-matching ports
152
+ //
153
+ // TODO: is this desired behavior? The other way round does work
154
+ // {"https://foobar.example.com", "https://foobar.example.com:5678"},
153
155
154
156
// non-matching paths
155
- {"https://foobar.docker.io :1234/one/two" , "https://foobar.docker.io :1234/five/six" },
157
+ {"https://foobar.example.com :1234/one/two" , "https://foobar.example.com :1234/five/six" },
156
158
}
157
159
158
160
helper := Wincred {}
@@ -186,14 +188,14 @@ func TestWinCredHelperStoreRetrieve(t *testing.T) {
186
188
tests := []struct {
187
189
url string
188
190
}{
189
- {url : "foobar.docker.io " },
190
- {url : "foobar.docker.io :2376" },
191
- {url : "//foobar.docker.io :2376" },
192
- {url : "https://foobar.docker.io :2376" },
193
- {url : "http://foobar.docker.io :2376" },
194
- {url : "https://foobar.docker.io :2376/some/path" },
195
- {url : "https://foobar.docker.io :2376/some/other/path" },
196
- {url : "https://foobar.docker.io :2376/some/other/path?foo=bar" },
191
+ {url : "foobar.example.com " },
192
+ {url : "foobar.example.com :2376" },
193
+ {url : "//foobar.example.com :2376" },
194
+ {url : "https://foobar.example.com :2376" },
195
+ {url : "http://foobar.example.com :2376" },
196
+ {url : "https://foobar.example.com :2376/some/path" },
197
+ {url : "https://foobar.example.com :2376/some/other/path" },
198
+ {url : "https://foobar.example.com :2376/some/other/path?foo=bar" },
197
199
}
198
200
199
201
helper := Wincred {}
0 commit comments