@@ -32,17 +32,17 @@ func TestValidateBasicConfig(t *testing.T) {
32
32
type testCase struct {
33
33
Description string
34
34
Input * BasicClientConfig
35
- Client HTTPClient
35
+ Client * http. Client
36
36
ExpectedErr error
37
37
ExpectedConfig * BasicClientConfig
38
38
}
39
39
40
40
allDefaultsCaseConfig := & BasicClientConfig {
41
- Address : "http://awesome-argus-hostname.io " ,
41
+ Address : "example.com " ,
42
42
Bucket : "bucket-name" ,
43
43
}
44
44
allDefinedCaseConfig := & BasicClientConfig {
45
- Address : "http://legit-argus-hostname.io " ,
45
+ Address : "example.com " ,
46
46
Bucket : "amazing-bucket" ,
47
47
}
48
48
@@ -57,22 +57,22 @@ func TestValidateBasicConfig(t *testing.T) {
57
57
{
58
58
Description : "No bucket" ,
59
59
Input : & BasicClientConfig {
60
- Address : "http://awesome-argus-hostname.io " ,
60
+ Address : "example.com " ,
61
61
},
62
62
ExpectedErr : ErrBucketEmpty ,
63
63
},
64
64
{
65
65
Description : "All default values" ,
66
66
Input : & BasicClientConfig {
67
- Address : "http://awesome-argus-hostname.io " ,
67
+ Address : "example.com " ,
68
68
Bucket : "bucket-name" ,
69
69
},
70
70
ExpectedConfig : allDefaultsCaseConfig ,
71
71
},
72
72
{
73
73
Description : "All defined" ,
74
74
Input : & BasicClientConfig {
75
- Address : "http://legit-argus-hostname.io " ,
75
+ Address : "example.com " ,
76
76
Bucket : "amazing-bucket" ,
77
77
},
78
78
ExpectedConfig : allDefinedCaseConfig ,
@@ -110,15 +110,15 @@ func TestSendRequest(t *testing.T) {
110
110
{
111
111
Description : "New Request fails" ,
112
112
Method : "what method?" ,
113
- URL : "http://argus-hostname.io " ,
113
+ URL : "example.com " ,
114
114
ExpectedErr : errNewRequestFailure ,
115
115
MockAuth : "" ,
116
116
MockError : nil ,
117
117
},
118
118
{
119
119
Description : "Auth acquirer fails" ,
120
120
Method : http .MethodGet ,
121
- URL : "http://argus-hostname.io " ,
121
+ URL : "example.com " ,
122
122
MockError : errFails ,
123
123
MockAuth : "" ,
124
124
ExpectedErr : ErrAuthAcquirerFailure ,
@@ -134,7 +134,7 @@ func TestSendRequest(t *testing.T) {
134
134
{
135
135
Description : "Happy path" ,
136
136
Method : http .MethodPut ,
137
- URL : "http://argus-hostname.io " ,
137
+ URL : "example.com " ,
138
138
Body : []byte ("testing" ),
139
139
Owner : "HappyCaseOwner" ,
140
140
ExpectedResponse : response {
@@ -147,7 +147,7 @@ func TestSendRequest(t *testing.T) {
147
147
{
148
148
Description : "Happy path with default http client" ,
149
149
Method : http .MethodPut ,
150
- URL : "http://argus-hostname.io " ,
150
+ URL : "example.com " ,
151
151
Body : []byte ("testing" ),
152
152
Owner : "HappyCaseOwner" ,
153
153
ExpectedResponse : response {
@@ -176,13 +176,13 @@ func TestSendRequest(t *testing.T) {
176
176
server := httptest .NewServer (echoHandler )
177
177
defer server .Close ()
178
178
179
- var httpClient HTTPClient = server .Client ()
179
+ httpClient : = server .Client ()
180
180
if tc .NilHTTPClient {
181
181
httpClient = nil
182
182
}
183
183
184
184
client , err := NewBasicClient (BasicClientConfig {
185
- Address : "http://argus-hostname.io " ,
185
+ Address : "example.com " ,
186
186
Bucket : "bucket-name" ,
187
187
}, httpClient )
188
188
0 commit comments