Skip to content

Commit

Permalink
Fix formatting via make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshiiSinfield committed Nov 28, 2019
1 parent c2275ed commit 8ba1b6d
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 63 deletions.
1 change: 1 addition & 0 deletions server/events/matchers/models_pullrequest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/events/matchers/models_repo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/events/matchers/ptr_to_logging_simplelogger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions server/events/mock_workingdir_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions server/events/project_command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
package events_test

import (
"github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/runtime"
"os"
"testing"

"github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/runtime"

. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/events"
"github.com/runatlantis/atlantis/server/events/mocks"
Expand Down
6 changes: 3 additions & 3 deletions server/events/project_finder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func TestDefaultProjectFinder_DetermineProjectsViaConfig(t *testing.T) {
config: valid.RepoCfg{
Projects: []valid.Project{
{
Dir: ".",
Dir: ".",
Autoplan: DefaultValidAutoplan().SetEnabled(false),
},
},
Expand All @@ -288,7 +288,7 @@ func TestDefaultProjectFinder_DetermineProjectsViaConfig(t *testing.T) {
config: valid.RepoCfg{
Projects: []valid.Project{
{
Dir: ".",
Dir: ".",
Autoplan: DefaultValidAutoplan(),
},
},
Expand All @@ -301,7 +301,7 @@ func TestDefaultProjectFinder_DetermineProjectsViaConfig(t *testing.T) {
config: valid.RepoCfg{
Projects: []valid.Project{
{
Dir: "project",
Dir: "project",
Autoplan: DefaultValidAutoplan(),
},
},
Expand Down
3 changes: 2 additions & 1 deletion server/events/runtime/env_step_runner.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package runtime

import (
"github.com/runatlantis/atlantis/server/events/models"
"strings"

"github.com/runatlantis/atlantis/server/events/models"
)

// EnvStepRunner set environment variables.
Expand Down
70 changes: 35 additions & 35 deletions server/events/yaml/parser_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ projects:
Version: 3,
Projects: []valid.Project{
{
Dir: ".",
Workspace: "default",
WorkflowName: nil,
TerraformVersion: nil,
Autoplan: DefaultValidAutoplan(),
Dir: ".",
Workspace: "default",
WorkflowName: nil,
TerraformVersion: nil,
Autoplan: DefaultValidAutoplan(),
ApplyRequirements: nil,
},
},
Expand All @@ -224,7 +224,7 @@ projects:
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: make(map[string]valid.Workflow),
Expand Down Expand Up @@ -267,7 +267,7 @@ projects:
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: make(map[string]valid.Workflow),
Expand All @@ -287,7 +287,7 @@ workflows: ~
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: make(map[string]valid.Workflow),
Expand All @@ -312,7 +312,7 @@ workflows:
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: map[string]valid.Workflow{
Expand Down Expand Up @@ -340,11 +340,11 @@ workflows:
Version: 3,
Projects: []valid.Project{
{
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan(),
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan(),
ApplyRequirements: []string{"approved"},
},
},
Expand Down Expand Up @@ -375,11 +375,11 @@ workflows:
Version: 3,
Projects: []valid.Project{
{
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan().SetEnabled(false),
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan().SetEnabled(false),
ApplyRequirements: []string{"approved"},
},
},
Expand Down Expand Up @@ -410,11 +410,11 @@ workflows:
Version: 3,
Projects: []valid.Project{
{
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan().SetEnabled(false),
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan().SetEnabled(false),
ApplyRequirements: []string{"mergeable"},
},
},
Expand Down Expand Up @@ -445,11 +445,11 @@ workflows:
Version: 3,
Projects: []valid.Project{
{
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan().SetEnabled(false),
Dir: ".",
Workspace: "myworkspace",
WorkflowName: String("myworkflow"),
TerraformVersion: tfVersion,
Autoplan: DefaultValidAutoplan().SetEnabled(false),
ApplyRequirements: []string{"mergeable", "approved"},
},
},
Expand Down Expand Up @@ -560,13 +560,13 @@ projects:
Name: String("myname"),
Dir: ".",
Workspace: "workspace",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
{
Name: String("myname2"),
Dir: ".",
Workspace: "workspace",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: map[string]valid.Workflow{},
Expand Down Expand Up @@ -595,7 +595,7 @@ workflows:
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: map[string]valid.Workflow{
Expand Down Expand Up @@ -654,7 +654,7 @@ workflows:
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: map[string]valid.Workflow{
Expand Down Expand Up @@ -709,7 +709,7 @@ workflows:
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: map[string]valid.Workflow{
Expand Down Expand Up @@ -760,7 +760,7 @@ workflows:
{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
Workflows: map[string]valid.Workflow{
Expand Down
2 changes: 1 addition & 1 deletion server/events/yaml/raw/autoplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

// DefaultAutoPlanWhenModified is the default element in the when_modified
// list if none is defined.
var DefaultAutoPlanWhenModified = []string{"**/*.tf*","**/terragrunt.hcl"}
var DefaultAutoPlanWhenModified = []string{"**/*.tf*", "**/terragrunt.hcl"}

type Autoplan struct {
WhenModified []string `yaml:"when_modified,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion server/events/yaml/raw/autoplan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestAutoplan_ToValid(t *testing.T) {
{
description: "nothing set",
input: raw.Autoplan{},
exp: DefaultValidAutoplan(),
exp: DefaultValidAutoplan(),
},
{
description: "when modified empty",
Expand Down
23 changes: 10 additions & 13 deletions server/events/yaml/raw/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ func TestProject_ToValid(t *testing.T) {
Dir: String("."),
},
exp: valid.Project{
Dir: ".",
Workspace: "default",
WorkflowName: nil,
TerraformVersion: nil,
Autoplan: DefaultValidAutoplan(),
Dir: ".",
Workspace: "default",
WorkflowName: nil,
TerraformVersion: nil,
Autoplan: DefaultValidAutoplan(),
ApplyRequirements: nil,
Name: nil,
},
Expand Down Expand Up @@ -272,7 +272,7 @@ func TestProject_ToValid(t *testing.T) {
Dir: ".",
Workspace: "default",
TerraformVersion: tfVersionPointEleven,
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
{
Expand All @@ -283,7 +283,7 @@ func TestProject_ToValid(t *testing.T) {
exp: valid.Project{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
{
Expand All @@ -294,7 +294,7 @@ func TestProject_ToValid(t *testing.T) {
exp: valid.Project{
Dir: "mydir",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
{
Expand All @@ -306,7 +306,7 @@ func TestProject_ToValid(t *testing.T) {
exp: valid.Project{
Dir: "mydir",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
{
Expand All @@ -318,7 +318,7 @@ func TestProject_ToValid(t *testing.T) {
exp: valid.Project{
Dir: ".",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
}
Expand All @@ -328,6 +328,3 @@ func TestProject_ToValid(t *testing.T) {
})
}
}



2 changes: 1 addition & 1 deletion server/events/yaml/raw/repo_cfg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func TestConfig_ToValid(t *testing.T) {
{
Dir: "mydir",
Workspace: "default",
Autoplan: DefaultValidAutoplan(),
Autoplan: DefaultValidAutoplan(),
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions testing/default_structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import "github.com/runatlantis/atlantis/server/events/yaml/valid"

// Helper function to return a frequently repeated valid Autoplan struct.
func DefaultValidAutoplan() valid.Autoplan {
return valid.Autoplan{
WhenModified: []string{"**/*.tf*", "**/terragrunt.hcl"},
Enabled: true,
}
return valid.Autoplan{
WhenModified: []string{"**/*.tf*", "**/terragrunt.hcl"},
Enabled: true,
}
}

0 comments on commit 8ba1b6d

Please sign in to comment.