@@ -11,12 +11,12 @@ import (
11
11
12
12
func TestOSXKeychainHelper (t * testing.T ) {
13
13
creds := & credentials.Credentials {
14
- ServerURL : "https://foobar.docker.io :2376/v1" ,
14
+ ServerURL : "https://foobar.example.com :2376/v1" ,
15
15
Username : "foobar" ,
16
16
Secret : "foobarbaz" ,
17
17
}
18
18
creds1 := & credentials.Credentials {
19
- ServerURL : "https://foobar.docker.io :2376/v2" ,
19
+ ServerURL : "https://foobar.example.com :2376/v2" ,
20
20
Username : "foobarbaz" ,
21
21
Secret : "foobar" ,
22
22
}
@@ -68,18 +68,18 @@ func TestOSXKeychainHelperRetrieveAliases(t *testing.T) {
68
68
}{
69
69
{
70
70
doc : "stored with port, retrieved without" ,
71
- storeURL : "https://foobar.docker.io :2376" ,
72
- readURL : "https://foobar.docker.io " ,
71
+ storeURL : "https://foobar.example.com :2376" ,
72
+ readURL : "https://foobar.example.com " ,
73
73
},
74
74
{
75
75
doc : "stored as https, retrieved without scheme" ,
76
- storeURL : "https://foobar.docker.io :2376" ,
77
- readURL : "foobar.docker.io " ,
76
+ storeURL : "https://foobar.example.com :2376" ,
77
+ readURL : "foobar.example.com " ,
78
78
},
79
79
{
80
80
doc : "stored with path, retrieved without" ,
81
- storeURL : "https://foobar.docker.io :1234/one/two" ,
82
- readURL : "https://foobar.docker.io :1234" ,
81
+ storeURL : "https://foobar.example.com :1234/one/two" ,
82
+ readURL : "https://foobar.example.com :1234" ,
83
83
},
84
84
}
85
85
@@ -126,35 +126,35 @@ func TestOSXKeychainHelperRetrieveStrict(t *testing.T) {
126
126
}{
127
127
{
128
128
doc : "stored as https, retrieved using http" ,
129
- storeURL : "https://foobar.docker.io :2376" ,
130
- readURL : "http://foobar.docker.io :2376" ,
129
+ storeURL : "https://foobar.example.com :2376" ,
130
+ readURL : "http://foobar.example.com :2376" ,
131
131
},
132
132
{
133
133
doc : "stored as http, retrieved using https" ,
134
- storeURL : "http://foobar.docker.io :2376" ,
135
- readURL : "https://foobar.docker.io :2376" ,
134
+ storeURL : "http://foobar.example.com :2376" ,
135
+ readURL : "https://foobar.example.com :2376" ,
136
136
},
137
137
{
138
138
// stored as http, retrieved without a scheme specified (hence, using the default https://)
139
139
doc : "stored as http, retrieved without scheme" ,
140
- storeURL : "http://foobar.docker.io " ,
141
- readURL : "foobar.docker.io :5678" ,
140
+ storeURL : "http://foobar.example.com " ,
141
+ readURL : "foobar.example.com :5678" ,
142
142
},
143
143
{
144
144
doc : "non-matching ports" ,
145
- storeURL : "https://foobar.docker.io :1234" ,
146
- readURL : "https://foobar.docker.io :5678" ,
145
+ storeURL : "https://foobar.example.com :1234" ,
146
+ readURL : "https://foobar.example.com :5678" ,
147
147
},
148
148
// TODO: is this desired behavior? The other way round does work
149
149
// {
150
150
// doc: "non-matching ports (stored without port)",
151
- // storeURL: "https://foobar.docker.io ",
152
- // readURL: "https://foobar.docker.io :5678",
151
+ // storeURL: "https://foobar.example.com ",
152
+ // readURL: "https://foobar.example.com :5678",
153
153
// },
154
154
{
155
155
doc : "non-matching paths" ,
156
- storeURL : "https://foobar.docker.io :1234/one/two" ,
157
- readURL : "https://foobar.docker.io :1234/five/six" ,
156
+ storeURL : "https://foobar.example.com :1234/one/two" ,
157
+ readURL : "https://foobar.example.com :1234/five/six" ,
158
158
},
159
159
}
160
160
@@ -197,14 +197,14 @@ func TestOSXKeychainHelperStoreRetrieve(t *testing.T) {
197
197
tests := []struct {
198
198
url string
199
199
}{
200
- {url : "foobar.docker.io " },
201
- {url : "foobar.docker.io :2376" },
202
- {url : "//foobar.docker.io :2376" },
203
- {url : "https://foobar.docker.io :2376" },
204
- {url : "http://foobar.docker.io :2376" },
205
- {url : "https://foobar.docker.io :2376/some/path" },
206
- {url : "https://foobar.docker.io :2376/some/other/path" },
207
- {url : "https://foobar.docker.io :2376/some/other/path?foo=bar" },
200
+ {url : "foobar.example.com " },
201
+ {url : "foobar.example.com :2376" },
202
+ {url : "//foobar.example.com :2376" },
203
+ {url : "https://foobar.example.com :2376" },
204
+ {url : "http://foobar.example.com :2376" },
205
+ {url : "https://foobar.example.com :2376/some/path" },
206
+ {url : "https://foobar.example.com :2376/some/other/path" },
207
+ {url : "https://foobar.example.com :2376/some/other/path?foo=bar" },
208
208
}
209
209
210
210
helper := Osxkeychain {}
0 commit comments