diff --git a/cmd/server_test.go b/cmd/server_test.go index 572242b7e8..0e518c636b 100644 --- a/cmd/server_test.go +++ b/cmd/server_test.go @@ -27,7 +27,7 @@ import ( "gopkg.in/yaml.v2" "github.com/runatlantis/atlantis/server" - "github.com/runatlantis/atlantis/server/events/vcs/fixtures" + "github.com/runatlantis/atlantis/server/events/vcs/testdata" "github.com/runatlantis/atlantis/server/logging" . "github.com/runatlantis/atlantis/testing" ) @@ -427,7 +427,7 @@ func TestExecute_ValidateVCSConfig(t *testing.T) { { "just github app key set", map[string]interface{}{ - GHAppKeyFlag: fixtures.GithubPrivateKey, + GHAppKeyFlag: testdata.GithubPrivateKey, }, true, }, @@ -496,7 +496,7 @@ func TestExecute_ValidateVCSConfig(t *testing.T) { "github app and key set and should be successful", map[string]interface{}{ GHAppIDFlag: "1", - GHAppKeyFlag: fixtures.GithubPrivateKey, + GHAppKeyFlag: testdata.GithubPrivateKey, }, false, }, @@ -631,7 +631,7 @@ func TestExecute_GithubUser(t *testing.T) { func TestExecute_GithubApp(t *testing.T) { t.Log("Should remove the @ from the github username if it's passed.") c := setup(map[string]interface{}{ - GHAppKeyFlag: fixtures.GithubPrivateKey, + GHAppKeyFlag: testdata.GithubPrivateKey, GHAppIDFlag: "1", RepoAllowlistFlag: "*", }, t) diff --git a/server/controllers/events/events_controller_e2e_test.go b/server/controllers/events/events_controller_e2e_test.go index bead7dffb6..0be1944511 100644 --- a/server/controllers/events/events_controller_e2e_test.go +++ b/server/controllers/events/events_controller_e2e_test.go @@ -81,7 +81,7 @@ func TestGitHubWorkflow(t *testing.T) { cases := []struct { Description string - // RepoDir is relative to testfixtures/test-repos. + // RepoDir is relative to testdata/test-repos. RepoDir string // RepoConfigFile is path for atlantis.yaml RepoConfigFile string @@ -592,7 +592,7 @@ func TestSimpleWorkflow_terraformLockFile(t *testing.T) { cases := []struct { Description string - // RepoDir is relative to testfixtures/test-repos. + // RepoDir is relative to testdata/test-repos. RepoDir string // ModifiedFiles are the list of files that have been modified in this // pull request. @@ -664,7 +664,7 @@ func TestSimpleWorkflow_terraformLockFile(t *testing.T) { // Set the repo to be cloned through the testing backdoor. repoDir, headSHA := initializeRepo(t, c.RepoDir) - oldLockFilePath, err := filepath.Abs(filepath.Join("testfixtures", "null_provider_lockfile_old_version")) + oldLockFilePath, err := filepath.Abs(filepath.Join("testdata", "null_provider_lockfile_old_version")) Ok(t, err) oldLockFileContent, err := os.ReadFile(oldLockFilePath) Ok(t, err) @@ -759,7 +759,7 @@ func TestGitHubWorkflowWithPolicyCheck(t *testing.T) { cases := []struct { Description string - // RepoDir is relative to testfixtures/test-repos. + // RepoDir is relative to testdata/test-repos. RepoDir string // ModifiedFiles are the list of files that have been modified in this // pull request. @@ -1330,7 +1330,7 @@ func (w *mockWebhookSender) Send(log logging.SimpleLogging, result webhooks.Appl } func GitHubCommentEvent(t *testing.T, comment string) *http.Request { - requestJSON, err := os.ReadFile(filepath.Join("testfixtures", "githubIssueCommentEvent.json")) + requestJSON, err := os.ReadFile(filepath.Join("testdata", "githubIssueCommentEvent.json")) Ok(t, err) escapedComment, err := json.Marshal(comment) Ok(t, err) @@ -1343,7 +1343,7 @@ func GitHubCommentEvent(t *testing.T, comment string) *http.Request { } func GitHubPullRequestOpenedEvent(t *testing.T, headSHA string) *http.Request { - requestJSON, err := os.ReadFile(filepath.Join("testfixtures", "githubPullRequestOpenedEvent.json")) + requestJSON, err := os.ReadFile(filepath.Join("testdata", "githubPullRequestOpenedEvent.json")) Ok(t, err) // Replace sha with expected sha. requestJSONStr := strings.Replace(string(requestJSON), "c31fd9ea6f557ad2ea659944c3844a059b83bc5d", headSHA, -1) @@ -1355,7 +1355,7 @@ func GitHubPullRequestOpenedEvent(t *testing.T, headSHA string) *http.Request { } func GitHubPullRequestClosedEvent(t *testing.T) *http.Request { - requestJSON, err := os.ReadFile(filepath.Join("testfixtures", "githubPullRequestClosedEvent.json")) + requestJSON, err := os.ReadFile(filepath.Join("testdata", "githubPullRequestClosedEvent.json")) Ok(t, err) req, err := http.NewRequest("POST", "/events", bytes.NewBuffer(requestJSON)) Ok(t, err) @@ -1396,12 +1396,12 @@ func GitHubPullRequestParsed(headSHA string) *github.PullRequest { // absRepoPath returns the absolute path to the test repo under dir repoDir. func absRepoPath(t *testing.T, repoDir string) string { - path, err := filepath.Abs(filepath.Join("testfixtures", "test-repos", repoDir)) + path, err := filepath.Abs(filepath.Join("testdata", "test-repos", repoDir)) Ok(t, err) return path } -// initializeRepo copies the repo data from testfixtures and initializes a new +// initializeRepo copies the repo data from testdata and initializes a new // git repo in a temp directory. It returns that directory and a function // to run in a defer that will delete the dir. // The purpose of this function is to create a real git repository with a branch diff --git a/server/controllers/events/events_controller_test.go b/server/controllers/events/events_controller_test.go index 5722627d42..28b9d0d9ff 100644 --- a/server/controllers/events/events_controller_test.go +++ b/server/controllers/events/events_controller_test.go @@ -207,7 +207,7 @@ func TestPost_GitlabCommentNotAllowlisted(t *testing.T) { RepoAllowlistChecker: &events.RepoAllowlistChecker{}, VCSClient: vcsClient, } - requestJSON, err := os.ReadFile(filepath.Join("testfixtures", "gitlabMergeCommentEvent_notAllowlisted.json")) + requestJSON, err := os.ReadFile(filepath.Join("testdata", "gitlabMergeCommentEvent_notAllowlisted.json")) Ok(t, err) req, _ := http.NewRequest("GET", "", bytes.NewBuffer(requestJSON)) req.Header.Set(gitlabHeader, "Note Hook") @@ -239,7 +239,7 @@ func TestPost_GitlabCommentNotAllowlistedWithSilenceErrors(t *testing.T) { VCSClient: vcsClient, SilenceAllowlistErrors: true, } - requestJSON, err := os.ReadFile(filepath.Join("testfixtures", "gitlabMergeCommentEvent_notAllowlisted.json")) + requestJSON, err := os.ReadFile(filepath.Join("testdata", "gitlabMergeCommentEvent_notAllowlisted.json")) Ok(t, err) req, _ := http.NewRequest("GET", "", bytes.NewBuffer(requestJSON)) req.Header.Set(gitlabHeader, "Note Hook") @@ -270,7 +270,7 @@ func TestPost_GithubCommentNotAllowlisted(t *testing.T) { RepoAllowlistChecker: &events.RepoAllowlistChecker{}, VCSClient: vcsClient, } - requestJSON, err := os.ReadFile(filepath.Join("testfixtures", "githubIssueCommentEvent_notAllowlisted.json")) + requestJSON, err := os.ReadFile(filepath.Join("testdata", "githubIssueCommentEvent_notAllowlisted.json")) Ok(t, err) req, _ := http.NewRequest("GET", "", bytes.NewBuffer(requestJSON)) req.Header.Set("Content-Type", "application/json") @@ -303,7 +303,7 @@ func TestPost_GithubCommentNotAllowlistedWithSilenceErrors(t *testing.T) { VCSClient: vcsClient, SilenceAllowlistErrors: true, } - requestJSON, err := os.ReadFile(filepath.Join("testfixtures", "githubIssueCommentEvent_notAllowlisted.json")) + requestJSON, err := os.ReadFile(filepath.Join("testdata", "githubIssueCommentEvent_notAllowlisted.json")) Ok(t, err) req, _ := http.NewRequest("GET", "", bytes.NewBuffer(requestJSON)) req.Header.Set("Content-Type", "application/json") @@ -709,7 +709,7 @@ func TestPost_BBServerPullClosed(t *testing.T) { } // Build HTTP request. - requestBytes, err := os.ReadFile(filepath.Join("testfixtures", "bb-server-pull-deleted-event.json")) + requestBytes, err := os.ReadFile(filepath.Join("testdata", "bb-server-pull-deleted-event.json")) // Replace the eventKey field with our event type. requestJSON := strings.Replace(string(requestBytes), `"eventKey":"pr:deleted",`, fmt.Sprintf(`"eventKey":"%s",`, c.header), -1) Ok(t, err) diff --git a/server/controllers/events/testfixtures/bb-server-pull-deleted-event.json b/server/controllers/events/testdata/bb-server-pull-deleted-event.json similarity index 100% rename from server/controllers/events/testfixtures/bb-server-pull-deleted-event.json rename to server/controllers/events/testdata/bb-server-pull-deleted-event.json diff --git a/server/controllers/events/testfixtures/githubIssueCommentEvent.json b/server/controllers/events/testdata/githubIssueCommentEvent.json similarity index 100% rename from server/controllers/events/testfixtures/githubIssueCommentEvent.json rename to server/controllers/events/testdata/githubIssueCommentEvent.json diff --git a/server/controllers/events/testfixtures/githubIssueCommentEvent_notAllowlisted.json b/server/controllers/events/testdata/githubIssueCommentEvent_notAllowlisted.json similarity index 100% rename from server/controllers/events/testfixtures/githubIssueCommentEvent_notAllowlisted.json rename to server/controllers/events/testdata/githubIssueCommentEvent_notAllowlisted.json diff --git a/server/controllers/events/testfixtures/githubPullRequestClosedEvent.json b/server/controllers/events/testdata/githubPullRequestClosedEvent.json similarity index 100% rename from server/controllers/events/testfixtures/githubPullRequestClosedEvent.json rename to server/controllers/events/testdata/githubPullRequestClosedEvent.json diff --git a/server/controllers/events/testfixtures/githubPullRequestOpenedEvent.json b/server/controllers/events/testdata/githubPullRequestOpenedEvent.json similarity index 100% rename from server/controllers/events/testfixtures/githubPullRequestOpenedEvent.json rename to server/controllers/events/testdata/githubPullRequestOpenedEvent.json diff --git a/server/controllers/events/testfixtures/gitlabMergeCommentEvent_notAllowlisted.json b/server/controllers/events/testdata/gitlabMergeCommentEvent_notAllowlisted.json similarity index 100% rename from server/controllers/events/testfixtures/gitlabMergeCommentEvent_notAllowlisted.json rename to server/controllers/events/testdata/gitlabMergeCommentEvent_notAllowlisted.json diff --git a/server/controllers/events/testfixtures/gitlabMergeCommentEvent_shouldIgnore.json b/server/controllers/events/testdata/gitlabMergeCommentEvent_shouldIgnore.json similarity index 100% rename from server/controllers/events/testfixtures/gitlabMergeCommentEvent_shouldIgnore.json rename to server/controllers/events/testdata/gitlabMergeCommentEvent_shouldIgnore.json diff --git a/server/controllers/events/testfixtures/null_provider_lockfile_old_version b/server/controllers/events/testdata/null_provider_lockfile_old_version similarity index 100% rename from server/controllers/events/testfixtures/null_provider_lockfile_old_version rename to server/controllers/events/testdata/null_provider_lockfile_old_version diff --git a/server/controllers/events/testfixtures/test-repos/automerge/atlantis.yaml b/server/controllers/events/testdata/test-repos/automerge/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/atlantis.yaml rename to server/controllers/events/testdata/test-repos/automerge/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/automerge/dir1/main.tf b/server/controllers/events/testdata/test-repos/automerge/dir1/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/dir1/main.tf rename to server/controllers/events/testdata/test-repos/automerge/dir1/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/automerge/dir2/main.tf b/server/controllers/events/testdata/test-repos/automerge/dir2/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/dir2/main.tf rename to server/controllers/events/testdata/test-repos/automerge/dir2/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/automerge/exp-output-apply-dir1.txt b/server/controllers/events/testdata/test-repos/automerge/exp-output-apply-dir1.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/exp-output-apply-dir1.txt rename to server/controllers/events/testdata/test-repos/automerge/exp-output-apply-dir1.txt diff --git a/server/controllers/events/testfixtures/test-repos/automerge/exp-output-apply-dir2.txt b/server/controllers/events/testdata/test-repos/automerge/exp-output-apply-dir2.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/exp-output-apply-dir2.txt rename to server/controllers/events/testdata/test-repos/automerge/exp-output-apply-dir2.txt diff --git a/server/controllers/events/testfixtures/test-repos/automerge/exp-output-automerge.txt b/server/controllers/events/testdata/test-repos/automerge/exp-output-automerge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/exp-output-automerge.txt rename to server/controllers/events/testdata/test-repos/automerge/exp-output-automerge.txt diff --git a/server/controllers/events/testfixtures/test-repos/automerge/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/automerge/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/automerge/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/automerge/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/automerge/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/automerge/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/automerge/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/atlantis.yaml b/server/controllers/events/testdata/test-repos/import-multiple-project/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/atlantis.yaml rename to server/controllers/events/testdata/test-repos/import-multiple-project/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/dir1/main.tf b/server/controllers/events/testdata/test-repos/import-multiple-project/dir1/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/dir1/main.tf rename to server/controllers/events/testdata/test-repos/import-multiple-project/dir1/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/dir2/main.tf b/server/controllers/events/testdata/test-repos/import-multiple-project/dir2/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/dir2/main.tf rename to server/controllers/events/testdata/test-repos/import-multiple-project/dir2/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-import-dummy1.txt b/server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-import-dummy1.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-import-dummy1.txt rename to server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-import-dummy1.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-import-multiple-projects.txt b/server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-import-multiple-projects.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-import-multiple-projects.txt rename to server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-import-multiple-projects.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-plan-again.txt b/server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-plan-again.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-multiple-project/exp-output-plan-again.txt rename to server/controllers/events/testdata/test-repos/import-multiple-project/exp-output-plan-again.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-import-count.txt b/server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-import-count.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-import-count.txt rename to server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-import-count.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-import-foreach.txt b/server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-import-foreach.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-import-foreach.txt rename to server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-import-foreach.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-plan-again.txt b/server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-plan-again.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project-var/exp-output-plan-again.txt rename to server/controllers/events/testdata/test-repos/import-single-project-var/exp-output-plan-again.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project-var/main.tf b/server/controllers/events/testdata/test-repos/import-single-project-var/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project-var/main.tf rename to server/controllers/events/testdata/test-repos/import-single-project-var/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-apply-no-projects.txt b/server/controllers/events/testdata/test-repos/import-single-project/exp-output-apply-no-projects.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-apply-no-projects.txt rename to server/controllers/events/testdata/test-repos/import-single-project/exp-output-apply-no-projects.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/import-single-project/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/import-single-project/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-import-dummy1.txt b/server/controllers/events/testdata/test-repos/import-single-project/exp-output-import-dummy1.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-import-dummy1.txt rename to server/controllers/events/testdata/test-repos/import-single-project/exp-output-import-dummy1.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-import-dummy2.txt b/server/controllers/events/testdata/test-repos/import-single-project/exp-output-import-dummy2.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-import-dummy2.txt rename to server/controllers/events/testdata/test-repos/import-single-project/exp-output-import-dummy2.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/import-single-project/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/import-single-project/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-plan-again.txt b/server/controllers/events/testdata/test-repos/import-single-project/exp-output-plan-again.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project/exp-output-plan-again.txt rename to server/controllers/events/testdata/test-repos/import-single-project/exp-output-plan-again.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-single-project/main.tf b/server/controllers/events/testdata/test-repos/import-single-project/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-single-project/main.tf rename to server/controllers/events/testdata/test-repos/import-single-project/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/import-workspace/atlantis.yaml b/server/controllers/events/testdata/test-repos/import-workspace/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-workspace/atlantis.yaml rename to server/controllers/events/testdata/test-repos/import-workspace/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/import-workspace/dir1/main.tf b/server/controllers/events/testdata/test-repos/import-workspace/dir1/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-workspace/dir1/main.tf rename to server/controllers/events/testdata/test-repos/import-workspace/dir1/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-import-dir1-ops-dummy1.txt b/server/controllers/events/testdata/test-repos/import-workspace/exp-output-import-dir1-ops-dummy1.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-import-dir1-ops-dummy1.txt rename to server/controllers/events/testdata/test-repos/import-workspace/exp-output-import-dir1-ops-dummy1.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-import-dir1-ops-dummy2.txt b/server/controllers/events/testdata/test-repos/import-workspace/exp-output-import-dir1-ops-dummy2.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-import-dir1-ops-dummy2.txt rename to server/controllers/events/testdata/test-repos/import-workspace/exp-output-import-dir1-ops-dummy2.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/import-workspace/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/import-workspace/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-plan.txt b/server/controllers/events/testdata/test-repos/import-workspace/exp-output-plan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/import-workspace/exp-output-plan.txt rename to server/controllers/events/testdata/test-repos/import-workspace/exp-output-plan.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/atlantis.yaml b/server/controllers/events/testdata/test-repos/modules-yaml/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/atlantis.yaml rename to server/controllers/events/testdata/test-repos/modules-yaml/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-apply-production.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-apply-production.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-apply-production.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-apply-production.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-apply-staging.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-apply-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-apply-staging.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-apply-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-merge-all-dirs.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-merge-all-dirs.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-merge-all-dirs.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-merge-all-dirs.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-merge-only-staging.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-merge-only-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-merge-only-staging.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-merge-only-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-plan-production.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-plan-production.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-plan-production.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-plan-production.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-plan-staging.txt b/server/controllers/events/testdata/test-repos/modules-yaml/exp-output-plan-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/exp-output-plan-staging.txt rename to server/controllers/events/testdata/test-repos/modules-yaml/exp-output-plan-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/modules/null/main.tf b/server/controllers/events/testdata/test-repos/modules-yaml/modules/null/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/modules/null/main.tf rename to server/controllers/events/testdata/test-repos/modules-yaml/modules/null/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/production/main.tf b/server/controllers/events/testdata/test-repos/modules-yaml/production/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/production/main.tf rename to server/controllers/events/testdata/test-repos/modules-yaml/production/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/modules-yaml/staging/main.tf b/server/controllers/events/testdata/test-repos/modules-yaml/staging/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules-yaml/staging/main.tf rename to server/controllers/events/testdata/test-repos/modules-yaml/staging/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-apply-production.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-apply-production.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-apply-production.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-apply-production.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-apply-staging.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-apply-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-apply-staging.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-apply-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-autoplan-only-staging.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-autoplan-only-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-autoplan-only-staging.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-autoplan-only-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-merge-all-dirs.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-merge-all-dirs.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-merge-all-dirs.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-merge-all-dirs.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-merge-only-staging.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-merge-only-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-merge-only-staging.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-merge-only-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-plan-production.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-plan-production.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-plan-production.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-plan-production.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/exp-output-plan-staging.txt b/server/controllers/events/testdata/test-repos/modules/exp-output-plan-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/exp-output-plan-staging.txt rename to server/controllers/events/testdata/test-repos/modules/exp-output-plan-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/modules/modules/null/main.tf b/server/controllers/events/testdata/test-repos/modules/modules/null/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/modules/null/main.tf rename to server/controllers/events/testdata/test-repos/modules/modules/null/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/modules/production/main.tf b/server/controllers/events/testdata/test-repos/modules/production/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/production/main.tf rename to server/controllers/events/testdata/test-repos/modules/production/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/modules/staging/main.tf b/server/controllers/events/testdata/test-repos/modules/staging/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/modules/staging/main.tf rename to server/controllers/events/testdata/test-repos/modules/staging/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/atlantis.yaml b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/atlantis.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-apply-failed.txt b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-apply-failed.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-apply-failed.txt rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-apply-failed.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-apply.txt b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-apply.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-apply.txt rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-apply.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-approve-policies.txt b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-approve-policies.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-approve-policies.txt rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-approve-policies.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-auto-policy-check.txt b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-auto-policy-check.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-auto-policy-check.txt rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-auto-policy-check.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/main.tf b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/main.tf rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/policies/policy.rego b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/policies/policy.rego similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/policies/policy.rego rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/policies/policy.rego diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/repos.yaml b/server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/repos.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-apply-reqs/repos.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-apply-reqs/repos.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/atlantis.yaml b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/atlantis.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-apply-failed.txt b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-apply-failed.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-apply-failed.txt rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-apply-failed.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-approve-policies.txt b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-approve-policies.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-approve-policies.txt rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-approve-policies.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-auto-policy-check.txt b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-auto-policy-check.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-auto-policy-check.txt rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-auto-policy-check.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/main.tf b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/main.tf rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/policies/policy.rego b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/policies/policy.rego similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/policies/policy.rego rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/policies/policy.rego diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/repos.yaml b/server/controllers/events/testdata/test-repos/policy-checks-diff-owner/repos.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-diff-owner/repos.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-diff-owner/repos.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/atlantis.yaml b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/atlantis.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-apply-failed.txt b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-apply-failed.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-apply-failed.txt rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-apply-failed.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-apply.txt b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-apply.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-apply.txt rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-apply.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-approve-policies.txt b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-approve-policies.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-approve-policies.txt rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-approve-policies.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-auto-policy-check.txt b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-auto-policy-check.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-auto-policy-check.txt rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-auto-policy-check.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/main.tf b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/main.tf rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/policies/policy.rego b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/policies/policy.rego similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/policies/policy.rego rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/policies/policy.rego diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/repos.yaml b/server/controllers/events/testdata/test-repos/policy-checks-extra-args/repos.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-extra-args/repos.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-extra-args/repos.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/atlantis.yaml b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/atlantis.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/dir1/main.tf b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/dir1/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/dir1/main.tf rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/dir1/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/dir2/main.tf b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/dir2/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/dir2/main.tf rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/dir2/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-apply.txt b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-apply.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-apply.txt rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-apply.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-approve-policies.txt b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-approve-policies.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-approve-policies.txt rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-approve-policies.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-auto-policy-check.txt b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-auto-policy-check.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-auto-policy-check.txt rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-auto-policy-check.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/policies/policy.rego b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/policies/policy.rego similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/policies/policy.rego rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/policies/policy.rego diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/repos.yaml b/server/controllers/events/testdata/test-repos/policy-checks-multi-projects/repos.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-multi-projects/repos.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-multi-projects/repos.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/atlantis.yaml b/server/controllers/events/testdata/test-repos/policy-checks-success-silent/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/atlantis.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-success-silent/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/exp-output-apply.txt b/server/controllers/events/testdata/test-repos/policy-checks-success-silent/exp-output-apply.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/exp-output-apply.txt rename to server/controllers/events/testdata/test-repos/policy-checks-success-silent/exp-output-apply.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/policy-checks-success-silent/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/policy-checks-success-silent/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/policy-checks-success-silent/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/policy-checks-success-silent/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/main.tf b/server/controllers/events/testdata/test-repos/policy-checks-success-silent/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/main.tf rename to server/controllers/events/testdata/test-repos/policy-checks-success-silent/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/policies/policy.rego b/server/controllers/events/testdata/test-repos/policy-checks-success-silent/policies/policy.rego similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/policies/policy.rego rename to server/controllers/events/testdata/test-repos/policy-checks-success-silent/policies/policy.rego diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/repos.yaml b/server/controllers/events/testdata/test-repos/policy-checks-success-silent/repos.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks-success-silent/repos.yaml rename to server/controllers/events/testdata/test-repos/policy-checks-success-silent/repos.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/atlantis.yaml b/server/controllers/events/testdata/test-repos/policy-checks/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/atlantis.yaml rename to server/controllers/events/testdata/test-repos/policy-checks/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-apply-failed.txt b/server/controllers/events/testdata/test-repos/policy-checks/exp-output-apply-failed.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-apply-failed.txt rename to server/controllers/events/testdata/test-repos/policy-checks/exp-output-apply-failed.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-apply.txt b/server/controllers/events/testdata/test-repos/policy-checks/exp-output-apply.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-apply.txt rename to server/controllers/events/testdata/test-repos/policy-checks/exp-output-apply.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-approve-policies.txt b/server/controllers/events/testdata/test-repos/policy-checks/exp-output-approve-policies.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-approve-policies.txt rename to server/controllers/events/testdata/test-repos/policy-checks/exp-output-approve-policies.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-auto-policy-check.txt b/server/controllers/events/testdata/test-repos/policy-checks/exp-output-auto-policy-check.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-auto-policy-check.txt rename to server/controllers/events/testdata/test-repos/policy-checks/exp-output-auto-policy-check.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/policy-checks/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/policy-checks/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/policy-checks/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/policy-checks/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/main.tf b/server/controllers/events/testdata/test-repos/policy-checks/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/main.tf rename to server/controllers/events/testdata/test-repos/policy-checks/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/policies/policy.rego b/server/controllers/events/testdata/test-repos/policy-checks/policies/policy.rego similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/policies/policy.rego rename to server/controllers/events/testdata/test-repos/policy-checks/policies/policy.rego diff --git a/server/controllers/events/testfixtures/test-repos/policy-checks/repos.yaml b/server/controllers/events/testdata/test-repos/policy-checks/repos.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/policy-checks/repos.yaml rename to server/controllers/events/testdata/test-repos/policy-checks/repos.yaml diff --git a/server/controllers/events/testfixtures/test-repos/repo-config-file/exp-output-apply.txt b/server/controllers/events/testdata/test-repos/repo-config-file/exp-output-apply.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/repo-config-file/exp-output-apply.txt rename to server/controllers/events/testdata/test-repos/repo-config-file/exp-output-apply.txt diff --git a/server/controllers/events/testfixtures/test-repos/repo-config-file/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/repo-config-file/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/repo-config-file/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/repo-config-file/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/repo-config-file/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/repo-config-file/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/repo-config-file/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/repo-config-file/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/repo-config-file/infrastructure/custom-name-atlantis.yaml b/server/controllers/events/testdata/test-repos/repo-config-file/infrastructure/custom-name-atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/repo-config-file/infrastructure/custom-name-atlantis.yaml rename to server/controllers/events/testdata/test-repos/repo-config-file/infrastructure/custom-name-atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/repo-config-file/infrastructure/production/main.tf b/server/controllers/events/testdata/test-repos/repo-config-file/infrastructure/production/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/repo-config-file/infrastructure/production/main.tf rename to server/controllers/events/testdata/test-repos/repo-config-file/infrastructure/production/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/repo-config-file/infrastructure/staging/main.tf b/server/controllers/events/testdata/test-repos/repo-config-file/infrastructure/staging/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/repo-config-file/infrastructure/staging/main.tf rename to server/controllers/events/testdata/test-repos/repo-config-file/infrastructure/staging/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/server-side-cfg/atlantis.yaml b/server/controllers/events/testdata/test-repos/server-side-cfg/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/server-side-cfg/atlantis.yaml rename to server/controllers/events/testdata/test-repos/server-side-cfg/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-apply-default-workspace.txt b/server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-apply-default-workspace.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-apply-default-workspace.txt rename to server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-apply-default-workspace.txt diff --git a/server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-apply-staging-workspace.txt b/server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-apply-staging-workspace.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-apply-staging-workspace.txt rename to server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-apply-staging-workspace.txt diff --git a/server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/server-side-cfg/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/server-side-cfg/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/server-side-cfg/main.tf b/server/controllers/events/testdata/test-repos/server-side-cfg/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/server-side-cfg/main.tf rename to server/controllers/events/testdata/test-repos/server-side-cfg/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/server-side-cfg/repos.yaml b/server/controllers/events/testdata/test-repos/server-side-cfg/repos.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/server-side-cfg/repos.yaml rename to server/controllers/events/testdata/test-repos/server-side-cfg/repos.yaml diff --git a/server/controllers/events/testfixtures/test-repos/simple-with-lockfile/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/simple-with-lockfile/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-with-lockfile/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/simple-with-lockfile/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-with-lockfile/exp-output-plan.txt b/server/controllers/events/testdata/test-repos/simple-with-lockfile/exp-output-plan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-with-lockfile/exp-output-plan.txt rename to server/controllers/events/testdata/test-repos/simple-with-lockfile/exp-output-plan.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-with-lockfile/main.tf b/server/controllers/events/testdata/test-repos/simple-with-lockfile/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-with-lockfile/main.tf rename to server/controllers/events/testdata/test-repos/simple-with-lockfile/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/atlantis.yaml b/server/controllers/events/testdata/test-repos/simple-yaml/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/atlantis.yaml rename to server/controllers/events/testdata/test-repos/simple-yaml/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-all.txt b/server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-all.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-all.txt rename to server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-all.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-default.txt b/server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-default.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-default.txt rename to server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-default.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-locked.txt b/server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-locked.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-locked.txt rename to server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-locked.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-staging.txt b/server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-apply-staging.txt rename to server/controllers/events/testdata/test-repos/simple-yaml/exp-output-apply-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/simple-yaml/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/simple-yaml/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/simple-yaml/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/simple-yaml/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/main.tf b/server/controllers/events/testdata/test-repos/simple-yaml/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/main.tf rename to server/controllers/events/testdata/test-repos/simple-yaml/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/simple-yaml/staging.tfvars b/server/controllers/events/testdata/test-repos/simple-yaml/staging.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple-yaml/staging.tfvars rename to server/controllers/events/testdata/test-repos/simple-yaml/staging.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-allow-command-unknown-import.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-allow-command-unknown-import.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-allow-command-unknown-import.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-allow-command-unknown-import.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var-all.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-apply-var-all.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var-all.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-apply-var-all.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var-default-workspace.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-apply-var-default-workspace.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var-default-workspace.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-apply-var-default-workspace.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var-new-workspace.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-apply-var-new-workspace.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var-new-workspace.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-apply-var-new-workspace.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-apply-var.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-apply-var.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-apply-var.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-apply.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-apply.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-apply.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-apply.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-atlantis-plan-new-workspace.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-atlantis-plan-new-workspace.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-atlantis-plan-new-workspace.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-atlantis-plan-new-workspace.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-atlantis-plan-var-overridden.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-atlantis-plan-var-overridden.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-atlantis-plan-var-overridden.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-atlantis-plan-var-overridden.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-atlantis-plan.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-atlantis-plan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-atlantis-plan.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-atlantis-plan.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-auto-policy-check.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-auto-policy-check.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-auto-policy-check.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-auto-policy-check.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-merge-workspaces.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-merge-workspaces.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-merge-workspaces.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-merge-workspaces.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/simple/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/simple/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/simple/main.tf b/server/controllers/events/testdata/test-repos/simple/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/simple/main.tf rename to server/controllers/events/testdata/test-repos/simple/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/atlantis.yaml b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/atlantis.yaml rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/default.backend.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/default.backend.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/default.backend.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/default.backend.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/default.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/default.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/default.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/default.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-default.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-default.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-default.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-default.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-staging.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-staging.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-apply-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-default.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-default.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-default.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-default.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-staging.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-staging.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/exp-output-plan-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/main.tf b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/main.tf rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/staging.backend.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/staging.backend.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/staging.backend.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/staging.backend.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/staging.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/staging.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml-no-autoplan/staging.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml-no-autoplan/staging.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/atlantis.yaml b/server/controllers/events/testdata/test-repos/tfvars-yaml/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/atlantis.yaml rename to server/controllers/events/testdata/test-repos/tfvars-yaml/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/default.backend.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml/default.backend.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/default.backend.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml/default.backend.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/default.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml/default.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/default.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml/default.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-apply-default.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-apply-default.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-apply-default.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-apply-default.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-apply-staging.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-apply-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-apply-staging.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-apply-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-autoplan.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-autoplan.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-autoplan.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-autoplan.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/tfvars-yaml/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/main.tf b/server/controllers/events/testdata/test-repos/tfvars-yaml/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/main.tf rename to server/controllers/events/testdata/test-repos/tfvars-yaml/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/staging.backend.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml/staging.backend.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/staging.backend.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml/staging.backend.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/tfvars-yaml/staging.tfvars b/server/controllers/events/testdata/test-repos/tfvars-yaml/staging.tfvars similarity index 100% rename from server/controllers/events/testfixtures/test-repos/tfvars-yaml/staging.tfvars rename to server/controllers/events/testdata/test-repos/tfvars-yaml/staging.tfvars diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/atlantis.yaml b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/atlantis.yaml similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/atlantis.yaml rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/atlantis.yaml diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-apply-all-production.txt b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-apply-all-production.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-apply-all-production.txt rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-apply-all-production.txt diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-apply-all-staging.txt b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-apply-all-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-apply-all-staging.txt rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-apply-all-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-autoplan-production.txt b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-autoplan-production.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-autoplan-production.txt rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-autoplan-production.txt diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-autoplan-staging.txt b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-autoplan-staging.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-autoplan-staging.txt rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-autoplan-staging.txt diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-merge.txt b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-merge.txt similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/exp-output-merge.txt rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/exp-output-merge.txt diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/production/main.tf b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/production/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/production/main.tf rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/production/main.tf diff --git a/server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/staging/main.tf b/server/controllers/events/testdata/test-repos/workspace-parallel-yaml/staging/main.tf similarity index 100% rename from server/controllers/events/testfixtures/test-repos/workspace-parallel-yaml/staging/main.tf rename to server/controllers/events/testdata/test-repos/workspace-parallel-yaml/staging/main.tf diff --git a/server/events/apply_command_runner_test.go b/server/events/apply_command_runner_test.go index d26ccf5cc6..d87e323ef4 100644 --- a/server/events/apply_command_runner_test.go +++ b/server/events/apply_command_runner_test.go @@ -10,7 +10,7 @@ import ( "github.com/runatlantis/atlantis/server/events" "github.com/runatlantis/atlantis/server/events/command" "github.com/runatlantis/atlantis/server/events/models" - "github.com/runatlantis/atlantis/server/events/models/fixtures" + "github.com/runatlantis/atlantis/server/events/models/testdata" "github.com/runatlantis/atlantis/server/logging" "github.com/runatlantis/atlantis/server/metrics" ) @@ -53,23 +53,23 @@ func TestApplyCommandRunner_IsLocked(t *testing.T) { pull := &github.PullRequest{ State: github.String("open"), } - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState, Num: fixtures.Pull.Num} - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(pull, nil) - When(eventParsing.ParseGithubPull(pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState, Num: testdata.Pull.Num} + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(pull, nil) + When(eventParsing.ParseGithubPull(pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) ctx := &command.Context{ - User: fixtures.User, + User: testdata.User, Log: logging.NewNoopLogger(t), Scope: scopeNull, Pull: modelPull, - HeadRepo: fixtures.GithubRepo, + HeadRepo: testdata.GithubRepo, Trigger: command.CommentTrigger, } When(applyLockChecker.CheckApplyLock()).ThenReturn(locking.ApplyCommandLock{Locked: c.ApplyLocked}, c.ApplyLockError) applyCommandRunner.Run(ctx, &events.CommentCommand{Name: command.Apply}) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, modelPull.Num, c.ExpComment, "apply") + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GithubRepo, modelPull.Num, c.ExpComment, "apply") }) } } diff --git a/server/events/approve_policies_command_runner_test.go b/server/events/approve_policies_command_runner_test.go index 1f86f5b7c5..8db1ad1216 100644 --- a/server/events/approve_policies_command_runner_test.go +++ b/server/events/approve_policies_command_runner_test.go @@ -9,7 +9,7 @@ import ( "github.com/runatlantis/atlantis/server/events/command" "github.com/runatlantis/atlantis/server/events/mocks/matchers" "github.com/runatlantis/atlantis/server/events/models" - "github.com/runatlantis/atlantis/server/events/models/fixtures" + "github.com/runatlantis/atlantis/server/events/models/testdata" "github.com/runatlantis/atlantis/server/logging" "github.com/runatlantis/atlantis/server/metrics" ) @@ -32,7 +32,7 @@ func TestApproveCommandRunner_IsOwner(t *testing.T) { }, { Description: "When user is an owner, approval succeeds", - OwnerUsers: []string{fixtures.User.Username}, + OwnerUsers: []string{testdata.User.Username}, OwnerTeams: []string{}, ExpComment: "Approved Policies for 1 projects:\n\n1. dir: `` workspace: ``", }, @@ -52,7 +52,7 @@ func TestApproveCommandRunner_IsOwner(t *testing.T) { }, { Description: "When user is an owner but not a team member, approval succeeds", - OwnerUsers: []string{fixtures.User.Username}, + OwnerUsers: []string{testdata.User.Username}, OwnerTeams: []string{"SomeTeam"}, UserTeams: []string{"SomeOtherTeam"}, ExpComment: "Approved Policies for 1 projects:\n\n1. dir: `` workspace: ``", @@ -65,14 +65,14 @@ func TestApproveCommandRunner_IsOwner(t *testing.T) { scopeNull, _, _ := metrics.NewLoggingScope(logger, "atlantis") - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState, Num: fixtures.Pull.Num} + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState, Num: testdata.Pull.Num} ctx := &command.Context{ - User: fixtures.User, + User: testdata.User, Log: logging.NewNoopLogger(t), Scope: scopeNull, Pull: modelPull, - HeadRepo: fixtures.GithubRepo, + HeadRepo: testdata.GithubRepo, Trigger: command.CommentTrigger, } @@ -87,11 +87,11 @@ func TestApproveCommandRunner_IsOwner(t *testing.T) { }, }, }, nil) - When(vcsClient.GetTeamNamesForUser(fixtures.GithubRepo, fixtures.User)).ThenReturn(c.UserTeams, nil) + When(vcsClient.GetTeamNamesForUser(testdata.GithubRepo, testdata.User)).ThenReturn(c.UserTeams, nil) approvePoliciesCommandRunner.Run(ctx, &events.CommentCommand{Name: command.ApprovePolicies}) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, modelPull.Num, c.ExpComment, "approve_policies") + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GithubRepo, modelPull.Num, c.ExpComment, "approve_policies") }) } } diff --git a/server/events/command_runner_test.go b/server/events/command_runner_test.go index 1d4cace7b3..edc99356b6 100644 --- a/server/events/command_runner_test.go +++ b/server/events/command_runner_test.go @@ -33,7 +33,7 @@ import ( "github.com/runatlantis/atlantis/server/events/mocks" "github.com/runatlantis/atlantis/server/events/mocks/matchers" "github.com/runatlantis/atlantis/server/events/models" - "github.com/runatlantis/atlantis/server/events/models/fixtures" + "github.com/runatlantis/atlantis/server/events/models/testdata" vcsmocks "github.com/runatlantis/atlantis/server/events/vcs/mocks" vcsmatchers "github.com/runatlantis/atlantis/server/events/vcs/mocks/matchers" . "github.com/runatlantis/atlantis/testing" @@ -250,8 +250,8 @@ func setup(t *testing.T, options ...func(testConfig *TestConfig)) *vcsmocks.Mock func TestRunCommentCommand_LogPanics(t *testing.T) { t.Log("if there is a panic it is commented back on the pull request") vcsClient := setup(t) - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenPanic("panic test - if you're seeing this in a test failure this isn't the failing test") - ch.RunCommentCommand(fixtures.GithubRepo, &fixtures.GithubRepo, nil, fixtures.User, 1, &events.CommentCommand{Name: command.Plan}) + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenPanic("panic test - if you're seeing this in a test failure this isn't the failing test") + ch.RunCommentCommand(testdata.GithubRepo, &testdata.GithubRepo, nil, testdata.User, 1, &events.CommentCommand{Name: command.Plan}) _, _, comment, _ := vcsClient.VerifyWasCalledOnce().CreateComment(matchers.AnyModelsRepo(), AnyInt(), AnyString(), AnyString()).GetCapturedArguments() Assert(t, strings.Contains(comment, "Error: goroutine panic"), fmt.Sprintf("comment should be about a goroutine panic but was %q", comment)) } @@ -259,28 +259,28 @@ func TestRunCommentCommand_LogPanics(t *testing.T) { func TestRunCommentCommand_GithubPullErr(t *testing.T) { t.Log("if getting the github pull request fails an error should be logged") vcsClient := setup(t) - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(nil, errors.New("err")) - ch.RunCommentCommand(fixtures.GithubRepo, &fixtures.GithubRepo, nil, fixtures.User, fixtures.Pull.Num, nil) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, fixtures.Pull.Num, "`Error: making pull request API call to GitHub: err`", "") + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(nil, errors.New("err")) + ch.RunCommentCommand(testdata.GithubRepo, &testdata.GithubRepo, nil, testdata.User, testdata.Pull.Num, nil) + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GithubRepo, testdata.Pull.Num, "`Error: making pull request API call to GitHub: err`", "") } func TestRunCommentCommand_GitlabMergeRequestErr(t *testing.T) { t.Log("if getting the gitlab merge request fails an error should be logged") vcsClient := setup(t) - When(gitlabGetter.GetMergeRequest(fixtures.GitlabRepo.FullName, fixtures.Pull.Num)).ThenReturn(nil, errors.New("err")) - ch.RunCommentCommand(fixtures.GitlabRepo, &fixtures.GitlabRepo, nil, fixtures.User, fixtures.Pull.Num, nil) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GitlabRepo, fixtures.Pull.Num, "`Error: making merge request API call to GitLab: err`", "") + When(gitlabGetter.GetMergeRequest(testdata.GitlabRepo.FullName, testdata.Pull.Num)).ThenReturn(nil, errors.New("err")) + ch.RunCommentCommand(testdata.GitlabRepo, &testdata.GitlabRepo, nil, testdata.User, testdata.Pull.Num, nil) + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GitlabRepo, testdata.Pull.Num, "`Error: making merge request API call to GitLab: err`", "") } func TestRunCommentCommand_GithubPullParseErr(t *testing.T) { t.Log("if parsing the returned github pull request fails an error should be logged") vcsClient := setup(t) var pull github.PullRequest - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) - When(eventParsing.ParseGithubPull(&pull)).ThenReturn(fixtures.Pull, fixtures.GithubRepo, fixtures.GitlabRepo, errors.New("err")) + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) + When(eventParsing.ParseGithubPull(&pull)).ThenReturn(testdata.Pull, testdata.GithubRepo, testdata.GitlabRepo, errors.New("err")) - ch.RunCommentCommand(fixtures.GithubRepo, &fixtures.GithubRepo, nil, fixtures.User, fixtures.Pull.Num, nil) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, fixtures.Pull.Num, "`Error: extracting required fields from comment data: err`", "") + ch.RunCommentCommand(testdata.GithubRepo, &testdata.GithubRepo, nil, testdata.User, testdata.Pull.Num, nil) + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GithubRepo, testdata.Pull.Num, "`Error: extracting required fields from comment data: err`", "") } func TestRunCommentCommand_TeamAllowListChecker(t *testing.T) { @@ -290,15 +290,15 @@ func TestRunCommentCommand_TeamAllowListChecker(t *testing.T) { ch.TeamAllowlistChecker = nil var pull github.PullRequest modelPull := models.PullRequest{ - BaseRepo: fixtures.GithubRepo, + BaseRepo: testdata.GithubRepo, State: models.OpenPullState, } - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) - When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) + When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.Plan}) - vcsClient.VerifyWasCalled(Never()).GetTeamNamesForUser(fixtures.GithubRepo, fixtures.User) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, modelPull.Num, "Ran Plan for 0 projects:", "plan") + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Plan}) + vcsClient.VerifyWasCalled(Never()).GetTeamNamesForUser(testdata.GithubRepo, testdata.User) + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GithubRepo, modelPull.Num, "Ran Plan for 0 projects:", "plan") }) t.Run("no rules", func(t *testing.T) { @@ -307,15 +307,15 @@ func TestRunCommentCommand_TeamAllowListChecker(t *testing.T) { ch.TeamAllowlistChecker = &events.TeamAllowlistChecker{} var pull github.PullRequest modelPull := models.PullRequest{ - BaseRepo: fixtures.GithubRepo, + BaseRepo: testdata.GithubRepo, State: models.OpenPullState, } - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) - When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) + When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.Plan}) - vcsClient.VerifyWasCalled(Never()).GetTeamNamesForUser(fixtures.GithubRepo, fixtures.User) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, modelPull.Num, "Ran Plan for 0 projects:", "plan") + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Plan}) + vcsClient.VerifyWasCalled(Never()).GetTeamNamesForUser(testdata.GithubRepo, testdata.User) + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GithubRepo, modelPull.Num, "Ran Plan for 0 projects:", "plan") }) } @@ -328,19 +328,19 @@ func TestRunCommentCommand_ForkPRDisabled(t *testing.T) { ch.SilenceForkPRErrors = false var pull github.PullRequest modelPull := models.PullRequest{ - BaseRepo: fixtures.GithubRepo, + BaseRepo: testdata.GithubRepo, State: models.OpenPullState, } - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) - headRepo := fixtures.GithubRepo + headRepo := testdata.GithubRepo headRepo.FullName = "forkrepo/atlantis" headRepo.Owner = "forkrepo" When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, headRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.Plan}) + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Plan}) commentMessage := fmt.Sprintf("Atlantis commands can't be run on fork pull requests. To enable, set --%s or, to disable this message, set --%s", ch.AllowForkPRsFlag, ch.SilenceForkPRErrorsFlag) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, modelPull.Num, commentMessage, "") + vcsClient.VerifyWasCalledOnce().CreateComment(testdata.GithubRepo, modelPull.Num, commentMessage, "") } func TestRunCommentCommand_ForkPRDisabled_SilenceEnabled(t *testing.T) { @@ -349,15 +349,15 @@ func TestRunCommentCommand_ForkPRDisabled_SilenceEnabled(t *testing.T) { ch.AllowForkPRs = false // by default it's false so don't need to reset ch.SilenceForkPRErrors = true var pull github.PullRequest - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState} - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState} + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) - headRepo := fixtures.GithubRepo + headRepo := testdata.GithubRepo headRepo.FullName = "forkrepo/atlantis" headRepo.Owner = "forkrepo" When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, headRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.Plan}) + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Plan}) vcsClient.VerifyWasCalled(Never()).CreateComment(matchers.AnyModelsRepo(), AnyInt(), AnyString(), AnyString()) } @@ -366,11 +366,11 @@ func TestRunCommentCommandPlan_NoProjects_SilenceEnabled(t *testing.T) { vcsClient := setup(t) planCommandRunner.SilenceNoProjects = true var pull github.PullRequest - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState} - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) - When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState} + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) + When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.Plan}) + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Plan}) vcsClient.VerifyWasCalled(Never()).CreateComment(matchers.AnyModelsRepo(), AnyInt(), AnyString(), AnyString()) commitUpdater.VerifyWasCalledOnce().UpdateCombinedCount( matchers.AnyModelsRepo(), @@ -387,11 +387,11 @@ func TestRunCommentCommandApply_NoProjects_SilenceEnabled(t *testing.T) { vcsClient := setup(t) applyCommandRunner.SilenceNoProjects = true var pull github.PullRequest - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState} - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) - When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState} + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) + When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.Apply}) + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Apply}) vcsClient.VerifyWasCalled(Never()).CreateComment(matchers.AnyModelsRepo(), AnyInt(), AnyString(), AnyString()) commitUpdater.VerifyWasCalledOnce().UpdateCombinedCount( matchers.AnyModelsRepo(), @@ -408,11 +408,11 @@ func TestRunCommentCommandApprovePolicy_NoProjects_SilenceEnabled(t *testing.T) vcsClient := setup(t) approvePoliciesCommandRunner.SilenceNoProjects = true var pull github.PullRequest - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState} - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) - When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState} + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) + When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.ApprovePolicies}) + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.ApprovePolicies}) vcsClient.VerifyWasCalled(Never()).CreateComment(matchers.AnyModelsRepo(), AnyInt(), AnyString(), AnyString()) commitUpdater.VerifyWasCalledOnce().UpdateCombinedCount( matchers.AnyModelsRepo(), @@ -429,11 +429,11 @@ func TestRunCommentCommandUnlock_NoProjects_SilenceEnabled(t *testing.T) { vcsClient := setup(t) unlockCommandRunner.SilenceNoProjects = true var pull github.PullRequest - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState} - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(&pull, nil) - When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState} + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(&pull, nil) + When(eventParsing.ParseGithubPull(&pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, fixtures.Pull.Num, &events.CommentCommand{Name: command.Unlock}) + ch.RunCommentCommand(testdata.GithubRepo, nil, nil, testdata.User, testdata.Pull.Num, &events.CommentCommand{Name: command.Unlock}) vcsClient.VerifyWasCalled(Never()).CreateComment(matchers.AnyModelsRepo(), AnyInt(), AnyString(), AnyString()) } @@ -445,12 +445,12 @@ func TestRunCommentCommand_DisableApplyAllDisabled(t *testing.T) { pull := &github.PullRequest{ State: github.String("open"), } - modelPull := models.PullRequest{BaseRepo: fixtures.GithubRepo, State: models.OpenPullState, Num: fixtures.Pull.Num} - When(githubGetter.GetPullRequest(fixtures.GithubRepo, fixtures.Pull.Num)).ThenReturn(pull, nil) - When(eventParsing.ParseGithubPull(pull)).ThenReturn(modelPull, modelPull.BaseRepo, fixtures.GithubRepo, nil) + modelPull := models.PullRequest{BaseRepo: testdata.GithubRepo, State: models.OpenPullState, Num: testdata.Pull.Num} + When(githubGetter.GetPullRequest(testdata.GithubRepo, testdata.Pull.Num)).ThenReturn(pull, nil) + When(eventParsing.ParseGithubPull(pull)).ThenReturn(modelPull, modelPull.BaseRepo, testdata.GithubRepo, nil) - ch.RunCommentCommand(fixtures.GithubRepo, nil, nil, fixtures.User, modelPull.Num, &events.CommentCommand{Name: command.Apply}) - vcsClient.VerifyWasCalledOnce().CreateComment(fixtures.GithubRepo, modelPull.Num, "**Error:** Running `atlantis apply` without flags is disabled. You must specify which project to apply via the `-d