Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDP-252326: Remove Atlas Dependency Phase 3 #233

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ linters:
- gosec # Inspects source code for security problems [fast: false, auto-fix: false]
- gosimple # Linter for Go source code that specializes in simplifying a code [fast: false, auto-fix: false]
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false]
- ifshort # Checks that your code uses short syntax for if-statements whenever possible [fast: true, auto-fix: false]
- ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false]
- misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true]
- nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
Expand Down
2 changes: 1 addition & 1 deletion opsmngr/accesslist_api_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func TestAccessListAPIKeys_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/"+accessListAPIKeysPath+"/%s", orgID, apiKeyID, ipAddress), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/"+accessListAPIKeysPath+"/%s", orgID, apiKeyID, ipAddress), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
6 changes: 3 additions & 3 deletions opsmngr/agents_api_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestAgentsServiceOp_ListAgentAPIKeys(t *testing.T) {
t.Error("expected an error but got nil")
}

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agentapikeys", projectID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agentapikeys", projectID), func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `
[{
"_id" : "1",
Expand Down Expand Up @@ -114,7 +114,7 @@ func TestAgentsServiceOp_CreateAgentAPIKey(t *testing.T) {
t.Error("expected an error but got nil")
}

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agentapikeys", projectID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agentapikeys", projectID), func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"_id" : "1",
"createdBy" : "PUBLIC_API",
Expand Down Expand Up @@ -158,7 +158,7 @@ func TestAgentsServiceOp_DeleteAgentAPIKey(t *testing.T) {

agentAPIKey := "1"

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agentapikeys/%s", projectID, agentAPIKey), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agentapikeys/%s", projectID, agentAPIKey), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
8 changes: 4 additions & 4 deletions opsmngr/agents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestAgentsServiceOp_ListAgentLinks(t *testing.T) {
t.Error("expected an error but got nil")
}

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agents", projectID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agents", projectID), func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"results" :[],
"links": [
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestAgentsServiceOp_ListAgentsByType(t *testing.T) {
t.Error("expected an error but got nil")
}

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agents/%s", projectID, agentType), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agents/%s", projectID, agentType), func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"links" : [],
"results": [
Expand Down Expand Up @@ -163,7 +163,7 @@ func TestAgentsServiceOp_GlobalVersions(t *testing.T) {

defer teardown()

mux.HandleFunc("/api/public/v1.0/softwareComponents/versions", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/api/public/v1.0/softwareComponents/versions", func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"automationVersion": "10.14.0.6304",
"automationMinimumVersion": "10.2.17.5964",
Expand Down Expand Up @@ -212,7 +212,7 @@ func TestAgentsServiceOp_ProjectVersions(t *testing.T) {
t.Error("expected an error but got nil")
}

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agents/versions", projectID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/agents/versions", projectID), func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"count": 0,
"entries": [],
Expand Down
2 changes: 1 addition & 1 deletion opsmngr/alert_configurations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ func TestAlertConfiguration_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/alertConfigs/%s", projectID, alertConfigID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/alertConfigs/%s", projectID, alertConfigID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/blockstore_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func TestBlockstoreConfigServiceOp_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/snapshot/mongoConfigs/%s", ID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/snapshot/mongoConfigs/%s", ID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/clusters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestClusters_ListAll(t *testing.T) {

defer teardown()

mux.HandleFunc("/api/public/v1.0/clusters", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/api/public/v1.0/clusters", func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprintf(w, `{
"results": [
{
Expand Down
2 changes: 1 addition & 1 deletion opsmngr/continuous_snapshots_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func TestContinuousSnapshots_Delete(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/groups/%s/clusters/%s/snapshots/%s", projectID, clusterName, snapshotID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/daemon_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func TestDaemonConfigServiceOp_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/daemon/configs/%s", ID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/daemon/configs/%s", ID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/deployments_hosts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ func TestDeployments_StopMonitoring(t *testing.T) {
hostID := "22"
path := fmt.Sprintf("/api/public/v1.0/groups/%s/hosts/%s", projectID, hostID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/file_system_store_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func TestFileSystemStoreConfigServiceOp_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/snapshot/fileSystemConfigs/%s", ID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/snapshot/fileSystemConfigs/%s", ID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
6 changes: 3 additions & 3 deletions opsmngr/global_alerts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestGlobalAlerts_List(t *testing.T) {

defer teardown()

mux.HandleFunc("/api/public/v1.0/globalAlerts", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/api/public/v1.0/globalAlerts", func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"links" : [],
"results" : [ {
Expand Down Expand Up @@ -108,7 +108,7 @@ func TestGlobalAlerts_Get(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/globalAlerts/%s", alertID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"alertConfigId" : "5730f5e1e4b030a9634a3f69",
"clusterId" : "572a00f2e4b051814b144e90",
Expand Down Expand Up @@ -165,7 +165,7 @@ func TestGlobalAlerts_Acknowledge(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/globalAlerts/%s", alertID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"alertConfigId" : "5730f5e1e4b030a9634a3f69",
"clusterId" : "572a00f2e4b051814b144e90",
Expand Down
2 changes: 1 addition & 1 deletion opsmngr/global_api_key_whitelists_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func TestWhitelistAPIKeys_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/whitelist/%s", accessListID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/whitelist/%s", accessListID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/global_api_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func TestAPIKeys_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/apiKeys/%s", apiKeyID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/apiKeys/%s", apiKeyID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/live_data_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestLiveMigration_DeleteConnection(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/orgs/%s/liveExport/migrationLink", orgID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
6 changes: 3 additions & 3 deletions opsmngr/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func TestLogs_Extend(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/groups/%s/logCollectionJobs/%s", projectID, ID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodPatch)
})

Expand All @@ -354,7 +354,7 @@ func TestLogs_Retry(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/groups/%s/logCollectionJobs/%s/retry", projectID, ID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodPut)
})

Expand All @@ -370,7 +370,7 @@ func TestLogs_Delete(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/groups/%s/logCollectionJobs/%s", projectID, ID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/maintenance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func TestMaintenanceWindows_Delete(t *testing.T) {

path := fmt.Sprintf("/api/public/v1.0/groups/%s/maintenanceWindows/%s", projectID, ID)

mux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(path, func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/oplog_store_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func TestOplogStoreConfigServiceOp_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/oplog/mongoConfigs/%s", ID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/admin/backup/oplog/mongoConfigs/%s", ID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
4 changes: 2 additions & 2 deletions opsmngr/opsmngr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func TestDo_noContent(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNoContent)
})

Expand All @@ -365,7 +365,7 @@ func TestClient_Do_httpError(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) {
http.Error(w, "Bad Request", http.StatusBadRequest)
})

Expand Down
8 changes: 4 additions & 4 deletions opsmngr/organization_api_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *APIKeysServiceOp) List(ctx context.Context, orgID string, listOptions *
// See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/org/get-one-org-api-key/
func (s *APIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID string) (*APIKey, *Response, error) {
if apiKeyID == "" {
return nil, nil, atlas.NewArgError("name", "must be set")
return nil, nil, NewArgError("name", "must be set")
}

basePath := fmt.Sprintf(apiKeysOrgPath, orgID)
Expand All @@ -99,7 +99,7 @@ func (s *APIKeysServiceOp) Get(ctx context.Context, orgID, apiKeyID string) (*AP
// See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/org/create-one-org-api-key/
func (s *APIKeysServiceOp) Create(ctx context.Context, orgID string, createRequest *APIKeyInput) (*APIKey, *Response, error) {
if createRequest == nil {
return nil, nil, atlas.NewArgError("createRequest", "cannot be nil")
return nil, nil, NewArgError("createRequest", "cannot be nil")
}

path := fmt.Sprintf(apiKeysOrgPath, orgID)
Expand All @@ -123,7 +123,7 @@ func (s *APIKeysServiceOp) Create(ctx context.Context, orgID string, createReque
// See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/org/update-one-org-api-key/
func (s *APIKeysServiceOp) Update(ctx context.Context, orgID, apiKeyID string, updateRequest *APIKeyInput) (*APIKey, *Response, error) {
if updateRequest == nil {
return nil, nil, atlas.NewArgError("updateRequest", "cannot be nil")
return nil, nil, NewArgError("updateRequest", "cannot be nil")
}

basePath := fmt.Sprintf(apiKeysOrgPath, orgID)
Expand All @@ -148,7 +148,7 @@ func (s *APIKeysServiceOp) Update(ctx context.Context, orgID, apiKeyID string, u
// See more: https://docs.opsmanager.mongodb.com/current/reference/api/api-keys/org/delete-one-api-key/
func (s *APIKeysServiceOp) Delete(ctx context.Context, orgID, apiKeyID string) (*Response, error) {
if apiKeyID == "" {
return nil, atlas.NewArgError("apiKeyID", "must be set")
return nil, NewArgError("apiKeyID", "must be set")
}

basePath := fmt.Sprintf(apiKeysOrgPath, orgID)
Expand Down
2 changes: 1 addition & 1 deletion opsmngr/organization_api_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func TestOrganizationAPIKeys_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/orgs/%s/apiKeys/%s", orgID, apiKeyID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/orgs/%s/apiKeys/%s", orgID, apiKeyID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/organization_invitations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func TestOrganizations_DeleteInvitation(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/orgs/%s/invites/%s", orgID, invitationID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/orgs/%s/invites/%s", orgID, invitationID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
4 changes: 2 additions & 2 deletions opsmngr/organizations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func TestOrganizations_Create(t *testing.T) {
Name: "OrgFoobar",
}

mux.HandleFunc("/api/public/v1.0/orgs", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/api/public/v1.0/orgs", func(w http.ResponseWriter, _ *http.Request) {
_, _ = fmt.Fprint(w, `{
"id": "5a0a1e7e0f2912c554081adc",
"links": [{
Expand Down Expand Up @@ -355,7 +355,7 @@ func TestOrganizations_Delete(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/orgs/%s", orgID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/orgs/%s", orgID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
4 changes: 2 additions & 2 deletions opsmngr/project_api_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestProjectAPIKeys_Assign(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/apiKeys/%s", projectID, apiKeyID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/apiKeys/%s", projectID, apiKeyID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodPatch)
})

Expand All @@ -132,7 +132,7 @@ func TestProjectAPIKeys_Unassign(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/apiKeys/%s", projectID, apiKeyID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/apiKeys/%s", projectID, apiKeyID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
2 changes: 1 addition & 1 deletion opsmngr/project_invitations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func TestProjects_DeleteInvitation(t *testing.T) {
client, mux, teardown := setup()
defer teardown()

mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/invites/%s", projectID, invitationID), func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc(fmt.Sprintf("/api/public/v1.0/groups/%s/invites/%s", projectID, invitationID), func(_ http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodDelete)
})

Expand Down
Loading