@@ -9,12 +9,12 @@ import (
9
9
10
10
func TestOSXKeychainHelper (t * testing.T ) {
11
11
creds := & credentials.Credentials {
12
- ServerURL : "https://foobar.docker.io :2376/v1" ,
12
+ ServerURL : "https://foobar.example.com :2376/v1" ,
13
13
Username : "foobar" ,
14
14
Secret : "foobarbaz" ,
15
15
}
16
16
creds1 := & credentials.Credentials {
17
- ServerURL : "https://foobar.docker.io :2376/v2" ,
17
+ ServerURL : "https://foobar.example.com :2376/v2" ,
18
18
Username : "foobarbaz" ,
19
19
Secret : "foobar" ,
20
20
}
@@ -64,13 +64,13 @@ func TestOSXKeychainHelperRetrieveAliases(t *testing.T) {
64
64
readURL string
65
65
}{
66
66
// stored with port, retrieved without
67
- {"https://foobar.docker.io :2376" , "https://foobar.docker.io " },
67
+ {"https://foobar.example.com :2376" , "https://foobar.example.com " },
68
68
69
69
// stored as https, retrieved without scheme
70
- {"https://foobar.docker.io :2376" , "foobar.docker.io " },
70
+ {"https://foobar.example.com :2376" , "foobar.example.com " },
71
71
72
72
// stored with path, retrieved without
73
- {"https://foobar.docker.io :1234/one/two" , "https://foobar.docker.io :1234" },
73
+ {"https://foobar.example.com :1234/one/two" , "https://foobar.example.com :1234" },
74
74
}
75
75
76
76
helper := Osxkeychain {}
@@ -106,22 +106,24 @@ func TestOSXKeychainHelperRetrieveStrict(t *testing.T) {
106
106
readURL string
107
107
}{
108
108
// stored as https, retrieved using http
109
- {"https://foobar.docker.io :2376" , "http://foobar.docker.io :2376" },
109
+ {"https://foobar.example.com :2376" , "http://foobar.example.com :2376" },
110
110
111
111
// stored as http, retrieved using https
112
- {"http://foobar.docker.io :2376" , "https://foobar.docker.io :2376" },
112
+ {"http://foobar.example.com :2376" , "https://foobar.example.com :2376" },
113
113
114
114
// same: stored as http, retrieved without a scheme specified (hence, using the default https://)
115
- {"http://foobar.docker.io " , "foobar.docker.io :5678" },
115
+ {"http://foobar.example.com " , "foobar.example.com :5678" },
116
116
117
117
// non-matching ports
118
- {"https://foobar.docker.io :1234" , "https://foobar.docker.io :5678" },
118
+ {"https://foobar.example.com :1234" , "https://foobar.example.com :5678" },
119
119
120
- // non-matching ports TODO is this desired behavior? The other way round does work
121
- //{"https://foobar.docker.io", "https://foobar.docker.io:5678"},
120
+ // non-matching ports
121
+ //
122
+ // TODO: is this desired behavior? The other way round does work
123
+ // {"https://foobar.example.com", "https://foobar.example.com:5678"},
122
124
123
125
// non-matching paths
124
- {"https://foobar.docker.io :1234/one/two" , "https://foobar.docker.io :1234/five/six" },
126
+ {"https://foobar.example.com :1234/one/two" , "https://foobar.example.com :1234/five/six" },
125
127
}
126
128
127
129
helper := Osxkeychain {}
@@ -155,14 +157,14 @@ func TestOSXKeychainHelperStoreRetrieve(t *testing.T) {
155
157
tests := []struct {
156
158
url string
157
159
}{
158
- {url : "foobar.docker.io " },
159
- {url : "foobar.docker.io :2376" },
160
- {url : "//foobar.docker.io :2376" },
161
- {url : "https://foobar.docker.io :2376" },
162
- {url : "http://foobar.docker.io :2376" },
163
- {url : "https://foobar.docker.io :2376/some/path" },
164
- {url : "https://foobar.docker.io :2376/some/other/path" },
165
- {url : "https://foobar.docker.io :2376/some/other/path?foo=bar" },
160
+ {url : "foobar.example.com " },
161
+ {url : "foobar.example.com :2376" },
162
+ {url : "//foobar.example.com :2376" },
163
+ {url : "https://foobar.example.com :2376" },
164
+ {url : "http://foobar.example.com :2376" },
165
+ {url : "https://foobar.example.com :2376/some/path" },
166
+ {url : "https://foobar.example.com :2376/some/other/path" },
167
+ {url : "https://foobar.example.com :2376/some/other/path?foo=bar" },
166
168
}
167
169
168
170
helper := Osxkeychain {}
0 commit comments