From f52ef9473ed9375528d609d0e5fb7e26d0b1d10c Mon Sep 17 00:00:00 2001 From: Gustavo Bazan Date: Wed, 13 Mar 2024 12:04:49 +0000 Subject: [PATCH] task: delete dead code used by mongocli (#2766) --- .github/workflows/code-health.yml | 16 -- Makefile | 8 +- internal/cli/atlas/deployments/logs.go | 3 +- .../deployments/search/indexes/create.go | 3 - .../deployments/search/indexes/create_test.go | 5 +- .../deployments/search/indexes/delete_test.go | 6 - .../search/indexes/describe_test.go | 3 - internal/cli/atlas/setup/setup_cmd.go | 1 - internal/config/profile.go | 10 - internal/config/profile_integration_test.go | 184 ------------------ internal/convert/errors.go | 22 --- internal/decryption/decryption.go | 14 -- internal/flag/flags.go | 3 - internal/homebrew/homebrew.go | 2 +- internal/kubernetes/operator/install.go | 7 - internal/store/store.go | 33 +--- internal/store/store_test.go | 11 -- internal/usage/usage.go | 1 - internal/validate/validate.go | 8 - internal/watchers/cluster.go | 11 -- test/e2e/decryption/decryption.go | 4 - tools/genevergreen/generate/generate.go | 4 +- .../astparsing/astparsing.go | 7 +- 23 files changed, 14 insertions(+), 352 deletions(-) delete mode 100644 internal/config/profile_integration_test.go delete mode 100644 internal/convert/errors.go diff --git a/.github/workflows/code-health.yml b/.github/workflows/code-health.yml index 2c14fd84f0..08ac1cf7b0 100644 --- a/.github/workflows/code-health.yml +++ b/.github/workflows/code-health.yml @@ -46,22 +46,6 @@ jobs: with: paths: unit-tests.xml if: always() && matrix.os == 'ubuntu-latest' - integration-tests: - env: - COVERAGE: coverage.out - TEST_CMD: gotestsum --format standard-verbose -- - UNIT_TAGS: unit - INTEGRATION_TAGS: integration - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - - run: go install gotest.tools/gotestsum@latest - - run: make integration-test fuzz-tests: env: COVERAGE: coverage.out diff --git a/Makefile b/Makefile index 25af93549b..035611d50c 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,6 @@ DEBUG_FLAGS=all=-N -l TEST_CMD?=go test UNIT_TAGS?=unit -INTEGRATION_TAGS?=integration E2E_TAGS?=e2e E2E_TIMEOUT?=60m E2E_PARALLEL?=1 @@ -72,7 +71,7 @@ fmt-all: ### Format all go files with goimports and gofmt find . -name "*.go" -not -path "./vendor/*" -not -path "./internal/mocks" -exec goimports -l -w "{}" \; .PHONY: test -test: unit-test integration-test fuzz-normalizer-test +test: unit-test fuzz-normalizer-test .PHONY: lint lint: ## Run linter @@ -128,11 +127,6 @@ e2e-test: build ## Run E2E tests # the target assumes the MCLI_* environment variables are exported $(TEST_CMD) -v -p 1 -parallel $(E2E_PARALLEL) -timeout $(E2E_TIMEOUT) -tags="$(E2E_TAGS)" ./test/e2e... $(E2E_EXTRA_ARGS) -.PHONY: integration-test -integration-test: ## Run integration tests - @echo "==> Running integration tests..." - $(TEST_CMD) --tags="$(INTEGRATION_TAGS)" -count=1 ./internal... - .PHONY: fuzz-normalizer-test fuzz-normalizer-test: ## Run fuzz test @echo "==> Running fuzz test..." diff --git a/internal/cli/atlas/deployments/logs.go b/internal/cli/atlas/deployments/logs.go index 440284c6c7..dce0391858 100644 --- a/internal/cli/atlas/deployments/logs.go +++ b/internal/cli/atlas/deployments/logs.go @@ -49,8 +49,7 @@ type DownloadOpts struct { } var ( - ErrAtlasNotSupported = errors.New("atlas deployments are not supported") - errEmptyLog = errors.New("log is empty") + errEmptyLog = errors.New("log is empty") ) func (opts *DownloadOpts) initStore(ctx context.Context) func() error { diff --git a/internal/cli/atlas/deployments/search/indexes/create.go b/internal/cli/atlas/deployments/search/indexes/create.go index e7f6fcd3a6..e722e0d0d9 100644 --- a/internal/cli/atlas/deployments/search/indexes/create.go +++ b/internal/cli/atlas/deployments/search/indexes/create.go @@ -37,14 +37,11 @@ import ( ) const ( - namePattern = "^[a-zA-Z0-9][a-zA-Z0-9-]*$" connectWaitSeconds = 10 createTemplate = "Search index created with ID: {{.IndexID}}\n" notFoundState = "NOT_FOUND" ) -var ErrNoDeploymentName = errors.New("deployment name is required for Atlas resources") -var ErrNotAuthenticated = errors.New("not authenticated, login first to create Atlas resources") var ErrSearchIndexDuplicated = errors.New("search index is duplicated") var ErrWatchNotAvailable = errors.New("watch is not available for Atlas resources") diff --git a/internal/cli/atlas/deployments/search/indexes/create_test.go b/internal/cli/atlas/deployments/search/indexes/create_test.go index 6f3c503c5f..af5169de2e 100644 --- a/internal/cli/atlas/deployments/search/indexes/create_test.go +++ b/internal/cli/atlas/deployments/search/indexes/create_test.go @@ -19,6 +19,7 @@ package indexes import ( "bytes" "context" + "errors" "testing" "github.com/golang/mock/gomock" @@ -43,7 +44,6 @@ const ( expectedLocalDeployment = "localDeployment1" expectedDB = "db1" expectedCollection = "col1" - local = "local" ) func TestCreate_RunLocal(t *testing.T) { @@ -270,8 +270,7 @@ func TestCreate_Duplicated(t *testing.T) { SearchIndexByName(ctx, index.Name, index.CollectionName). Return(indexWithID, nil). Times(1) - - if err := opts.Run(ctx); err == nil || err != ErrSearchIndexDuplicated { + if err := opts.Run(ctx); err == nil || !errors.Is(err, ErrSearchIndexDuplicated) { t.Fatalf("Run() unexpected error: %v", err) } } diff --git a/internal/cli/atlas/deployments/search/indexes/delete_test.go b/internal/cli/atlas/deployments/search/indexes/delete_test.go index f9dc1f72e2..4cf51cb8dc 100644 --- a/internal/cli/atlas/deployments/search/indexes/delete_test.go +++ b/internal/cli/atlas/deployments/search/indexes/delete_test.go @@ -37,10 +37,7 @@ func TestDelete_RunLocal(t *testing.T) { ctx := context.Background() const ( - expectedIndexName = "idx1" expectedLocalDeployment = "localDeployment1" - expectedDB = "db1" - expectedCollection = "col1" indexID = "1" ) @@ -117,10 +114,7 @@ func TestDelete_RunAtlas(t *testing.T) { ctx := context.Background() const ( - expectedIndexName = "idx1" expectedLocalDeployment = "localDeployment1" - expectedDB = "db1" - expectedCollection = "col1" indexID = "1" projectID = "1" ) diff --git a/internal/cli/atlas/deployments/search/indexes/describe_test.go b/internal/cli/atlas/deployments/search/indexes/describe_test.go index c4a4a411b4..da7e043c17 100644 --- a/internal/cli/atlas/deployments/search/indexes/describe_test.go +++ b/internal/cli/atlas/deployments/search/indexes/describe_test.go @@ -135,10 +135,7 @@ func TestDescribe_RunAtlas(t *testing.T) { ctx := context.Background() const ( - expectedIndexName = "idx1" expectedLocalDeployment = "localDeployment1" - expectedDB = "db1" - expectedCollection = "col1" ) deploymentTest := fixture.NewMockAtlasDeploymentOpts(ctrl, expectedLocalDeployment) diff --git a/internal/cli/atlas/setup/setup_cmd.go b/internal/cli/atlas/setup/setup_cmd.go index 125e0d008f..067d7393df 100644 --- a/internal/cli/atlas/setup/setup_cmd.go +++ b/internal/cli/atlas/setup/setup_cmd.go @@ -44,7 +44,6 @@ import ( ) const ( - labelKey = "Infrastructure Tool" DefaultAtlasTier = "M0" defaultAtlasGovTier = "M30" atlasAdmin = "atlasAdmin" diff --git a/internal/config/profile.go b/internal/config/profile.go index 23a8239d21..bd72c6c660 100644 --- a/internal/config/profile.go +++ b/internal/config/profile.go @@ -43,7 +43,6 @@ const ( DefaultProfile = "default" // DefaultProfile default CloudService = "cloud" // CloudService setting when using Atlas API CloudGovService = "cloudgov" // CloudGovService setting when using Atlas API for Government - JSON = "json" // JSON output format as json projectID = "project_id" orgID = "org_id" mongoShellPath = "mongosh_path" @@ -660,15 +659,6 @@ func (p *Profile) LoadAtlasCLIConfig(readEnvironmentVars bool) error { return p.load(readEnvironmentVars, AtlasCLIEnvPrefix) } -func LoadMongoCLIConfig() error { return Default().LoadMongoCLIConfig(true) } -func (p *Profile) LoadMongoCLIConfig(readEnvironmentVars bool) error { - if p.err != nil { - return p.err - } - viper.SetConfigName("config") - return p.load(readEnvironmentVars, MongoCLIEnvPrefix) -} - func hasMongoCLIEnvVars() bool { envVars := os.Environ() for _, v := range envVars { diff --git a/internal/config/profile_integration_test.go b/internal/config/profile_integration_test.go deleted file mode 100644 index 0c48e346fa..0000000000 --- a/internal/config/profile_integration_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2020 MongoDB Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build integration - -package config - -import ( - "path/filepath" - "testing" - - "github.com/spf13/afero" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -const ( - newProfileName = "newProfileName" - atlas = "atlas" -) - -func testProfile(profileContents string) *Profile { - fs := afero.NewMemMapFs() - testConfigDir, _ := filepath.Abs("test") - - p := &Profile{ - name: DefaultProfile, - configDir: testConfigDir, - fs: fs, - } - - if err := afero.WriteFile(fs, p.Filename(), []byte(profileContents), 0600); err != nil { - panic(err) - } - - return p -} - -func profileWithOneNonDefaultUser() *Profile { - const contents = ` -[atlas] - base_url = "http://base_url.com/" - ops_manager_skip_verify = "false" - org_id = "5cac6a2179358edabd12b572" -` - return testProfile(contents) -} - -func profileWithOneDefaultUserOneNonDefault() *Profile { - const contents = ` -[default] - base_url = "http://base_url.com/" - ops_manager_skip_verify = "false" - org_id = "5cac6a2179358edabd12b572" - profile_id = "5cac6a2179358edabd12b572" - -[atlas] - base_url = "http://atlas.com/" - ops_manager_skip_verify = "false" - org_id = "5cac6a2179358edabd12b572" -` - return testProfile(contents) -} - -func profileWithFullDescription() *Profile { - const contents = ` -[default] - base_url = "http://base_url.com/" - ops_manager_url = "http://om_url.com/" - ops_manager_ca_certificate = "/path/to/certificate" - ops_manager_skip_verify = "false" - public_api_key = "some_public_key" - private_api_key = "some_private_key" - org_id = "5cac6a2179358edabd12b572" - profile_id = "5cac6a2179358edabd12b572" - service = "cloud" -` - return testProfile(contents) -} - -func TestProfile_Get_FullProfile(t *testing.T) { - profile := profileWithFullDescription() - - require.NoError(t, profile.LoadMongoCLIConfig(false)) - - desc := profile.Map() - a := assert.New(t) - a.Equal("default", profile.Name()) - a.Len(desc, 9) - a.Equal("cloud", profile.Service()) - a.Equal("some_public_key", profile.PublicAPIKey()) - a.Equal("some_private_key", profile.PrivateAPIKey()) - a.Equal("http://om_url.com/", profile.OpsManagerURL()) -} - -func TestProfile_Get_Default(t *testing.T) { - profile := profileWithOneDefaultUserOneNonDefault() - require.NoError(t, profile.LoadMongoCLIConfig(false)) - desc := profile.Map() - a := assert.New(t) - a.Equal(DefaultProfile, profile.Name()) - a.Len(desc, 4) -} - -func TestProfile_Get_NonDefault(t *testing.T) { - profile := profileWithOneNonDefaultUser() - require.NoError(t, profile.SetName(atlas)) - - require.NoError(t, profile.LoadMongoCLIConfig(false)) - - desc := profile.Map() - - a := assert.New(t) - a.Equal(atlas, profile.Name(), "expected atlas Profile to be described") - a.Len(desc, 3) - a.Equal("5cac6a2179358edabd12b572", profile.OrgID(), "project id should match") - a.Empty(profile.ProjectID(), "project id should not be set") -} - -func TestProfile_Delete_NonDefault(t *testing.T) { - profile := profileWithOneDefaultUserOneNonDefault() - require.NoError(t, profile.LoadMongoCLIConfig(false)) - - require.NoError(t, profile.SetName(atlas)) - - require.NoError(t, profile.Delete()) - require.NoError(t, profile.LoadMongoCLIConfig(false)) - desc := profile.Map() - assert.Empty(t, desc, "Profile should have no properties") -} - -func TestProfile_Rename(t *testing.T) { - profile := profileWithOneDefaultUserOneNonDefault() - require.NoError(t, profile.SetName(DefaultProfile)) - - require.NoError(t, profile.LoadMongoCLIConfig(false)) - defaultDescription := profile.Map() - require.NoError(t, profile.Rename(newProfileName)) - require.NoError(t, profile.LoadMongoCLIConfig(false)) - require.NoError(t, profile.SetName(DefaultProfile)) - a := assert.New(t) - a.Empty(profile.Map()) - require.NoError(t, profile.SetName(newProfileName)) - descriptionAfterRename := profile.Map() - // after renaming, one Profile should exist - a.Equal(defaultDescription, descriptionAfterRename, "descriptions should be equal after renaming") -} - -func TestProfile_Rename_OverwriteExisting(t *testing.T) { - profile := profileWithOneDefaultUserOneNonDefault() - require.NoError(t, profile.SetName(DefaultProfile)) - - require.NoError(t, profile.LoadMongoCLIConfig(false)) - defaultDescription := profile.Map() - - require.NoError(t, profile.Rename(atlas)) - require.NoError(t, profile.LoadMongoCLIConfig(false)) - require.NoError(t, profile.SetName(atlas)) - descriptionAfterRename := profile.Map() - // after renaming, one Profile should exist - assert.Equal(t, defaultDescription, descriptionAfterRename, "descriptions should be equal after renaming") -} - -func TestProfile_Set(t *testing.T) { - profile := profileWithOneDefaultUserOneNonDefault() - require.NoError(t, profile.LoadMongoCLIConfig(false)) - - require.NoError(t, profile.SetName(DefaultProfile)) - - profile.Set(projectID, "newProjectId") - - assert.Equal(t, "newProjectId", profile.ProjectID(), "project id should be set to new value") -} diff --git a/internal/convert/errors.go b/internal/convert/errors.go deleted file mode 100644 index 59c1cf27da..0000000000 --- a/internal/convert/errors.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2022 MongoDB Inc -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package convert - -import "errors" - -var ( - ErrNoFeatureCompatibility = errors.New("no featureCompatibilityVersion available") - ErrInvalidConfig = errors.New("invalid config") -) diff --git a/internal/decryption/decryption.go b/internal/decryption/decryption.go index 57193dc19f..d9a0b8cc3a 100644 --- a/internal/decryption/decryption.go +++ b/internal/decryption/decryption.go @@ -47,20 +47,6 @@ func NewDecryption(options ...Option) *Decryption { return d } -func WithLocalOpts(fileName string) func(d *Decryption) { - return func(d *Decryption) { - d.opts.Local = &KeyProviderLocalOpts{ - KeyFileName: fileName, - } - } -} - -func WithKMIPOpts(opts *KeyProviderKMIPOpts) func(d *Decryption) { - return func(d *Decryption) { - d.opts.KMIP = opts - } -} - func WithAWSOpts(accessKey, secretAccessKey, sessionToken string) func(d *Decryption) { return func(d *Decryption) { d.opts.AWS = &KeyProviderAWSOpts{ diff --git a/internal/flag/flags.go b/internal/flag/flags.go index 7ed7d06477..daff5e7080 100644 --- a/internal/flag/flags.go +++ b/internal/flag/flags.go @@ -151,9 +151,7 @@ const ( Append = "append" // Append flag Privilege = "privilege" // Privilege flag InheritedRole = "inheritedRole" // InheritedRole flag - CollectionName = "collectionName" // CollectionName flag Database = "db" // Database flag - Unique = "unique" // Unique flag Sparse = "sparse" // Sparse flag TestBucket = "testBucket" // TestBucket flag Partition = "partition" // Partition flag @@ -187,7 +185,6 @@ const ( ServiceKey = "serviceKey" // ServiceKey flag WriteToken = "writeToken" // WriteToken flag ReadToken = "readToken" // ReadToken flag - Label = "label" // Label flag WriteConcern = "writeConcern" // WriteConcern flag ReadConcern = "readConcern" // ReadConcern flag DisableFailIndexKeyTooLong = "disableFailIndexKeyTooLong" // DisableFailIndexKeyTooLong flag diff --git a/internal/homebrew/homebrew.go b/internal/homebrew/homebrew.go index 18c9d496b1..cbf04ad553 100644 --- a/internal/homebrew/homebrew.go +++ b/internal/homebrew/homebrew.go @@ -45,7 +45,7 @@ func NewChecker(fileSystem afero.Fs) (*Checker, error) { } // IsHomebrew checks if the cli was installed with homebrew. -func (s Checker) IsHomebrew() bool { +func (s *Checker) IsHomebrew() bool { // Load from cache h, err := s.load() if h != nil && h.ExecutablePath != "" && h.FormulaPath != "" && err == nil { diff --git a/internal/kubernetes/operator/install.go b/internal/kubernetes/operator/install.go index 6a3d645596..219f95eb35 100644 --- a/internal/kubernetes/operator/install.go +++ b/internal/kubernetes/operator/install.go @@ -325,10 +325,3 @@ func NewInstall( version: version, } } - -func StringOrEmpty(s *string) string { - if s != nil { - return *s - } - return "" -} diff --git a/internal/store/store.go b/internal/store/store.go index f2cd02b0c8..64d148084d 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -35,7 +35,6 @@ import ( const ( telemetryTimeout = 1 * time.Second - tlsHandshakeTimeout = 5 * time.Second timeout = 5 * time.Second keepAlive = 30 * time.Second maxIdleConns = 5 @@ -48,15 +47,13 @@ const ( var errUnsupportedService = errors.New("unsupported service") type Store struct { - service string - baseURL string - caCertificate string - skipVerify bool - telemetry bool - username string - password string - accessToken *atlasauth.Token - client *atlas.Client + service string + baseURL string + telemetry bool + username string + password string + accessToken *atlasauth.Token + client *atlas.Client // Latest release of the autogenerated Atlas V2 API Client clientv2 *atlasv2.APIClient ctx context.Context @@ -162,22 +159,6 @@ func WithBaseURL(configURL string) Option { } } -// WithCACertificate enables the Store to use a custom CA certificate. -func WithCACertificate(caCertificate string) Option { - return func(s *Store) error { - s.caCertificate = caCertificate - return nil - } -} - -// SkipVerify skips CA certificate verification, use at your own risk. -func SkipVerify() Option { - return func(s *Store) error { - s.skipVerify = true - return nil - } -} - func Telemetry() Option { return func(s *Store) error { s.telemetry = true diff --git a/internal/store/store_test.go b/internal/store/store_test.go index 0a3e12d5bb..9c5ca8a265 100644 --- a/internal/store/store_test.go +++ b/internal/store/store_test.go @@ -80,17 +80,6 @@ func TestWithBaseURL(t *testing.T) { } } -func TestSkipVerify(t *testing.T) { - c, err := New(Service(config.CloudService), SkipVerify()) - if err != nil { - t.Fatalf("New() unexpected error: %v", err) - } - - if !c.skipVerify { - t.Error("New() skipVerify not set") - } -} - type testConfig struct { url string auth diff --git a/internal/usage/usage.go b/internal/usage/usage.go index 609c2faa72..0cac44a91b 100644 --- a/internal/usage/usage.go +++ b/internal/usage/usage.go @@ -136,7 +136,6 @@ dbName and collection are required only for built-in roles.` RoutingKey = "Routing key associated with your Splunk On-Call account." OrgNameFilter = "Organization name to perform a case-insensitive search for." OrgIncludeDeleted = "Flag that indictaes whether to include deleted organizations in the list. This option applies only to Ops Manager organizations. You can't return deleted Atlas or Cloud Manager organizations." - Label = "Array of tags to manage which backup jobs Ops Manager can assign to which blockstores." APIKeyDescription = "Description of the API key." AtlasAPIKeyDescription = APIKeyDescription + requiredForAtlas APIKeyRoles = "Role or roles that you want to assign to the API key. To assign more than one role, specify each role with a separate role flag or specify all of the roles as a comma-separated list using one role flag. To learn which values the CLI accepts, see the Items Enum for roles in the Atlas API spec: https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Programmatic-API-Keys/operation/createApiKey/." //nolint:gosec // This is just a message not a credential diff --git a/internal/validate/validate.go b/internal/validate/validate.go index 406c09c956..ff332bb477 100644 --- a/internal/validate/validate.go +++ b/internal/validate/validate.go @@ -150,14 +150,6 @@ To log out, run: %s auth logout`, ) } -func Token() error { - if t, err := config.Token(); t != nil { - return err - } - - return ErrMissingCredentials -} - func FlagInSlice(value, flag string, validValues []string) error { if slices.Contains(validValues, value) { return nil diff --git a/internal/watchers/cluster.go b/internal/watchers/cluster.go index dd2659ccef..5702101ab8 100644 --- a/internal/watchers/cluster.go +++ b/internal/watchers/cluster.go @@ -38,17 +38,6 @@ var ClusterCreated = &StateTransition{ EndState: pointer.Get(clusterIdle), } -var ClusterUpdated = &StateTransition{ - StartState: pointer.Get(clusterUpdating), - EndState: pointer.Get(clusterIdle), -} - -var ClusterUpgraded = &StateTransition{ - StartState: pointer.Get(clusterUpdating), - EndState: pointer.Get(clusterIdle), - RetryableErrorCodes: []string{clusterNotFound}, -} - type AtlasClusterStateDescriber struct { store store.ClusterDescriber projectID string diff --git a/test/e2e/decryption/decryption.go b/test/e2e/decryption/decryption.go index 666567cb98..046e296d9a 100644 --- a/test/e2e/decryption/decryption.go +++ b/test/e2e/decryption/decryption.go @@ -33,10 +33,6 @@ func GenerateFileName(dir, suffix string) string { return path.Join(dir, fmt.Sprintf("test-%s", suffix)) } -func GenerateFileNameCase(dir string, i int, suffix string) string { - return path.Join(dir, fmt.Sprintf("test%d-%s", i, suffix)) -} - func DumpToTemp(files embed.FS, srcFile, destFile string) error { content, err := files.ReadFile(srcFile) if err != nil { diff --git a/tools/genevergreen/generate/generate.go b/tools/genevergreen/generate/generate.go index 9772b9debb..e7cf0b90e2 100644 --- a/tools/genevergreen/generate/generate.go +++ b/tools/genevergreen/generate/generate.go @@ -22,9 +22,7 @@ import ( ) const ( - runOn = "ubuntu2004-small" - atlascli = "atlascli" - mongocli = "mongocli" + runOn = "ubuntu2004-small" ) var ( diff --git a/tools/templates-checker/astparsing/astparsing.go b/tools/templates-checker/astparsing/astparsing.go index 463f48c75c..a91da27d88 100644 --- a/tools/templates-checker/astparsing/astparsing.go +++ b/tools/templates-checker/astparsing/astparsing.go @@ -25,12 +25,7 @@ import ( ) const ( - cobraCommandTypeName = "*github.com/spf13/cobra.Command" - testingTypeName = "*testing.T" - testPrefix = "Test" - verifyOutputTemplateMod = "test" - verifyOutputTemplateName = "VerifyOutputTemplate" - verifyOutputTemplateNumberOfArgs = 3 + cobraCommandTypeName = "*github.com/spf13/cobra.Command" ) var stringDelimiters = []rune{'`', '\'', '"'}