Skip to content

Commit

Permalink
lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nish Krishnan committed Oct 15, 2020
1 parent 9fa0c91 commit 0a7d644
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion server/events/command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func TestRunCommentCommand_ForkPRDisabled(t *testing.T) {
var pull github.PullRequest
modelPull := models.PullRequest{
BaseRepo: fixtures.GithubRepo,
State: models.OpenPullState,
State: models.OpenPullState,
}
When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil)

Expand Down
10 changes: 5 additions & 5 deletions server/events/github_app_working_dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"fmt"
"testing"

. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/events"
eventMocks "github.com/runatlantis/atlantis/server/events/mocks"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/runatlantis/atlantis/server/events/vcs"
vcsMocks "github.com/runatlantis/atlantis/server/events/vcs/mocks"
"github.com/runatlantis/atlantis/server/events/vcs/fixtures"
vcsMocks "github.com/runatlantis/atlantis/server/events/vcs/mocks"
. "github.com/runatlantis/atlantis/testing"
. "github.com/petergtz/pegomock"
)

// Test that if we don't have any existing files, we check out the repo with a github app.
Expand Down Expand Up @@ -50,7 +50,7 @@ func TestClone_GithubAppNoneExisting(t *testing.T) {
}

cloneDir, _, err := gwd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
}, "default")
Ok(t, err)
Expand All @@ -66,8 +66,8 @@ func TestClone_GithubAppSetsCorrectUrl(t *testing.T) {
credentials := vcsMocks.NewMockGithubCredentials()

ghAppWorkingDir := events.GithubAppWorkingDir{
WorkingDir: workingDir,
Credentials: credentials,
WorkingDir: workingDir,
Credentials: credentials,
GithubHostname: "some-host",
}

Expand Down
22 changes: 11 additions & 11 deletions server/events/working_dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestClone_NoneExisting(t *testing.T) {
}

cloneDir, _, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
}, "default")
Ok(t, err)
Expand Down Expand Up @@ -91,7 +91,7 @@ func TestClone_CheckoutMergeNoneExisting(t *testing.T) {
}

cloneDir, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
BaseBranch: "master",
}, "default")
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestClone_CheckoutMergeNoReclone(t *testing.T) {
}

_, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
BaseBranch: "master",
}, "default")
Expand All @@ -152,7 +152,7 @@ func TestClone_CheckoutMergeNoReclone(t *testing.T) {

// Now run the clone again.
cloneDir, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
BaseBranch: "master",
}, "default")
Expand Down Expand Up @@ -190,7 +190,7 @@ func TestClone_CheckoutMergeNoRecloneFastForward(t *testing.T) {
}

_, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
BaseBranch: "master",
}, "default")
Expand All @@ -202,7 +202,7 @@ func TestClone_CheckoutMergeNoRecloneFastForward(t *testing.T) {

// Now run the clone again.
cloneDir, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
BaseBranch: "master",
}, "default")
Expand Down Expand Up @@ -245,7 +245,7 @@ func TestClone_CheckoutMergeConflict(t *testing.T) {
}

_, _, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
BaseBranch: "master",
}, "default")
Expand Down Expand Up @@ -276,7 +276,7 @@ func TestClone_NoReclone(t *testing.T) {
TestingOverrideHeadCloneURL: fmt.Sprintf("file://%s", repoDir),
}
cloneDir, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
}, "default")
Ok(t, err)
Expand Down Expand Up @@ -312,7 +312,7 @@ func TestClone_RecloneWrongCommit(t *testing.T) {
TestingOverrideHeadCloneURL: fmt.Sprintf("file://%s", repoDir),
}
cloneDir, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "branch",
HeadCommit: expCommit,
}, "default")
Expand Down Expand Up @@ -378,7 +378,7 @@ func TestClone_MasterHasDiverged(t *testing.T) {
CheckoutMerge: true,
}
_, hasDiverged, err := wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "second-pr",
BaseBranch: "master",
}, "default")
Expand All @@ -389,7 +389,7 @@ func TestClone_MasterHasDiverged(t *testing.T) {
// false.
wd.CheckoutMerge = false
_, hasDiverged, err = wd.Clone(nil, models.Repo{}, models.PullRequest{
BaseRepo: models.Repo{},
BaseRepo: models.Repo{},
HeadBranch: "second-pr",
BaseBranch: "master",
}, "default")
Expand Down

0 comments on commit 0a7d644

Please sign in to comment.