@@ -23,13 +23,15 @@ import (
2323 "github.com/go-test/deep"
2424)
2525
26+ const (
27+ apiKeyID = "API-KEY-ID" //nolint:gosec // ID and not an actual key
28+ ipAddress = "IP-ADDRESS"
29+ )
30+
2631func TestAccessListAPIKeys_List (t * testing.T ) {
2732 client , mux , teardown := setup ()
2833 defer teardown ()
2934
30- orgID := "ORG-ID"
31- apiKeyID := "API-KEY-ID"
32-
3335 mux .HandleFunc (fmt .Sprintf ("/" + accessListAPIKeysPath , orgID , apiKeyID ), func (w http.ResponseWriter , r * http.Request ) {
3436 testMethod (t , r , http .MethodGet )
3537 fmt .Fprint (w , `{
@@ -127,10 +129,6 @@ func TestAccessListAPIKeys_Get(t *testing.T) {
127129 client , mux , teardown := setup ()
128130 defer teardown ()
129131
130- orgID := "ORG-ID"
131- apiKeyID := "API-KEY-ID"
132- ipAddress := "IP-ADDRESS"
133-
134132 mux .HandleFunc (fmt .Sprintf ("/" + accessListAPIKeysPath + "/%s" , orgID , apiKeyID , ipAddress ), func (w http.ResponseWriter , r * http.Request ) {
135133 testMethod (t , r , http .MethodGet )
136134 fmt .Fprint (w , `{
@@ -174,9 +172,6 @@ func TestAccessListAPIKeys_Create(t *testing.T) {
174172 client , mux , teardown := setup ()
175173 defer teardown ()
176174
177- orgID := "ORG-ID"
178- apiKeyID := "API-KEY-ID"
179-
180175 createRequest := []* AccessListAPIKeysReq {
181176 {
182177 IPAddress : "77.54.32.11" ,
@@ -297,10 +292,6 @@ func TestAccessListAPIKeys_Delete(t *testing.T) {
297292 client , mux , teardown := setup ()
298293 defer teardown ()
299294
300- orgID := "ORG-ID"
301- apiKeyID := "API-KEY-ID"
302- ipAddress := "IP-ADDRESS"
303-
304295 mux .HandleFunc (fmt .Sprintf ("/" + accessListAPIKeysPath + "/%s" , orgID , apiKeyID , ipAddress ), func (w http.ResponseWriter , r * http.Request ) {
305296 testMethod (t , r , http .MethodDelete )
306297 })
0 commit comments