@@ -10,12 +10,12 @@ import (
1010
1111func TestWinCredHelper (t * testing.T ) {
1212 creds := & credentials.Credentials {
13- ServerURL : "https://foobar.docker.io :2376/v1" ,
13+ ServerURL : "https://foobar.example.com :2376/v1" ,
1414 Username : "foobar" ,
1515 Secret : "foobarbaz" ,
1616 }
1717 creds1 := & credentials.Credentials {
18- ServerURL : "https://foobar.docker.io :2376/v2" ,
18+ ServerURL : "https://foobar.example.com :2376/v2" ,
1919 Username : "foobarbaz" ,
2020 Secret : "foobar" ,
2121 }
@@ -95,13 +95,13 @@ func TestWinCredHelperRetrieveAliases(t *testing.T) {
9595 readURL string
9696 }{
9797 // 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 " },
9999
100100 // stored as https, retrieved without scheme
101- {"https://foobar.docker.io " , "foobar.docker.io " },
101+ {"https://foobar.example.com " , "foobar.example.com " },
102102
103103 // 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 " },
105105 }
106106
107107 helper := Wincred {}
@@ -137,22 +137,22 @@ func TestWinCredHelperRetrieveStrict(t *testing.T) {
137137 readURL string
138138 }{
139139 // 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" },
141141
142142 // 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" },
144144
145145 // 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" },
147147
148148 // 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" },
150150
151151 // 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"},
153153
154154 // 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" },
156156 }
157157
158158 helper := Wincred {}
@@ -186,14 +186,14 @@ func TestWinCredHelperStoreRetrieve(t *testing.T) {
186186 tests := []struct {
187187 url string
188188 }{
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" },
197197 }
198198
199199 helper := Wincred {}
0 commit comments