Skip to content

Commit f416db8

Browse files
author
Gustavo Bazan
authored
task: some store clean ups from ops manager references (#2714)
1 parent c94d94d commit f416db8

File tree

11 files changed

+18
-23
lines changed

11 files changed

+18
-23
lines changed

internal/cli/atlas/projects/describe_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestDescribe_Run(t *testing.T) {
3434
}
3535
mockStore.
3636
EXPECT().
37-
Project(gomock.Eq("5a0a1e7e0f2912c554080adc")).
37+
Project("5a0a1e7e0f2912c554080adc").
3838
Return(expected, nil).
3939
Times(1)
4040

internal/cli/default_setter_opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (opts *DefaultSetterOpts) ProjectExists(id string) bool {
148148
}
149149

150150
// AskProject will try to construct a select based on fetched projects.
151-
// If it fails or there are no projects to show we fallback to ask for project by ID.
151+
// If it fails or there are no projects to show we fall back to ask for project by ID.
152152
// If only one project, select it by default without prompting the user.
153153
func (opts *DefaultSetterOpts) AskProject() error {
154154
ids, names, err := opts.projects()

internal/kubernetes/operator/install.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ func (i *Install) Run(ctx context.Context, orgID string) error {
142142

143143
func (i *Install) ensureProject(orgID, projectName string) (*admin.Group, error) {
144144
project, err := i.atlasStore.ProjectByName(projectName)
145-
146145
if err == nil {
147146
return project, nil
148147
}

internal/prompt/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func NewProjectIDInput() survey.Prompt {
4343

4444
func AccessQuestions() []*survey.Question {
4545
helpLink := "Please provide your API keys. To create new keys, see the documentation: https://docs.atlas.mongodb.com/configure-api-access/"
46-
4746
q := []*survey.Question{
4847
{
4948
Name: "publicAPIKey",

internal/store/atlas/store.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ import (
3333
)
3434

3535
const (
36-
yes = "yes"
37-
responseHeaderTimeout = 1 * time.Minute
3836
telemetryTimeout = 1 * time.Second
3937
tlsHandshakeTimeout = 5 * time.Second
4038
timeout = 5 * time.Second

internal/store/default_mongodb_version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type DefaultVersionGetter interface {
2020
DefaultMongoDBVersion() (string, error)
2121
}
2222

23-
// CreateCloudProviderAccessRole encapsulates the logic to manage different cloud providers.
23+
// DefaultMongoDBVersion encapsulates the logic to manage different cloud providers.
2424
func (s *Store) DefaultMongoDBVersion() (string, error) {
2525
result, _, err := s.client.DefaultMongoDBMajorVersion.Get(s.ctx)
2626
return result, err

internal/store/live_migration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (s *Store) CreateValidation(groupID string, liveMigration *atlasv2.LiveMigr
4545
return result, err
4646
}
4747

48-
// StartLiveMigrationCutover encapsulate the logic to manage different cloud providers.
48+
// CreateLiveMigrationCutover encapsulate the logic to manage different cloud providers.
4949
func (s *Store) CreateLiveMigrationCutover(groupID, liveMigrationID string) error {
5050
if s.service == config.CloudGovService {
5151
return fmt.Errorf("%w: %s", errUnsupportedService, s.service)

internal/store/peering_connections.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ func (s *Store) PeeringConnections(projectID string, opts *atlas.ContainersListO
7474
return result.GetResults(), nil
7575
}
7676

77-
// PeeringConnections encapsulates the logic to manage different cloud providers.
77+
// PeeringConnection encapsulates the logic to manage different cloud providers.
7878
func (s *Store) PeeringConnection(projectID, peerID string) (*atlasv2.BaseNetworkPeeringConnectionSettings, error) {
7979
result, _, err := s.clientv2.NetworkPeeringApi.GetPeeringConnection(s.ctx, projectID, peerID).Execute()
8080
return result, err
8181
}
8282

83-
// DeletePrivateEndpoint encapsulates the logic to manage different cloud providers.
83+
// DeletePeeringConnection encapsulates the logic to manage different cloud providers.
8484
func (s *Store) DeletePeeringConnection(projectID, peerID string) error {
8585
_, _, err := s.clientv2.NetworkPeeringApi.DeletePeeringConnection(s.ctx, projectID, peerID).Execute()
8686
return err

internal/store/projects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (s *Store) ProjectUsers(projectID string, opts *atlas.ListOptions) ([]atlas
100100
return result, err
101101
}
102102

103-
// DeleteProject encapsulates the logic to manage different cloud providers.
103+
// DeleteUserFromProject encapsulates the logic to manage different cloud providers.
104104
func (s *Store) DeleteUserFromProject(projectID, userID string) error {
105105
_, err := s.client.Projects.RemoveUserFromProject(s.ctx, projectID, userID)
106106
return err

internal/store/serverless_instances.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (s *Store) ServerlessInstances(projectID string, listOps *atlas.ListOptions
5858
return result, err
5959
}
6060

61-
// ServerlessInstance encapsulates the logic to manage different cloud providers.
61+
// GetServerlessInstance encapsulates the logic to manage different cloud providers.
6262
func (s *Store) GetServerlessInstance(projectID, clusterName string) (*atlasv2.ServerlessInstanceDescription, error) {
6363
if s.service == config.CloudGovService {
6464
return nil, fmt.Errorf("%w: %s", errUnsupportedService, s.service)
@@ -67,7 +67,7 @@ func (s *Store) GetServerlessInstance(projectID, clusterName string) (*atlasv2.S
6767
return result, err
6868
}
6969

70-
// Used by Kubernetes v1 ServerlessInstance encapsulates the logic to manage different cloud providers.
70+
// ServerlessInstance Used by Kubernetes v1 ServerlessInstance encapsulates the logic to manage different cloud providers.
7171
func (s *Store) ServerlessInstance(projectID, clusterName string) (*atlas.Cluster, error) {
7272
if s.service == config.CloudGovService {
7373
return nil, fmt.Errorf("%w: %s", errUnsupportedService, s.service)

0 commit comments

Comments
 (0)