@@ -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,22 @@ 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
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"},
152
+ // {"https://foobar.example.com ", "https://foobar.example.com :5678"},
153
153
154
154
// non-matching paths
155
- {"https://foobar.docker.io :1234/one/two" , "https://foobar.docker.io :1234/five/six" },
155
+ {"https://foobar.example.com :1234/one/two" , "https://foobar.example.com :1234/five/six" },
156
156
}
157
157
158
158
helper := Wincred {}
@@ -186,14 +186,14 @@ func TestWinCredHelperStoreRetrieve(t *testing.T) {
186
186
tests := []struct {
187
187
url string
188
188
}{
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" },
189
+ {url : "foobar.example.com " },
190
+ {url : "foobar.example.com :2376" },
191
+ {url : "//foobar.example.com :2376" },
192
+ {url : "https://foobar.example.com :2376" },
193
+ {url : "http://foobar.example.com :2376" },
194
+ {url : "https://foobar.example.com :2376/some/path" },
195
+ {url : "https://foobar.example.com :2376/some/other/path" },
196
+ {url : "https://foobar.example.com :2376/some/other/path?foo=bar" },
197
197
}
198
198
199
199
helper := Wincred {}
0 commit comments