Skip to content

Commit

Permalink
Fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Oct 9, 2024
1 parent c83b401 commit b92b151
Show file tree
Hide file tree
Showing 27 changed files with 42 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestLifecyclesInvalidName(t *testing.T) {
},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

// Assert
if result == nil || result.Severity() != checks.Warning {
Expand Down
2 changes: 1 addition & 1 deletion internal/checks/naming/octopus_invalid_target_name_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestInvalidTargetName(t *testing.T) {
},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/checks/naming/octopus_invalid_target_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestInvalidTargetRole(t *testing.T) {
},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestInvalidVariableNames(t *testing.T) {
},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestInvalidReleaseTemplate(t *testing.T) {
},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestDefaultStepNames(t *testing.T) {
&config.OctolintConfig{},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestInvalidContainerImage(t *testing.T) {
},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestInvalidWorkerPool(t *testing.T) {
},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestNormalProjectCount(t *testing.T) {

check := NewOctopusDefaultProjectGroupCountCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -63,7 +63,7 @@ func TestExcessiveProjectCount(t *testing.T) {

check := NewOctopusDefaultProjectGroupCountCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -115,7 +115,7 @@ func TestExcessiveProjectCountWithPermissionsError(t *testing.T) {

check := NewOctopusDefaultProjectGroupCountCheck(limitedClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestNoDuplicateVars(t *testing.T) {

check := NewOctopusDuplicatedVariablesCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestDuplicateVars(t *testing.T) {

check := NewOctopusDuplicatedVariablesCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestPopulatedDeploymentProcess(t *testing.T) {

check := NewOctopusEmptyProjectCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestEmptyDeploymentProcess(t *testing.T) {

check := NewOctopusEmptyProjectCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestNormalEnvironmentCount(t *testing.T) {

check := NewOctopusEnvironmentCountCheck(newSpaceClient, &config.OctolintConfig{MaxEnvironments: 10}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestExcessiveEnvironmentCount(t *testing.T) {

check := NewOctopusEnvironmentCountCheck(newSpaceClient, &config.OctolintConfig{MaxEnvironments: 10}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestLifecyclesMeetRecommendations(t *testing.T) {

check := NewOctopusLifecycleRetentionPolicyCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

// Assert
if result.Severity() != checks.Ok {
Expand Down Expand Up @@ -83,7 +83,7 @@ func TestLifecycleKeepsReleasesForever(t *testing.T) {

check := NewOctopusLifecycleRetentionPolicyCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestLifecycleKeepsFilesForever(t *testing.T) {

check := NewOctopusLifecycleRetentionPolicyCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -159,7 +159,7 @@ func TestLifecyclePhaseKeepsReleasesForever(t *testing.T) {

check := NewOctopusLifecycleRetentionPolicyCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -197,7 +197,7 @@ func TestLifecyclePhaseKeepsFilesForever(t *testing.T) {

check := NewOctopusLifecycleRetentionPolicyCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestProjectGroupsWithMutuallyExcluiveProjectLifecycles(t *testing.T) {

check := NewOctopusProjectGroupsWithExclusiveEnvironmentsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestProjectSpecificEnvironmentsFromDefaultLifecycle(t *testing.T) {

check := NewOctopusProjectSpecificEnvironmentCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestProjectSpecificEnvironmentsFromCustomLifecycle(t *testing.T) {

check := NewOctopusProjectSpecificEnvironmentCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestSmallDeploymentProcess(t *testing.T) {

check := NewOctopusProjectTooManyStepsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestComplexDeploymentProcess(t *testing.T) {

check := NewOctopusProjectTooManyStepsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestDirectTenantReferences(t *testing.T) {

check := NewOctopusTenantsInsteadOfTagsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestTenantTagReferences(t *testing.T) {

check := NewOctopusTenantsInsteadOfTagsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestUnhealthyTargets(t *testing.T) {

check := NewOctopusUnhealthyTargetCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestUnusedProjects(t *testing.T) {

check := NewOctopusUnusedProjectsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestUnusedTargetVars(t *testing.T) {

check := NewOctopusUnusedTargetsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestNoUnusedVars(t *testing.T) {

check := NewOctopusUnusedVariablesCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestNoUnusedVarsInOneHundrenProjects(t *testing.T) {

check := NewOctopusUnusedVariablesCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestUnusedVars(t *testing.T) {

check := NewOctopusUnusedVariablesCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ func TestLongTaskQueue(t *testing.T) {
newSpaceClient, err := octoclient.CreateClient(server.URL, "Spaces-1", test.ApiKey)
check := NewOctopusDeploymentQueuedTimeCheck(newSpaceClient, &config.OctolintConfig{}, "http://test.app", "Spaces-1", checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
t.Fatal("Check produced an error")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestDeployedByAdmin(t *testing.T) {

check := NewOctopusDeploymentQueuedByAdminCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down Expand Up @@ -279,7 +279,7 @@ func TestDeployedByUser(t *testing.T) {

check := NewOctopusDeploymentQueuedByAdminCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestDuplicatedGitCreds(t *testing.T) {

check := NewOctopusDuplicatedGitCredentialsCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestInsecureFeeds(t *testing.T) {
&config.OctolintConfig{},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestInsecureK8s(t *testing.T) {
&config.OctolintConfig{},
checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestPerpetualApiKeys(t *testing.T) {

check := NewOctopusPerpetualApiKeysCheck(newSpaceClient, &config.OctolintConfig{}, checks.OctopusClientPermissiveErrorHandler{})

result, err := check.Execute()
result, err := check.Execute(2)

if err != nil {
return err
Expand Down

0 comments on commit b92b151

Please sign in to comment.