From 5928a7018dfb26ae1752b916bf259c4e49c6861a Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Fri, 8 Mar 2024 14:46:42 +0000 Subject: [PATCH 1/6] chore: move e2etests to top-level directory. This is a preparation for using parallel scripts in the repo. The e2etests package has no real ordering dependency on the cmd and cmd/terramate directories, then by moving it up we allow it running in parallel with all other tests. Signed-off-by: Tiago Natel --- .../cloud/cloud_helpers_test.go | 0 .../cloud/cloud_status_test.go | 5 ++--- .../cloud/exp_trigger_cloud_test.go | 7 +++--- .../cloud/generate-e2e-testserver.tm | 8 +++++-- .../cloud/interop/interoperability_test.go | 0 .../cloud/interop/main_test.go | 0 .../interop/testdata/event_pull_request.json | 0 .../interop-stacks/basic-drift/main.tf | 0 .../interop-stacks/basic-drift/stack.tm.hcl | 2 +- .../interop-stacks/basic-terraform/main.tf | 0 .../basic-terraform/stack.tm.hcl | 0 .../interop-stacks/empty/stack.tm.hcl | 2 +- .../cloud/loglevel_test.go | 0 .../e2etests => e2etests}/cloud/main_test.go | 6 ++--- .../cloud/run_cloud_config_test.go | 5 ++--- .../cloud/run_cloud_deployment_test.go | 4 ++-- .../cloud/run_cloud_drift_test.go | 4 ++-- .../cloud/run_cloud_signal_test.go | 7 +++--- .../cloud/run_cloud_uimode_test.go | 5 ++--- .../cloud/run_script_cloud_deployment_test.go | 5 ++--- .../cloud/run_script_cloud_drift_test.go | 4 ++-- .../cloud-sync-drift-plan-file/main.tf | 0 .../sanitized.plan.json | 0 .../cloud/testdata/cloud.data.json | 0 .../e2etests => e2etests}/cmd/helper/main.go | 0 .../core/create_all_terraform_test.go | 7 +++++- .../core/create_all_terragrunt_test.go | 4 +++- .../e2etests => e2etests}/core/create_test.go | 5 ++++- .../core/debug_show_generate_test.go | 4 ++-- .../core/debug_show_globals_test.go | 2 +- .../core/debug_show_metadata_test.go | 2 +- .../core/exp_clone_test.go | 3 ++- .../core/exp_eval_test.go | 2 +- .../core/exp_run_order_test.go | 2 +- .../core/exp_trigger_test.go | 2 +- .../core/exp_vendor_test.go | 2 +- .../e2etests => e2etests}/core/fmt_test.go | 2 +- .../core/general_test.go | 2 +- .../core/generate_test.go | 2 +- .../core/imports_test.go | 2 +- .../core/list_git_test.go | 2 +- .../core/list_nongit_test.go | 2 +- .../core/list_run_order_test.go | 2 +- .../e2etests => e2etests}/core/list_test.go | 2 +- .../core/list_watch_test.go | 2 +- .../core/logging_test.go | 2 +- .../core/loglevel_test.go | 0 .../e2etests => e2etests}/core/main_test.go | 4 ++-- .../core/run_eval_test.go | 2 +- .../core/run_parallel_test.go | 4 +++- .../core/run_script_test.go | 2 +- .../core/run_signal_test.go | 0 .../e2etests => e2etests}/core/run_test.go | 2 +- .../core/run_unix_test.go | 2 +- .../core/safeguard_test.go | 2 +- .../core/script_info_test.go | 2 +- .../core/script_list_test.go | 2 +- .../core/version_check_test.go | 2 +- .../internal/runner/builders.go | 2 +- .../internal/runner/doc.go | 0 .../internal/runner/installers.go | 0 .../internal/runner/runner.go | 22 +++++++++++++++++-- .../internal/runner/runner_signal_fixture.go | 0 .../internal/runner/runner_unix.go | 0 .../internal/runner/runner_windows.go | 0 .../internal/runner/setup.go | 0 66 files changed, 98 insertions(+), 69 deletions(-) rename {cmd/terramate/e2etests => e2etests}/cloud/cloud_helpers_test.go (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/cloud_status_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/cloud/exp_trigger_cloud_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/cloud/generate-e2e-testserver.tm (91%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/interoperability_test.go (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/main_test.go (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/testdata/event_pull_request.json (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/testdata/interop-stacks/basic-drift/main.tf (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/testdata/interop-stacks/basic-drift/stack.tm.hcl (74%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/testdata/interop-stacks/basic-terraform/main.tf (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/testdata/interop-stacks/basic-terraform/stack.tm.hcl (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/interop/testdata/interop-stacks/empty/stack.tm.hcl (72%) rename {cmd/terramate/e2etests => e2etests}/cloud/loglevel_test.go (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/main_test.go (76%) rename {cmd/terramate/e2etests => e2etests}/cloud/run_cloud_config_test.go (97%) rename {cmd/terramate/e2etests => e2etests}/cloud/run_cloud_deployment_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/cloud/run_cloud_drift_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/cloud/run_cloud_signal_test.go (97%) rename {cmd/terramate/e2etests => e2etests}/cloud/run_cloud_uimode_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/cloud/run_script_cloud_deployment_test.go (97%) rename {cmd/terramate/e2etests => e2etests}/cloud/run_script_cloud_drift_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/cloud/testdata/cloud-sync-drift-plan-file/main.tf (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/testdata/cloud-sync-drift-plan-file/sanitized.plan.json (100%) rename {cmd/terramate/e2etests => e2etests}/cloud/testdata/cloud.data.json (100%) rename {cmd/terramate/e2etests => e2etests}/cmd/helper/main.go (100%) rename {cmd/terramate/e2etests => e2etests}/core/create_all_terraform_test.go (96%) rename {cmd/terramate/e2etests => e2etests}/core/create_all_terragrunt_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/create_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/debug_show_generate_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/debug_show_globals_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/debug_show_metadata_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/exp_clone_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/exp_eval_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/exp_run_order_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/exp_trigger_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/exp_vendor_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/fmt_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/general_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/generate_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/imports_test.go (94%) rename {cmd/terramate/e2etests => e2etests}/core/list_git_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/list_nongit_test.go (89%) rename {cmd/terramate/e2etests => e2etests}/core/list_run_order_test.go (92%) rename {cmd/terramate/e2etests => e2etests}/core/list_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/list_watch_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/logging_test.go (88%) rename {cmd/terramate/e2etests => e2etests}/core/loglevel_test.go (100%) rename {cmd/terramate/e2etests => e2etests}/core/main_test.go (78%) rename {cmd/terramate/e2etests => e2etests}/core/run_eval_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/run_parallel_test.go (93%) rename {cmd/terramate/e2etests => e2etests}/core/run_script_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/run_signal_test.go (100%) rename {cmd/terramate/e2etests => e2etests}/core/run_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/run_unix_test.go (95%) rename {cmd/terramate/e2etests => e2etests}/core/safeguard_test.go (99%) rename {cmd/terramate/e2etests => e2etests}/core/script_info_test.go (98%) rename {cmd/terramate/e2etests => e2etests}/core/script_list_test.go (97%) rename {cmd/terramate/e2etests => e2etests}/core/version_check_test.go (97%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/builders.go (97%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/doc.go (100%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/installers.go (100%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/runner.go (95%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/runner_signal_fixture.go (100%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/runner_unix.go (100%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/runner_windows.go (100%) rename {cmd/terramate/e2etests => e2etests}/internal/runner/setup.go (100%) diff --git a/cmd/terramate/e2etests/cloud/cloud_helpers_test.go b/e2etests/cloud/cloud_helpers_test.go similarity index 100% rename from cmd/terramate/e2etests/cloud/cloud_helpers_test.go rename to e2etests/cloud/cloud_helpers_test.go diff --git a/cmd/terramate/e2etests/cloud/cloud_status_test.go b/e2etests/cloud/cloud_status_test.go similarity index 98% rename from cmd/terramate/e2etests/cloud/cloud_status_test.go rename to e2etests/cloud/cloud_status_test.go index f4c5b1525..46b23552a 100644 --- a/cmd/terramate/e2etests/cloud/cloud_status_test.go +++ b/e2etests/cloud/cloud_status_test.go @@ -5,7 +5,6 @@ package cloud_test import ( "fmt" - "os" "path/filepath" "sort" "strconv" @@ -17,7 +16,7 @@ import ( "github.com/terramate-io/terramate/cloud/drift" "github.com/terramate-io/terramate/cloud/stack" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" "github.com/terramate-io/terramate/test/sandbox" @@ -387,7 +386,7 @@ func TestCloudStatus(t *testing.T) { _, err := store.UpsertStack(org.UUID, st) assert.NoError(t, err) } - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, "TMC_API_URL=http://"+addr, "CI=") if tc.perPage != 0 { env = append(env, "TMC_API_PAGESIZE="+strconv.Itoa(tc.perPage)) diff --git a/cmd/terramate/e2etests/cloud/exp_trigger_cloud_test.go b/e2etests/cloud/exp_trigger_cloud_test.go similarity index 98% rename from cmd/terramate/e2etests/cloud/exp_trigger_cloud_test.go rename to e2etests/cloud/exp_trigger_cloud_test.go index 08e30b4fe..9f5dc18a5 100644 --- a/cmd/terramate/e2etests/cloud/exp_trigger_cloud_test.go +++ b/e2etests/cloud/exp_trigger_cloud_test.go @@ -5,7 +5,6 @@ package cloud_test import ( "fmt" - "os" "path/filepath" "testing" @@ -15,7 +14,7 @@ import ( "github.com/terramate-io/terramate/cloud/drift" "github.com/terramate-io/terramate/cloud/stack" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" ) @@ -60,7 +59,7 @@ func TestTriggerUnhealthyStacks(t *testing.T) { assert.NoError(t, err) git.SetRemoteURL("origin", fmt.Sprintf(`https://%s.git`, repository)) - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, "TMC_API_URL=http://"+addr, "CI=") cli := NewCLI(t, s.RootDir(), env...) AssertRunResult(t, cli.Run("experimental", "trigger", "--cloud-status=unhealthy"), RunExpected{ @@ -541,7 +540,7 @@ func TestCloudTriggerUnhealthy(t *testing.T) { _, err := store.UpsertStack(org.UUID, st) assert.NoError(t, err) } - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, "TMC_API_URL=http://"+addr, "CI=") cli := NewCLI(t, filepath.Join(s.RootDir(), tc.workingDir), env...) args := []string{"experimental", "trigger"} diff --git a/cmd/terramate/e2etests/cloud/generate-e2e-testserver.tm b/e2etests/cloud/generate-e2e-testserver.tm similarity index 91% rename from cmd/terramate/e2etests/cloud/generate-e2e-testserver.tm rename to e2etests/cloud/generate-e2e-testserver.tm index 46918fa91..6597983a8 100644 --- a/cmd/terramate/e2etests/cloud/generate-e2e-testserver.tm +++ b/e2etests/cloud/generate-e2e-testserver.tm @@ -1,8 +1,12 @@ // Copyright 2023 Terramate GmbH // SPDX-License-Identifier: MPL-2.0 -generate_file "/cmd/terramate/e2etests/cloud/testdata/cloud.data.json" { - context = root +generate_file "testdata/cloud.data.json" { + stack_filter { + project_paths = [ + "/e2etests/cloud" + ] + } lets { well_known = { diff --git a/cmd/terramate/e2etests/cloud/interop/interoperability_test.go b/e2etests/cloud/interop/interoperability_test.go similarity index 100% rename from cmd/terramate/e2etests/cloud/interop/interoperability_test.go rename to e2etests/cloud/interop/interoperability_test.go diff --git a/cmd/terramate/e2etests/cloud/interop/main_test.go b/e2etests/cloud/interop/main_test.go similarity index 100% rename from cmd/terramate/e2etests/cloud/interop/main_test.go rename to e2etests/cloud/interop/main_test.go diff --git a/cmd/terramate/e2etests/cloud/interop/testdata/event_pull_request.json b/e2etests/cloud/interop/testdata/event_pull_request.json similarity index 100% rename from cmd/terramate/e2etests/cloud/interop/testdata/event_pull_request.json rename to e2etests/cloud/interop/testdata/event_pull_request.json diff --git a/cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/main.tf b/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/main.tf similarity index 100% rename from cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/main.tf rename to e2etests/cloud/interop/testdata/interop-stacks/basic-drift/main.tf diff --git a/cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/stack.tm.hcl b/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/stack.tm.hcl similarity index 74% rename from cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/stack.tm.hcl rename to e2etests/cloud/interop/testdata/interop-stacks/basic-drift/stack.tm.hcl index 451e40faf..975783369 100644 --- a/cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/stack.tm.hcl +++ b/e2etests/cloud/interop/testdata/interop-stacks/basic-drift/stack.tm.hcl @@ -5,5 +5,5 @@ stack { name = "basic-drift" description = "basic-drift" id = "2530f1b3-2691-48dc-b418-e966f7e1441c" - after = ["../empty"] # only used for visualizing the graph. + tags = ["testdata"] } diff --git a/cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/main.tf b/e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/main.tf similarity index 100% rename from cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/main.tf rename to e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/main.tf diff --git a/cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/stack.tm.hcl b/e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/stack.tm.hcl similarity index 100% rename from cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/stack.tm.hcl rename to e2etests/cloud/interop/testdata/interop-stacks/basic-terraform/stack.tm.hcl diff --git a/cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/empty/stack.tm.hcl b/e2etests/cloud/interop/testdata/interop-stacks/empty/stack.tm.hcl similarity index 72% rename from cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/empty/stack.tm.hcl rename to e2etests/cloud/interop/testdata/interop-stacks/empty/stack.tm.hcl index be733071e..6ac826272 100644 --- a/cmd/terramate/e2etests/cloud/interop/testdata/interop-stacks/empty/stack.tm.hcl +++ b/e2etests/cloud/interop/testdata/interop-stacks/empty/stack.tm.hcl @@ -5,5 +5,5 @@ stack { name = "empty" description = "empty" id = "04437b1f-27a9-4eab-8e63-1df968b76f6b" - before = ["/testdata/example-stack", "/testdata/testserver"] + tags = ["testdata"] } diff --git a/cmd/terramate/e2etests/cloud/loglevel_test.go b/e2etests/cloud/loglevel_test.go similarity index 100% rename from cmd/terramate/e2etests/cloud/loglevel_test.go rename to e2etests/cloud/loglevel_test.go diff --git a/cmd/terramate/e2etests/cloud/main_test.go b/e2etests/cloud/main_test.go similarity index 76% rename from cmd/terramate/e2etests/cloud/main_test.go rename to e2etests/cloud/main_test.go index 14ed9020d..26993c288 100644 --- a/cmd/terramate/e2etests/cloud/main_test.go +++ b/e2etests/cloud/main_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + "github.com/terramate-io/terramate/e2etests/internal/runner" ) const testserverJSONFile = "testdata/cloud.data.json" @@ -21,9 +21,9 @@ func TestMain(m *testing.M) { log.Printf("failed to get test working directory: %v", err) os.Exit(1) } - // this file is inside cmd/terramate/e2etests/cloud + // this file is inside e2etests/cloud // change code below if it's not the case anymore. - projectRoot := filepath.Join(packageDir, "../../../..") + projectRoot := filepath.Join(packageDir, "../../") err = runner.Setup(projectRoot) if err != nil { log.Fatal(err) diff --git a/cmd/terramate/e2etests/cloud/run_cloud_config_test.go b/e2etests/cloud/run_cloud_config_test.go similarity index 97% rename from cmd/terramate/e2etests/cloud/run_cloud_config_test.go rename to e2etests/cloud/run_cloud_config_test.go index 39eadad34..f4aebc4a2 100644 --- a/cmd/terramate/e2etests/cloud/run_cloud_config_test.go +++ b/e2etests/cloud/run_cloud_config_test.go @@ -8,7 +8,6 @@ import ( "fmt" "net" "net/http" - "os" "testing" "time" @@ -16,7 +15,7 @@ import ( "github.com/terramate-io/terramate/cloud/testserver" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" "github.com/terramate-io/terramate/cmd/terramate/cli/clitest" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) @@ -166,7 +165,7 @@ func TestCloudConfig(t *testing.T) { } s.BuildTree(layout) s.Git().CommitAll("created stacks") - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() for k, v := range tc.customEnv { env = append(env, fmt.Sprintf("%v=%v", k, v)) diff --git a/cmd/terramate/e2etests/cloud/run_cloud_deployment_test.go b/e2etests/cloud/run_cloud_deployment_test.go similarity index 99% rename from cmd/terramate/e2etests/cloud/run_cloud_deployment_test.go rename to e2etests/cloud/run_cloud_deployment_test.go index 6f0518cd6..97e79cc45 100644 --- a/cmd/terramate/e2etests/cloud/run_cloud_deployment_test.go +++ b/e2etests/cloud/run_cloud_deployment_test.go @@ -19,7 +19,7 @@ import ( "github.com/terramate-io/terramate/cloud/testserver" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" "github.com/terramate-io/terramate/cmd/terramate/cli/clitest" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/errors" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" @@ -392,7 +392,7 @@ func TestCLIRunWithCloudSyncDeployment(t *testing.T) { s.BuildTree(genIdsLayout) s.Git().CommitAll("all stacks committed") - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, "TMC_API_URL=http://"+addr) env = append(env, tc.env...) cli := NewCLI(t, filepath.Join(s.RootDir(), filepath.FromSlash(tc.workingDir)), env...) diff --git a/cmd/terramate/e2etests/cloud/run_cloud_drift_test.go b/e2etests/cloud/run_cloud_drift_test.go similarity index 99% rename from cmd/terramate/e2etests/cloud/run_cloud_drift_test.go rename to e2etests/cloud/run_cloud_drift_test.go index 99a8392f2..2e4100552 100644 --- a/cmd/terramate/e2etests/cloud/run_cloud_drift_test.go +++ b/e2etests/cloud/run_cloud_drift_test.go @@ -22,7 +22,7 @@ import ( "github.com/terramate-io/terramate/cloud/drift" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" "github.com/terramate-io/terramate/cmd/terramate/cli/clitest" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" ) @@ -518,7 +518,7 @@ func TestCLIRunWithCloudSyncDriftStatus(t *testing.T) { s.BuildTree(tc.layout) s.Git().CommitAll("all stacks committed") - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, tc.env...) env = append(env, "TMC_API_URL=http://"+addr) cli := NewCLI(t, filepath.Join(s.RootDir(), filepath.FromSlash(tc.workingDir)), env...) diff --git a/cmd/terramate/e2etests/cloud/run_cloud_signal_test.go b/e2etests/cloud/run_cloud_signal_test.go similarity index 97% rename from cmd/terramate/e2etests/cloud/run_cloud_signal_test.go rename to e2etests/cloud/run_cloud_signal_test.go index 36076e1d0..33f88a5ac 100644 --- a/cmd/terramate/e2etests/cloud/run_cloud_signal_test.go +++ b/e2etests/cloud/run_cloud_signal_test.go @@ -4,7 +4,6 @@ package cloud_test import ( - "os" "path/filepath" "strings" "testing" @@ -14,7 +13,7 @@ import ( "github.com/terramate-io/terramate/cloud" "github.com/terramate-io/terramate/cloud/drift" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) @@ -108,7 +107,7 @@ func TestCLIRunWithCloudSyncDeploymentWithSignals(t *testing.T) { s.BuildTree(genIdsLayout) s.Git().CommitAll("all stacks committed") - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, "TMC_API_URL=http://"+addr) cli := NewCLI(t, filepath.Join(s.RootDir(), filepath.FromSlash(tc.workingDir)), env...) @@ -210,7 +209,7 @@ func TestCLIRunWithCloudSyncDriftStatusWithSignals(t *testing.T) { s.BuildTree(tc.layout) s.Git().CommitAll("all stacks committed") - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, "TMC_API_URL=http://"+addr) cli := NewCLI(t, filepath.Join(s.RootDir(), filepath.FromSlash(tc.workingDir)), env...) diff --git a/cmd/terramate/e2etests/cloud/run_cloud_uimode_test.go b/e2etests/cloud/run_cloud_uimode_test.go similarity index 99% rename from cmd/terramate/e2etests/cloud/run_cloud_uimode_test.go rename to e2etests/cloud/run_cloud_uimode_test.go index 844401838..5921136b1 100644 --- a/cmd/terramate/e2etests/cloud/run_cloud_uimode_test.go +++ b/e2etests/cloud/run_cloud_uimode_test.go @@ -9,7 +9,6 @@ import ( "fmt" "net" "net/http" - "os" "regexp" "testing" "time" @@ -24,7 +23,7 @@ import ( "github.com/terramate-io/terramate/cloud/testserver/cloudstore" "github.com/terramate-io/terramate/cmd/terramate/cli" "github.com/terramate-io/terramate/cmd/terramate/cli/clitest" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) @@ -1259,7 +1258,7 @@ func TestCloudSyncUIMode(t *testing.T) { if len(subcase.cmd) == 0 { t.Fatal("invalid testcase: cmd not set") } - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() if subcase.uimode == cli.AutomationMode { env = append(env, "CI=true") } diff --git a/cmd/terramate/e2etests/cloud/run_script_cloud_deployment_test.go b/e2etests/cloud/run_script_cloud_deployment_test.go similarity index 97% rename from cmd/terramate/e2etests/cloud/run_script_cloud_deployment_test.go rename to e2etests/cloud/run_script_cloud_deployment_test.go index d59837082..3f0e78a7d 100644 --- a/cmd/terramate/e2etests/cloud/run_script_cloud_deployment_test.go +++ b/e2etests/cloud/run_script_cloud_deployment_test.go @@ -5,7 +5,6 @@ package cloud_test import ( "fmt" - "os" "path/filepath" "strings" "testing" @@ -13,7 +12,7 @@ import ( "github.com/madlambda/spells/assert" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" "github.com/terramate-io/terramate/cmd/terramate/cli/clitest" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" "github.com/terramate-io/terramate/test/sandbox" ) @@ -228,7 +227,7 @@ func TestCLIScriptRunWithCloudSyncDeployment(t *testing.T) { s.BuildTree(genLayout) s.Git().CommitAll("all stacks committed") - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, "TMC_API_URL=http://"+addr) cli := NewCLI(t, filepath.Join(s.RootDir(), filepath.FromSlash(tc.workingDir)), env...) diff --git a/cmd/terramate/e2etests/cloud/run_script_cloud_drift_test.go b/e2etests/cloud/run_script_cloud_drift_test.go similarity index 99% rename from cmd/terramate/e2etests/cloud/run_script_cloud_drift_test.go rename to e2etests/cloud/run_script_cloud_drift_test.go index 4c6b88072..21461e7cb 100644 --- a/cmd/terramate/e2etests/cloud/run_script_cloud_drift_test.go +++ b/e2etests/cloud/run_script_cloud_drift_test.go @@ -15,7 +15,7 @@ import ( "github.com/terramate-io/terramate/cloud/drift" "github.com/terramate-io/terramate/cloud/testserver/cloudstore" "github.com/terramate-io/terramate/cmd/terramate/cli/clitest" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" "github.com/terramate-io/terramate/test/sandbox" @@ -499,7 +499,7 @@ func TestScriptRunDriftStatus(t *testing.T) { s.BuildTree(tc.layout) s.Git().CommitAll("all stacks committed") - env := RemoveEnv(os.Environ(), "CI") + env := CleanEnv() env = append(env, tc.env...) env = append(env, "TMC_API_URL=http://"+addr) cli := NewCLI(t, filepath.Join(s.RootDir(), filepath.FromSlash(tc.workingDir)), env...) diff --git a/cmd/terramate/e2etests/cloud/testdata/cloud-sync-drift-plan-file/main.tf b/e2etests/cloud/testdata/cloud-sync-drift-plan-file/main.tf similarity index 100% rename from cmd/terramate/e2etests/cloud/testdata/cloud-sync-drift-plan-file/main.tf rename to e2etests/cloud/testdata/cloud-sync-drift-plan-file/main.tf diff --git a/cmd/terramate/e2etests/cloud/testdata/cloud-sync-drift-plan-file/sanitized.plan.json b/e2etests/cloud/testdata/cloud-sync-drift-plan-file/sanitized.plan.json similarity index 100% rename from cmd/terramate/e2etests/cloud/testdata/cloud-sync-drift-plan-file/sanitized.plan.json rename to e2etests/cloud/testdata/cloud-sync-drift-plan-file/sanitized.plan.json diff --git a/cmd/terramate/e2etests/cloud/testdata/cloud.data.json b/e2etests/cloud/testdata/cloud.data.json similarity index 100% rename from cmd/terramate/e2etests/cloud/testdata/cloud.data.json rename to e2etests/cloud/testdata/cloud.data.json diff --git a/cmd/terramate/e2etests/cmd/helper/main.go b/e2etests/cmd/helper/main.go similarity index 100% rename from cmd/terramate/e2etests/cmd/helper/main.go rename to e2etests/cmd/helper/main.go diff --git a/cmd/terramate/e2etests/core/create_all_terraform_test.go b/e2etests/core/create_all_terraform_test.go similarity index 96% rename from cmd/terramate/e2etests/core/create_all_terraform_test.go rename to e2etests/core/create_all_terraform_test.go index f5d45f498..528efd218 100644 --- a/cmd/terramate/e2etests/core/create_all_terraform_test.go +++ b/e2etests/core/create_all_terraform_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/stack" errtest "github.com/terramate-io/terramate/test/errors" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" @@ -17,6 +17,7 @@ import ( ) func TestCreateWithAllTerraformModuleAtRoot(t *testing.T) { + t.Parallel() s := sandbox.NoGit(t, true) tfBlock := Block("terraform", Block("backend", @@ -40,7 +41,9 @@ func TestCreateWithAllTerraformModuleAtRoot(t *testing.T) { } func TestCreateWithAllTerraformModuleDeepDownInTheTree(t *testing.T) { + t.Parallel() test := func(t *testing.T, generate bool) { + t.Parallel() s := sandbox.NoGit(t, true) backendBlock := Block("terraform", Block("backend", @@ -115,6 +118,7 @@ func TestCreateWithAllTerraformModuleDeepDownInTheTree(t *testing.T) { } func TestCreateWithAllTerraformSkipActualStacks(t *testing.T) { + t.Parallel() s := sandbox.NoGit(t, true) tfBlock := Block("terraform", Block("backend", @@ -132,6 +136,7 @@ func TestCreateWithAllTerraformSkipActualStacks(t *testing.T) { } func TestCreateWithAllTerraformDetectModulesInsideStacks(t *testing.T) { + t.Parallel() s := sandbox.NoGit(t, true) backendContent := Block("terraform", Block("backend", diff --git a/cmd/terramate/e2etests/core/create_all_terragrunt_test.go b/e2etests/core/create_all_terragrunt_test.go similarity index 99% rename from cmd/terramate/e2etests/core/create_all_terragrunt_test.go rename to e2etests/core/create_all_terragrunt_test.go index 5f859a9b4..47d6a6514 100644 --- a/cmd/terramate/e2etests/core/create_all_terragrunt_test.go +++ b/e2etests/core/create_all_terragrunt_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/hclwrite" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" "github.com/terramate-io/terramate/test/sandbox" @@ -15,6 +15,7 @@ import ( ) func TestCreateAllTerragrunt(t *testing.T) { + t.Parallel() type testcase struct { name string layout []string @@ -361,6 +362,7 @@ func TestCreateAllTerragrunt(t *testing.T) { } { tc := tc t.Run(tc.name, func(t *testing.T) { + t.Parallel() s := sandbox.NoGit(t, true) s.BuildTree(tc.layout) tm := NewCLI(t, filepath.Join(s.RootDir(), tc.wd)) diff --git a/cmd/terramate/e2etests/core/create_test.go b/e2etests/core/create_test.go similarity index 98% rename from cmd/terramate/e2etests/core/create_test.go rename to e2etests/core/create_test.go index ef86f9e3c..e5cd0a0c7 100644 --- a/cmd/terramate/e2etests/core/create_test.go +++ b/e2etests/core/create_test.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/project" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" @@ -22,6 +22,7 @@ func TestCreateFailsWithIncompatibleFlags(t *testing.T) { t.Parallel() test := func(t *testing.T, stderrRegex string, args ...string) { + t.Parallel() t.Helper() s := sandbox.NoGit(t, true) root := s.RootEntry() @@ -266,6 +267,7 @@ func TestCreateStackIgnoreExistingFatalOnOtherErrors(t *testing.T) { } func TestCreateEnsureStackID(t *testing.T) { + t.Parallel() type testcase struct { name string layout []string @@ -312,6 +314,7 @@ func TestCreateEnsureStackID(t *testing.T) { } func testEnsureStackID(t *testing.T, wd string, layout []string) { + t.Parallel() s := sandbox.NoGit(t, true) s.BuildTree(layout) if wd == "" { diff --git a/cmd/terramate/e2etests/core/debug_show_generate_test.go b/e2etests/core/debug_show_generate_test.go similarity index 98% rename from cmd/terramate/e2etests/core/debug_show_generate_test.go rename to e2etests/core/debug_show_generate_test.go index 0a569ecc4..fee290146 100644 --- a/cmd/terramate/e2etests/core/debug_show_generate_test.go +++ b/e2etests/core/debug_show_generate_test.go @@ -8,12 +8,13 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" "github.com/terramate-io/terramate/test/sandbox" ) func TestGenerateDebug(t *testing.T) { + t.Parallel() type ( file struct { path string @@ -27,7 +28,6 @@ func TestGenerateDebug(t *testing.T) { want RunExpected } ) - t.Parallel() testcases := []testcase{ { diff --git a/cmd/terramate/e2etests/core/debug_show_globals_test.go b/e2etests/core/debug_show_globals_test.go similarity index 98% rename from cmd/terramate/e2etests/core/debug_show_globals_test.go rename to e2etests/core/debug_show_globals_test.go index 7dcc95d30..c5b58c75f 100644 --- a/cmd/terramate/e2etests/core/debug_show_globals_test.go +++ b/e2etests/core/debug_show_globals_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/project" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/hclwrite" diff --git a/cmd/terramate/e2etests/core/debug_show_metadata_test.go b/e2etests/core/debug_show_metadata_test.go similarity index 98% rename from cmd/terramate/e2etests/core/debug_show_metadata_test.go rename to e2etests/core/debug_show_metadata_test.go index 7c6299b7f..e81fa7f3d 100644 --- a/cmd/terramate/e2etests/core/debug_show_metadata_test.go +++ b/e2etests/core/debug_show_metadata_test.go @@ -6,7 +6,7 @@ package core_test import ( "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/project" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/exp_clone_test.go b/e2etests/core/exp_clone_test.go similarity index 98% rename from cmd/terramate/e2etests/core/exp_clone_test.go rename to e2etests/core/exp_clone_test.go index 2353ed576..ccebaa945 100644 --- a/cmd/terramate/e2etests/core/exp_clone_test.go +++ b/e2etests/core/exp_clone_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" ) @@ -218,6 +218,7 @@ func TestCloneStacksWithChildren(t *testing.T) { tc := tc t.Run(tc.Name, func(t *testing.T) { + t.Parallel() s := sandbox.NoGit(t, true) s.BuildTree(tc.Layout) diff --git a/cmd/terramate/e2etests/core/exp_eval_test.go b/e2etests/core/exp_eval_test.go similarity index 99% rename from cmd/terramate/e2etests/core/exp_eval_test.go rename to e2etests/core/exp_eval_test.go index d8e8c2432..098424cca 100644 --- a/cmd/terramate/e2etests/core/exp_eval_test.go +++ b/e2etests/core/exp_eval_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/hcl/eval" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/hclwrite" diff --git a/cmd/terramate/e2etests/core/exp_run_order_test.go b/e2etests/core/exp_run_order_test.go similarity index 98% rename from cmd/terramate/e2etests/core/exp_run_order_test.go rename to e2etests/core/exp_run_order_test.go index 4a6ce236d..1899f8759 100644 --- a/cmd/terramate/e2etests/core/exp_run_order_test.go +++ b/e2etests/core/exp_run_order_test.go @@ -6,7 +6,7 @@ package core_test import ( "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/exp_trigger_test.go b/e2etests/core/exp_trigger_test.go similarity index 98% rename from cmd/terramate/e2etests/core/exp_trigger_test.go rename to e2etests/core/exp_trigger_test.go index f0217ddbc..9ff75e967 100644 --- a/cmd/terramate/e2etests/core/exp_trigger_test.go +++ b/e2etests/core/exp_trigger_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/stack/trigger" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" diff --git a/cmd/terramate/e2etests/core/exp_vendor_test.go b/e2etests/core/exp_vendor_test.go similarity index 99% rename from cmd/terramate/e2etests/core/exp_vendor_test.go rename to e2etests/core/exp_vendor_test.go index 7aeef6baa..eb39bef42 100644 --- a/cmd/terramate/e2etests/core/exp_vendor_test.go +++ b/e2etests/core/exp_vendor_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/modvendor" "github.com/terramate-io/terramate/project" "github.com/terramate-io/terramate/test" diff --git a/cmd/terramate/e2etests/core/fmt_test.go b/e2etests/core/fmt_test.go similarity index 99% rename from cmd/terramate/e2etests/core/fmt_test.go rename to e2etests/core/fmt_test.go index 839a8e55b..94929a0eb 100644 --- a/cmd/terramate/e2etests/core/fmt_test.go +++ b/e2etests/core/fmt_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/hcl/fmt" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/general_test.go b/e2etests/core/general_test.go similarity index 99% rename from cmd/terramate/e2etests/core/general_test.go rename to e2etests/core/general_test.go index bd60f7920..096759908 100644 --- a/cmd/terramate/e2etests/core/general_test.go +++ b/e2etests/core/general_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/terramate-io/terramate/cmd/terramate/cli" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/generate_test.go b/e2etests/core/generate_test.go similarity index 99% rename from cmd/terramate/e2etests/core/generate_test.go rename to e2etests/core/generate_test.go index b7bf467cb..79fbed29d 100644 --- a/cmd/terramate/e2etests/core/generate_test.go +++ b/e2etests/core/generate_test.go @@ -15,7 +15,7 @@ import ( "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" ) diff --git a/cmd/terramate/e2etests/core/imports_test.go b/e2etests/core/imports_test.go similarity index 94% rename from cmd/terramate/e2etests/core/imports_test.go rename to e2etests/core/imports_test.go index b78b2403a..79d100fdb 100644 --- a/cmd/terramate/e2etests/core/imports_test.go +++ b/e2etests/core/imports_test.go @@ -7,7 +7,7 @@ import ( "fmt" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/list_git_test.go b/e2etests/core/list_git_test.go similarity index 99% rename from cmd/terramate/e2etests/core/list_git_test.go rename to e2etests/core/list_git_test.go index cbd9e5372..c8247b7e4 100644 --- a/cmd/terramate/e2etests/core/list_git_test.go +++ b/e2etests/core/list_git_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/git" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" diff --git a/cmd/terramate/e2etests/core/list_nongit_test.go b/e2etests/core/list_nongit_test.go similarity index 89% rename from cmd/terramate/e2etests/core/list_nongit_test.go rename to e2etests/core/list_nongit_test.go index c4d5218ae..c87d8ad77 100644 --- a/cmd/terramate/e2etests/core/list_nongit_test.go +++ b/e2etests/core/list_nongit_test.go @@ -6,7 +6,7 @@ package core_test import ( "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/list_run_order_test.go b/e2etests/core/list_run_order_test.go similarity index 92% rename from cmd/terramate/e2etests/core/list_run_order_test.go rename to e2etests/core/list_run_order_test.go index 83884a9d5..7ff76138c 100644 --- a/cmd/terramate/e2etests/core/list_run_order_test.go +++ b/e2etests/core/list_run_order_test.go @@ -6,7 +6,7 @@ package core_test import ( "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/list_test.go b/e2etests/core/list_test.go similarity index 99% rename from cmd/terramate/e2etests/core/list_test.go rename to e2etests/core/list_test.go index a66aa68e3..c8b953973 100644 --- a/cmd/terramate/e2etests/core/list_test.go +++ b/e2etests/core/list_test.go @@ -6,8 +6,8 @@ package core_test import ( "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/config" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/hcl" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/sandbox" diff --git a/cmd/terramate/e2etests/core/list_watch_test.go b/e2etests/core/list_watch_test.go similarity index 98% rename from cmd/terramate/e2etests/core/list_watch_test.go rename to e2etests/core/list_watch_test.go index 06b9bf8a7..4d96faae3 100644 --- a/cmd/terramate/e2etests/core/list_watch_test.go +++ b/e2etests/core/list_watch_test.go @@ -7,8 +7,8 @@ import ( "fmt" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/config" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/project" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" "github.com/terramate-io/terramate/test/sandbox" diff --git a/cmd/terramate/e2etests/core/logging_test.go b/e2etests/core/logging_test.go similarity index 88% rename from cmd/terramate/e2etests/core/logging_test.go rename to e2etests/core/logging_test.go index f4829cb0e..f08a28dcc 100644 --- a/cmd/terramate/e2etests/core/logging_test.go +++ b/e2etests/core/logging_test.go @@ -6,7 +6,7 @@ package core_test import ( "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/loglevel_test.go b/e2etests/core/loglevel_test.go similarity index 100% rename from cmd/terramate/e2etests/core/loglevel_test.go rename to e2etests/core/loglevel_test.go diff --git a/cmd/terramate/e2etests/core/main_test.go b/e2etests/core/main_test.go similarity index 78% rename from cmd/terramate/e2etests/core/main_test.go rename to e2etests/core/main_test.go index 80562e1bd..ddc5ce5a6 100644 --- a/cmd/terramate/e2etests/core/main_test.go +++ b/e2etests/core/main_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" ) func TestMain(m *testing.M) { @@ -20,7 +20,7 @@ func TestMain(m *testing.M) { } // this file is inside cmd/terramate/e2etests // change code below if it's not the case anymore. - projectRoot := filepath.Join(packageDir, "../../../..") + projectRoot := filepath.Join(packageDir, "../../") err = Setup(projectRoot) if err != nil { diff --git a/cmd/terramate/e2etests/core/run_eval_test.go b/e2etests/core/run_eval_test.go similarity index 98% rename from cmd/terramate/e2etests/core/run_eval_test.go rename to e2etests/core/run_eval_test.go index ad8a9af4e..e45c1d320 100644 --- a/cmd/terramate/e2etests/core/run_eval_test.go +++ b/e2etests/core/run_eval_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/run_parallel_test.go b/e2etests/core/run_parallel_test.go similarity index 93% rename from cmd/terramate/e2etests/core/run_parallel_test.go rename to e2etests/core/run_parallel_test.go index 2d7149167..9c48058a7 100644 --- a/cmd/terramate/e2etests/core/run_parallel_test.go +++ b/e2etests/core/run_parallel_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) @@ -31,7 +31,9 @@ func TestParallelFibonacci(t *testing.T) { WantValue: 13, }, } { + tc := tc t.Run(tc.Name, func(t *testing.T) { + t.Parallel() layout := makeFibLayout(tc.FibN) s := sandbox.NoGit(t, true) diff --git a/cmd/terramate/e2etests/core/run_script_test.go b/e2etests/core/run_script_test.go similarity index 99% rename from cmd/terramate/e2etests/core/run_script_test.go rename to e2etests/core/run_script_test.go index d98ad984e..548aa786c 100644 --- a/cmd/terramate/e2etests/core/run_script_test.go +++ b/e2etests/core/run_script_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/run_signal_test.go b/e2etests/core/run_signal_test.go similarity index 100% rename from cmd/terramate/e2etests/core/run_signal_test.go rename to e2etests/core/run_signal_test.go diff --git a/cmd/terramate/e2etests/core/run_test.go b/e2etests/core/run_test.go similarity index 99% rename from cmd/terramate/e2etests/core/run_test.go rename to e2etests/core/run_test.go index 660868415..46b408da0 100644 --- a/cmd/terramate/e2etests/core/run_test.go +++ b/e2etests/core/run_test.go @@ -14,8 +14,8 @@ import ( "github.com/terramate-io/terramate/cmd/terramate/cli" "github.com/terramate-io/terramate/cmd/terramate/cli/cliconfig" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/config/tag" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/run/dag" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/hclwrite" diff --git a/cmd/terramate/e2etests/core/run_unix_test.go b/e2etests/core/run_unix_test.go similarity index 95% rename from cmd/terramate/e2etests/core/run_unix_test.go rename to e2etests/core/run_unix_test.go index e62a10853..85bbd68e4 100644 --- a/cmd/terramate/e2etests/core/run_unix_test.go +++ b/e2etests/core/run_unix_test.go @@ -12,7 +12,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test" "github.com/terramate-io/terramate/test/hclwrite" . "github.com/terramate-io/terramate/test/hclwrite/hclutils" diff --git a/cmd/terramate/e2etests/core/safeguard_test.go b/e2etests/core/safeguard_test.go similarity index 99% rename from cmd/terramate/e2etests/core/safeguard_test.go rename to e2etests/core/safeguard_test.go index 6aee00351..101999abb 100644 --- a/cmd/terramate/e2etests/core/safeguard_test.go +++ b/e2etests/core/safeguard_test.go @@ -9,7 +9,7 @@ import ( "github.com/terramate-io/terramate/cmd/terramate/cli" "github.com/terramate-io/terramate/cmd/terramate/cli/clitest" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" "go.lsp.dev/uri" ) diff --git a/cmd/terramate/e2etests/core/script_info_test.go b/e2etests/core/script_info_test.go similarity index 98% rename from cmd/terramate/e2etests/core/script_info_test.go rename to e2etests/core/script_info_test.go index 1d87f7045..27e34429a 100644 --- a/cmd/terramate/e2etests/core/script_info_test.go +++ b/e2etests/core/script_info_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/script_list_test.go b/e2etests/core/script_list_test.go similarity index 97% rename from cmd/terramate/e2etests/core/script_list_test.go rename to e2etests/core/script_list_test.go index 80a618a72..bd92867c7 100644 --- a/cmd/terramate/e2etests/core/script_list_test.go +++ b/e2etests/core/script_list_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "testing" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) diff --git a/cmd/terramate/e2etests/core/version_check_test.go b/e2etests/core/version_check_test.go similarity index 97% rename from cmd/terramate/e2etests/core/version_check_test.go rename to e2etests/core/version_check_test.go index d0fc9e31e..cc9cc78af 100644 --- a/cmd/terramate/e2etests/core/version_check_test.go +++ b/e2etests/core/version_check_test.go @@ -11,7 +11,7 @@ import ( tfversion "github.com/hashicorp/go-version" "github.com/madlambda/spells/assert" tm "github.com/terramate-io/terramate" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/stack" "github.com/terramate-io/terramate/test/sandbox" "github.com/terramate-io/terramate/versions" diff --git a/cmd/terramate/e2etests/internal/runner/builders.go b/e2etests/internal/runner/builders.go similarity index 97% rename from cmd/terramate/e2etests/internal/runner/builders.go rename to e2etests/internal/runner/builders.go index bc3a94e9a..8690d1fa4 100644 --- a/cmd/terramate/e2etests/internal/runner/builders.go +++ b/e2etests/internal/runner/builders.go @@ -61,7 +61,7 @@ func BuildTestHelper(projectRoot, binDir string) (string, error) { "-buildvcs=false", "-o", outBinPath, - path.Join(projectRoot, "cmd", "terramate", "e2etests", "cmd", "helper"), + path.Join(projectRoot, "e2etests", "cmd", "helper"), ) out, err := cmd.CombinedOutput() if err != nil { diff --git a/cmd/terramate/e2etests/internal/runner/doc.go b/e2etests/internal/runner/doc.go similarity index 100% rename from cmd/terramate/e2etests/internal/runner/doc.go rename to e2etests/internal/runner/doc.go diff --git a/cmd/terramate/e2etests/internal/runner/installers.go b/e2etests/internal/runner/installers.go similarity index 100% rename from cmd/terramate/e2etests/internal/runner/installers.go rename to e2etests/internal/runner/installers.go diff --git a/cmd/terramate/e2etests/internal/runner/runner.go b/e2etests/internal/runner/runner.go similarity index 95% rename from cmd/terramate/e2etests/internal/runner/runner.go rename to e2etests/internal/runner/runner.go index c3c4e7690..c673a4dde 100644 --- a/cmd/terramate/e2etests/internal/runner/runner.go +++ b/e2etests/internal/runner/runner.go @@ -73,8 +73,7 @@ func NewCLI(t *testing.T, chdir string, env ...string) CLI { Chdir: chdir, } if len(env) == 0 { - // by default, it's assumed human mode - env = RemoveEnv(os.Environ(), "CI", "GITHUB_ACTIONS") + env = CleanEnv() } env = append(env, "CHECKPOINT_DISABLE=1") // custom cliconfig file @@ -119,6 +118,25 @@ func (tm *CLI) PrependToPath(dir string) { } } +// CleanEnv returns environment variables without Terramate specific ones. +func CleanEnv() []string { + env := os.Environ() + var cleanEnv []string + for _, e := range env { + if !strings.HasPrefix(e, "TM_") && !strings.HasPrefix(e, "TMC_") { + cleanEnv = append(cleanEnv, e) + } + } + return RemoveEnv( + cleanEnv, + "CI", + "CHECKPOINT_DISABLE", + "GITHUB_TOKEN", + "ACTIONS_ID_TOKEN_REQUEST_URL", + "ACTIONS_ID_TOKEN_REQUEST_TOKEN", + ) +} + // buffer provides a concurrency safe implementation of a bytes.Buffer // It is not safe to copy the buffer. type buffer struct { diff --git a/cmd/terramate/e2etests/internal/runner/runner_signal_fixture.go b/e2etests/internal/runner/runner_signal_fixture.go similarity index 100% rename from cmd/terramate/e2etests/internal/runner/runner_signal_fixture.go rename to e2etests/internal/runner/runner_signal_fixture.go diff --git a/cmd/terramate/e2etests/internal/runner/runner_unix.go b/e2etests/internal/runner/runner_unix.go similarity index 100% rename from cmd/terramate/e2etests/internal/runner/runner_unix.go rename to e2etests/internal/runner/runner_unix.go diff --git a/cmd/terramate/e2etests/internal/runner/runner_windows.go b/e2etests/internal/runner/runner_windows.go similarity index 100% rename from cmd/terramate/e2etests/internal/runner/runner_windows.go rename to e2etests/internal/runner/runner_windows.go diff --git a/cmd/terramate/e2etests/internal/runner/setup.go b/e2etests/internal/runner/setup.go similarity index 100% rename from cmd/terramate/e2etests/internal/runner/setup.go rename to e2etests/internal/runner/setup.go From c8b184976a7b7bc573ff100b38b628967b2f8c73 Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Fri, 8 Mar 2024 14:50:49 +0000 Subject: [PATCH 2/6] chore: initialize all Go packages as Terramate stacks. Signed-off-by: Tiago Natel --- cloud/deployment/stack.tm.hcl | 9 +++++++++ cloud/drift/stack.tm.hcl | 9 +++++++++ cloud/stack.tm.hcl | 9 +++++++++ cloud/stack/stack.tm.hcl | 9 +++++++++ cloud/testserver/cloudstore/stack.tm.hcl | 9 +++++++++ cloud/testserver/cmd/testserver/stack.tm.hcl | 9 +++++++++ cloud/testserver/stack.tm.hcl | 9 +++++++++ cmd/terramate-ls/stack.tm.hcl | 9 +++++++++ cmd/terramate/cli/cliconfig/stack.tm.hcl | 9 +++++++++ cmd/terramate/cli/clitest/stack.tm.hcl | 9 +++++++++ cmd/terramate/cli/github/stack.tm.hcl | 9 +++++++++ cmd/terramate/cli/out/stack.tm.hcl | 9 +++++++++ cmd/terramate/cli/stack.tm.hcl | 9 +++++++++ cmd/terramate/stack.tm.hcl | 9 +++++++++ config/filter/stack.tm.hcl | 9 +++++++++ config/stack.tm.hcl | 9 +++++++++ config/tag/stack.tm.hcl | 9 +++++++++ e2etests/cloud/stack.tm.hcl | 9 +++++++++ e2etests/cmd/helper/stack.tm.hcl | 9 +++++++++ e2etests/core/stack.tm.hcl | 9 +++++++++ e2etests/internal/runner/stack.tm.hcl | 9 +++++++++ errors/errlog/stack.tm.hcl | 9 +++++++++ errors/stack.tm.hcl | 9 +++++++++ event/stack.tm.hcl | 9 +++++++++ fs/stack.tm.hcl | 9 +++++++++ generate/genfile/stack.tm.hcl | 9 +++++++++ generate/genhcl/stack.tm.hcl | 9 +++++++++ generate/stack.tm.hcl | 10 ++++++++++ git/stack.tm.hcl | 9 +++++++++ globals/stack.tm.hcl | 9 +++++++++ hcl/ast/stack.tm.hcl | 9 +++++++++ hcl/eval/stack.tm.hcl | 9 +++++++++ hcl/fmt/stack.tm.hcl | 9 +++++++++ hcl/info/stack.tm.hcl | 9 +++++++++ hcl/stack.tm.hcl | 9 +++++++++ lets/stack.tm.hcl | 9 +++++++++ ls/stack.tm.hcl | 9 +++++++++ mapexpr/stack.tm.hcl | 9 +++++++++ mapexpr/test/stack.tm.hcl | 9 +++++++++ modvendor/download/stack.tm.hcl | 9 +++++++++ modvendor/manifest/stack.tm.hcl | 9 +++++++++ modvendor/stack.tm.hcl | 9 +++++++++ printer/stack.tm.hcl | 9 +++++++++ project/stack.tm.hcl | 9 +++++++++ run/dag/stack.tm.hcl | 9 +++++++++ run/stack.tm.hcl | 9 +++++++++ safeguard/stack.tm.hcl | 9 +++++++++ scheduler/resource/stack.tm.hcl | 5 +++++ scheduler/stack.tm.hcl | 5 +++++ stack/stack.tm.hcl | 9 +++++++++ stack/trigger/stack.tm.hcl | 9 +++++++++ stdlib/stack.tm.hcl | 9 +++++++++ strconv/stack.tm.hcl | 9 +++++++++ test/cloud/stack.tm.hcl | 9 +++++++++ test/errors/stack.tm.hcl | 9 +++++++++ test/hclutils/info/stack.tm.hcl | 9 +++++++++ test/hclutils/stack.tm.hcl | 9 +++++++++ test/hclwrite/hclutils/stack.tm.hcl | 9 +++++++++ test/hclwrite/stack.tm.hcl | 9 +++++++++ test/ls/stack.tm.hcl | 9 +++++++++ test/sandbox/stack.tm.hcl | 9 +++++++++ test/stack.tm.hcl | 9 +++++++++ tf/stack.tm.hcl | 9 +++++++++ tg/stack.tm.hcl | 5 +++++ versions/stack.tm.hcl | 9 +++++++++ 65 files changed, 574 insertions(+) create mode 100644 cloud/deployment/stack.tm.hcl create mode 100644 cloud/drift/stack.tm.hcl create mode 100644 cloud/stack.tm.hcl create mode 100644 cloud/stack/stack.tm.hcl create mode 100644 cloud/testserver/cloudstore/stack.tm.hcl create mode 100644 cloud/testserver/cmd/testserver/stack.tm.hcl create mode 100644 cloud/testserver/stack.tm.hcl create mode 100644 cmd/terramate-ls/stack.tm.hcl create mode 100644 cmd/terramate/cli/cliconfig/stack.tm.hcl create mode 100644 cmd/terramate/cli/clitest/stack.tm.hcl create mode 100644 cmd/terramate/cli/github/stack.tm.hcl create mode 100644 cmd/terramate/cli/out/stack.tm.hcl create mode 100644 cmd/terramate/cli/stack.tm.hcl create mode 100644 cmd/terramate/stack.tm.hcl create mode 100644 config/filter/stack.tm.hcl create mode 100644 config/stack.tm.hcl create mode 100644 config/tag/stack.tm.hcl create mode 100644 e2etests/cloud/stack.tm.hcl create mode 100644 e2etests/cmd/helper/stack.tm.hcl create mode 100644 e2etests/core/stack.tm.hcl create mode 100644 e2etests/internal/runner/stack.tm.hcl create mode 100644 errors/errlog/stack.tm.hcl create mode 100644 errors/stack.tm.hcl create mode 100644 event/stack.tm.hcl create mode 100644 fs/stack.tm.hcl create mode 100644 generate/genfile/stack.tm.hcl create mode 100644 generate/genhcl/stack.tm.hcl create mode 100644 generate/stack.tm.hcl create mode 100644 git/stack.tm.hcl create mode 100644 globals/stack.tm.hcl create mode 100644 hcl/ast/stack.tm.hcl create mode 100644 hcl/eval/stack.tm.hcl create mode 100644 hcl/fmt/stack.tm.hcl create mode 100644 hcl/info/stack.tm.hcl create mode 100644 hcl/stack.tm.hcl create mode 100644 lets/stack.tm.hcl create mode 100644 ls/stack.tm.hcl create mode 100644 mapexpr/stack.tm.hcl create mode 100644 mapexpr/test/stack.tm.hcl create mode 100644 modvendor/download/stack.tm.hcl create mode 100644 modvendor/manifest/stack.tm.hcl create mode 100644 modvendor/stack.tm.hcl create mode 100644 printer/stack.tm.hcl create mode 100644 project/stack.tm.hcl create mode 100644 run/dag/stack.tm.hcl create mode 100644 run/stack.tm.hcl create mode 100644 safeguard/stack.tm.hcl create mode 100644 scheduler/resource/stack.tm.hcl create mode 100644 scheduler/stack.tm.hcl create mode 100644 stack/stack.tm.hcl create mode 100644 stack/trigger/stack.tm.hcl create mode 100644 stdlib/stack.tm.hcl create mode 100644 strconv/stack.tm.hcl create mode 100644 test/cloud/stack.tm.hcl create mode 100644 test/errors/stack.tm.hcl create mode 100644 test/hclutils/info/stack.tm.hcl create mode 100644 test/hclutils/stack.tm.hcl create mode 100644 test/hclwrite/hclutils/stack.tm.hcl create mode 100644 test/hclwrite/stack.tm.hcl create mode 100644 test/ls/stack.tm.hcl create mode 100644 test/sandbox/stack.tm.hcl create mode 100644 test/stack.tm.hcl create mode 100644 tf/stack.tm.hcl create mode 100644 tg/stack.tm.hcl create mode 100644 versions/stack.tm.hcl diff --git a/cloud/deployment/stack.tm.hcl b/cloud/deployment/stack.tm.hcl new file mode 100644 index 000000000..1450ca463 --- /dev/null +++ b/cloud/deployment/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "deployment" + description = "deployment" + tags = ["golang"] + id = "3705120e-4f6f-42a6-9c45-5a1ff31110da" +} diff --git a/cloud/drift/stack.tm.hcl b/cloud/drift/stack.tm.hcl new file mode 100644 index 000000000..2ab05e187 --- /dev/null +++ b/cloud/drift/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "drift" + description = "drift" + tags = ["golang"] + id = "8e7c2d56-0a76-42b7-b6c6-a9e85ba3f17e" +} diff --git a/cloud/stack.tm.hcl b/cloud/stack.tm.hcl new file mode 100644 index 000000000..7d92e232d --- /dev/null +++ b/cloud/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "cloud" + description = "cloud" + tags = ["golang"] + id = "22a16004-771d-433f-9732-be34e6f3ffbb" +} diff --git a/cloud/stack/stack.tm.hcl b/cloud/stack/stack.tm.hcl new file mode 100644 index 000000000..293a0f431 --- /dev/null +++ b/cloud/stack/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "stack" + description = "stack" + tags = ["golang"] + id = "8b514d12-9d03-4fbd-8c1b-4c43207abc0f" +} diff --git a/cloud/testserver/cloudstore/stack.tm.hcl b/cloud/testserver/cloudstore/stack.tm.hcl new file mode 100644 index 000000000..f91fb30ce --- /dev/null +++ b/cloud/testserver/cloudstore/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "cloudstore" + description = "cloudstore" + tags = ["golang"] + id = "bd761edc-3458-4388-b29f-a109c6359bac" +} diff --git a/cloud/testserver/cmd/testserver/stack.tm.hcl b/cloud/testserver/cmd/testserver/stack.tm.hcl new file mode 100644 index 000000000..455ab559e --- /dev/null +++ b/cloud/testserver/cmd/testserver/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "testserver" + description = "testserver" + tags = ["golang"] + id = "c8fa9f2e-fc1f-470f-b78a-80f22abe9cb9" +} diff --git a/cloud/testserver/stack.tm.hcl b/cloud/testserver/stack.tm.hcl new file mode 100644 index 000000000..d579fffb2 --- /dev/null +++ b/cloud/testserver/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "testserver" + description = "testserver" + tags = ["golang"] + id = "8abcb189-5731-4024-ab62-022b7d3d6a45" +} diff --git a/cmd/terramate-ls/stack.tm.hcl b/cmd/terramate-ls/stack.tm.hcl new file mode 100644 index 000000000..1ba7c2bba --- /dev/null +++ b/cmd/terramate-ls/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "terramate-ls" + description = "terramate-ls" + tags = ["golang"] + id = "d65b5013-40fb-4af0-a8bb-d73ed29de250" +} diff --git a/cmd/terramate/cli/cliconfig/stack.tm.hcl b/cmd/terramate/cli/cliconfig/stack.tm.hcl new file mode 100644 index 000000000..cfe29e035 --- /dev/null +++ b/cmd/terramate/cli/cliconfig/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "cliconfig" + description = "cliconfig" + tags = ["golang"] + id = "b9c060f8-758c-4f96-ab2c-1ad2cc818790" +} diff --git a/cmd/terramate/cli/clitest/stack.tm.hcl b/cmd/terramate/cli/clitest/stack.tm.hcl new file mode 100644 index 000000000..f7f2e99ba --- /dev/null +++ b/cmd/terramate/cli/clitest/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "clitest" + description = "clitest" + tags = ["golang"] + id = "2e323174-46b3-44a0-8237-c47871f6d33a" +} diff --git a/cmd/terramate/cli/github/stack.tm.hcl b/cmd/terramate/cli/github/stack.tm.hcl new file mode 100644 index 000000000..117904216 --- /dev/null +++ b/cmd/terramate/cli/github/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "github" + description = "github" + tags = ["golang"] + id = "3f5750a7-e88b-4305-846a-36a390b4d4ae" +} diff --git a/cmd/terramate/cli/out/stack.tm.hcl b/cmd/terramate/cli/out/stack.tm.hcl new file mode 100644 index 000000000..b42760f75 --- /dev/null +++ b/cmd/terramate/cli/out/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "out" + description = "out" + tags = ["golang"] + id = "91e696bb-6b73-4d23-a144-8bf2c09e83cd" +} diff --git a/cmd/terramate/cli/stack.tm.hcl b/cmd/terramate/cli/stack.tm.hcl new file mode 100644 index 000000000..a9af29407 --- /dev/null +++ b/cmd/terramate/cli/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "cli" + description = "cli" + tags = ["golang"] + id = "1de68a08-1a7c-45b8-9712-48cce89df9a2" +} diff --git a/cmd/terramate/stack.tm.hcl b/cmd/terramate/stack.tm.hcl new file mode 100644 index 000000000..aa864a3f6 --- /dev/null +++ b/cmd/terramate/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "terramate" + description = "terramate" + tags = ["golang"] + id = "9995d678-4d46-4205-986e-16e32d99e7d7" +} diff --git a/config/filter/stack.tm.hcl b/config/filter/stack.tm.hcl new file mode 100644 index 000000000..0c09c26ac --- /dev/null +++ b/config/filter/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "filter" + description = "filter" + tags = ["golang"] + id = "8fb2eccc-f0ff-4e77-a371-7cb935a59403" +} diff --git a/config/stack.tm.hcl b/config/stack.tm.hcl new file mode 100644 index 000000000..f05cfc252 --- /dev/null +++ b/config/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "config" + description = "config" + tags = ["golang"] + id = "b9ee9772-5640-43e2-bd61-34234ce2b7d7" +} diff --git a/config/tag/stack.tm.hcl b/config/tag/stack.tm.hcl new file mode 100644 index 000000000..11cf0efb6 --- /dev/null +++ b/config/tag/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "tag" + description = "tag" + tags = ["golang"] + id = "6a4e732a-cf37-46b4-a50d-24794ae78889" +} diff --git a/e2etests/cloud/stack.tm.hcl b/e2etests/cloud/stack.tm.hcl new file mode 100644 index 000000000..f485c3ccf --- /dev/null +++ b/e2etests/cloud/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "cloud2" + description = "cloud" + tags = ["golang"] + id = "669cf56e-1bbb-423f-8bd3-d4f4dd0c52e1" +} diff --git a/e2etests/cmd/helper/stack.tm.hcl b/e2etests/cmd/helper/stack.tm.hcl new file mode 100644 index 000000000..55f5e74ba --- /dev/null +++ b/e2etests/cmd/helper/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "helper" + description = "helper" + tags = ["golang", "e2e"] + id = "26a4dea4-3d62-4ad7-9ee6-d0b950f9987e" +} diff --git a/e2etests/core/stack.tm.hcl b/e2etests/core/stack.tm.hcl new file mode 100644 index 000000000..6adcd9963 --- /dev/null +++ b/e2etests/core/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "core" + description = "core" + tags = ["golang"] + id = "947bb1ba-8c6d-4e1e-a90f-a6735b86d33a" +} diff --git a/e2etests/internal/runner/stack.tm.hcl b/e2etests/internal/runner/stack.tm.hcl new file mode 100644 index 000000000..e960518bb --- /dev/null +++ b/e2etests/internal/runner/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "runner" + description = "runner" + tags = ["golang", "e2e"] + id = "e66b6869-7b16-4a81-bbeb-0bb63f9357a5" +} diff --git a/errors/errlog/stack.tm.hcl b/errors/errlog/stack.tm.hcl new file mode 100644 index 000000000..3903d2854 --- /dev/null +++ b/errors/errlog/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "errlog" + description = "errlog" + tags = ["golang"] + id = "f2f27f76-2cd2-4b42-9042-5b4c2b9744d3" +} diff --git a/errors/stack.tm.hcl b/errors/stack.tm.hcl new file mode 100644 index 000000000..0bd923e76 --- /dev/null +++ b/errors/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "errors" + description = "errors" + tags = ["golang"] + id = "ce216b58-a25f-4970-9c94-4540857532f7" +} diff --git a/event/stack.tm.hcl b/event/stack.tm.hcl new file mode 100644 index 000000000..d39c6a5c7 --- /dev/null +++ b/event/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "event" + description = "event" + tags = ["golang"] + id = "2d360bd3-1951-4b49-866f-245b935c332b" +} diff --git a/fs/stack.tm.hcl b/fs/stack.tm.hcl new file mode 100644 index 000000000..6fc529bce --- /dev/null +++ b/fs/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "fs" + description = "fs" + tags = ["golang"] + id = "449d7c2e-384b-4d7f-a547-e68379ecfd8d" +} diff --git a/generate/genfile/stack.tm.hcl b/generate/genfile/stack.tm.hcl new file mode 100644 index 000000000..f0146d3e0 --- /dev/null +++ b/generate/genfile/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "genfile" + description = "genfile" + tags = ["golang"] + id = "19ae1e9f-c363-433d-96bd-d8abb5c525d3" +} diff --git a/generate/genhcl/stack.tm.hcl b/generate/genhcl/stack.tm.hcl new file mode 100644 index 000000000..613c47fbf --- /dev/null +++ b/generate/genhcl/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "genhcl" + description = "genhcl" + tags = ["golang"] + id = "7d4d7597-2b32-4dd8-8a47-980b5ce707a2" +} diff --git a/generate/stack.tm.hcl b/generate/stack.tm.hcl new file mode 100644 index 000000000..d1ee9c761 --- /dev/null +++ b/generate/stack.tm.hcl @@ -0,0 +1,10 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "generate" + description = "generate" + tags = ["golang"] + id = "3d713212-6ef9-4c41-9afb-fe3c0e18f8df" + after = ["/globals"] +} diff --git a/git/stack.tm.hcl b/git/stack.tm.hcl new file mode 100644 index 000000000..9595b9162 --- /dev/null +++ b/git/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "git" + description = "git" + tags = ["golang"] + id = "8b5378ad-41a2-4588-bb59-0e29f992deee" +} diff --git a/globals/stack.tm.hcl b/globals/stack.tm.hcl new file mode 100644 index 000000000..059389d2c --- /dev/null +++ b/globals/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "globals" + description = "globals" + tags = ["golang"] + id = "6c707b84-6217-4f68-a262-e16910ed029b" +} diff --git a/hcl/ast/stack.tm.hcl b/hcl/ast/stack.tm.hcl new file mode 100644 index 000000000..95ecf5d77 --- /dev/null +++ b/hcl/ast/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "ast" + description = "ast" + tags = ["golang"] + id = "c55d20bc-1ba6-44ce-a3f8-ecb951981437" +} diff --git a/hcl/eval/stack.tm.hcl b/hcl/eval/stack.tm.hcl new file mode 100644 index 000000000..2396df33f --- /dev/null +++ b/hcl/eval/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "eval" + description = "eval" + tags = ["golang"] + id = "ce846cc0-6891-401a-a6c0-169b598dbbee" +} diff --git a/hcl/fmt/stack.tm.hcl b/hcl/fmt/stack.tm.hcl new file mode 100644 index 000000000..93f7cafe9 --- /dev/null +++ b/hcl/fmt/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "fmt" + description = "fmt" + tags = ["golang"] + id = "4707da1c-40c7-47d4-bf6d-3544a72e0986" +} diff --git a/hcl/info/stack.tm.hcl b/hcl/info/stack.tm.hcl new file mode 100644 index 000000000..c0115ce64 --- /dev/null +++ b/hcl/info/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "info" + description = "info" + tags = ["golang"] + id = "6a5c2713-0fb6-4717-abf4-e9ce0cbeb5ad" +} diff --git a/hcl/stack.tm.hcl b/hcl/stack.tm.hcl new file mode 100644 index 000000000..c1499a82b --- /dev/null +++ b/hcl/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "hcl" + description = "hcl" + tags = ["golang"] + id = "2ac23e42-0b2f-403e-855e-8cb328f984a3" +} diff --git a/lets/stack.tm.hcl b/lets/stack.tm.hcl new file mode 100644 index 000000000..a636c2c60 --- /dev/null +++ b/lets/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "lets" + description = "lets" + tags = ["golang"] + id = "00284908-570b-4c11-8701-c8b860615116" +} diff --git a/ls/stack.tm.hcl b/ls/stack.tm.hcl new file mode 100644 index 000000000..00601189f --- /dev/null +++ b/ls/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "ls" + description = "ls" + tags = ["golang"] + id = "b16c33b8-7dd1-4624-af25-0680d86e61f8" +} diff --git a/mapexpr/stack.tm.hcl b/mapexpr/stack.tm.hcl new file mode 100644 index 000000000..666292010 --- /dev/null +++ b/mapexpr/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "mapexpr" + description = "mapexpr" + tags = ["golang"] + id = "b5a3a333-9fb7-4cf8-84b7-2170b307555b" +} diff --git a/mapexpr/test/stack.tm.hcl b/mapexpr/test/stack.tm.hcl new file mode 100644 index 000000000..1bcd2ce2b --- /dev/null +++ b/mapexpr/test/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "test" + description = "test" + tags = ["golang"] + id = "9da3e8a9-01f9-4120-a046-1760ea342112" +} diff --git a/modvendor/download/stack.tm.hcl b/modvendor/download/stack.tm.hcl new file mode 100644 index 000000000..7616be78b --- /dev/null +++ b/modvendor/download/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "download" + description = "download" + tags = ["golang"] + id = "8054dffa-59bf-441c-b21c-4bdd907b26bb" +} diff --git a/modvendor/manifest/stack.tm.hcl b/modvendor/manifest/stack.tm.hcl new file mode 100644 index 000000000..df9acbffe --- /dev/null +++ b/modvendor/manifest/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "manifest" + description = "manifest" + tags = ["golang"] + id = "ee6ce6c0-62c8-42a9-899f-d9d251ba6177" +} diff --git a/modvendor/stack.tm.hcl b/modvendor/stack.tm.hcl new file mode 100644 index 000000000..46112a216 --- /dev/null +++ b/modvendor/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "modvendor" + description = "modvendor" + tags = ["golang"] + id = "1f960e4e-f2b8-4605-a9a5-6b77d51f0057" +} diff --git a/printer/stack.tm.hcl b/printer/stack.tm.hcl new file mode 100644 index 000000000..5c506ef86 --- /dev/null +++ b/printer/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "printer" + description = "printer" + tags = ["golang"] + id = "fd3c1152-e3fa-49b1-8b8d-1f7255aa7c88" +} diff --git a/project/stack.tm.hcl b/project/stack.tm.hcl new file mode 100644 index 000000000..55896600c --- /dev/null +++ b/project/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "project" + description = "project" + tags = ["golang"] + id = "b37ca64a-75c1-45e8-b846-77f8c4ab87da" +} diff --git a/run/dag/stack.tm.hcl b/run/dag/stack.tm.hcl new file mode 100644 index 000000000..c56dc5377 --- /dev/null +++ b/run/dag/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "dag" + description = "dag" + tags = ["golang"] + id = "82c25e22-9d75-4e11-843f-7062d0080476" +} diff --git a/run/stack.tm.hcl b/run/stack.tm.hcl new file mode 100644 index 000000000..9822b0d60 --- /dev/null +++ b/run/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "run" + description = "run" + tags = ["golang"] + id = "ee5226c0-82fd-4917-8357-571331577ae0" +} diff --git a/safeguard/stack.tm.hcl b/safeguard/stack.tm.hcl new file mode 100644 index 000000000..43bc3862b --- /dev/null +++ b/safeguard/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "safeguard" + description = "safeguard" + tags = ["golang"] + id = "50d8af26-0896-48ee-aeb1-2e548faf25a8" +} diff --git a/scheduler/resource/stack.tm.hcl b/scheduler/resource/stack.tm.hcl new file mode 100644 index 000000000..863f9efdf --- /dev/null +++ b/scheduler/resource/stack.tm.hcl @@ -0,0 +1,5 @@ +stack { + name = "resource" + description = "resource" + id = "ff72277c-7e54-4b26-81ea-8ea701e448f1" +} diff --git a/scheduler/stack.tm.hcl b/scheduler/stack.tm.hcl new file mode 100644 index 000000000..b50afff5b --- /dev/null +++ b/scheduler/stack.tm.hcl @@ -0,0 +1,5 @@ +stack { + name = "scheduler" + description = "scheduler" + id = "9d6fd992-c597-4acf-b750-084a127c738d" +} diff --git a/stack/stack.tm.hcl b/stack/stack.tm.hcl new file mode 100644 index 000000000..a8ecbf045 --- /dev/null +++ b/stack/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "stack" + description = "stack" + tags = ["golang"] + id = "1ed6cdd7-edaf-4452-85b2-fe156b784bd7" +} diff --git a/stack/trigger/stack.tm.hcl b/stack/trigger/stack.tm.hcl new file mode 100644 index 000000000..ad900ff89 --- /dev/null +++ b/stack/trigger/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "trigger" + description = "trigger" + tags = ["golang"] + id = "069383f1-e3a4-4059-9e72-1f45c6a494c5" +} diff --git a/stdlib/stack.tm.hcl b/stdlib/stack.tm.hcl new file mode 100644 index 000000000..948f8d072 --- /dev/null +++ b/stdlib/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "stdlib" + description = "stdlib" + tags = ["golang"] + id = "3eb8b211-634d-4476-85fd-8c346a3cd274" +} diff --git a/strconv/stack.tm.hcl b/strconv/stack.tm.hcl new file mode 100644 index 000000000..73449a8ef --- /dev/null +++ b/strconv/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "strconv" + description = "strconv" + tags = ["golang"] + id = "c27a3c7b-3866-42fe-9bfa-0aca229f6b2a" +} diff --git a/test/cloud/stack.tm.hcl b/test/cloud/stack.tm.hcl new file mode 100644 index 000000000..ac3dfa5ed --- /dev/null +++ b/test/cloud/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "cloud" + description = "cloud" + tags = ["golang"] + id = "caef4d2a-a404-4d1a-9b6d-9870a3c14959" +} diff --git a/test/errors/stack.tm.hcl b/test/errors/stack.tm.hcl new file mode 100644 index 000000000..4088f6212 --- /dev/null +++ b/test/errors/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "errors" + description = "errors" + tags = ["golang"] + id = "d4344dc8-8c7d-4776-87a0-4ea331d3faaf" +} diff --git a/test/hclutils/info/stack.tm.hcl b/test/hclutils/info/stack.tm.hcl new file mode 100644 index 000000000..d63f84a0d --- /dev/null +++ b/test/hclutils/info/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "info" + description = "info" + tags = ["golang"] + id = "c834a93a-0058-4b02-bed1-ed58f0ce0240" +} diff --git a/test/hclutils/stack.tm.hcl b/test/hclutils/stack.tm.hcl new file mode 100644 index 000000000..180a7d697 --- /dev/null +++ b/test/hclutils/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "hclutils" + description = "hclutils" + tags = ["golang"] + id = "f1cdf97d-5bb1-4e65-ad43-919bc3e4ae6c" +} diff --git a/test/hclwrite/hclutils/stack.tm.hcl b/test/hclwrite/hclutils/stack.tm.hcl new file mode 100644 index 000000000..4fec80cb4 --- /dev/null +++ b/test/hclwrite/hclutils/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "hclutils" + description = "hclutils" + tags = ["golang"] + id = "891ce33e-512b-4a2c-bc26-93401ef28156" +} diff --git a/test/hclwrite/stack.tm.hcl b/test/hclwrite/stack.tm.hcl new file mode 100644 index 000000000..3c0374127 --- /dev/null +++ b/test/hclwrite/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "hclwrite" + description = "hclwrite" + tags = ["golang"] + id = "903529d4-5a12-417f-9f0b-585016e084fe" +} diff --git a/test/ls/stack.tm.hcl b/test/ls/stack.tm.hcl new file mode 100644 index 000000000..b8054f2fc --- /dev/null +++ b/test/ls/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "ls" + description = "ls" + tags = ["golang"] + id = "772a6d18-3278-4fbf-b21a-f6c41b9cf867" +} diff --git a/test/sandbox/stack.tm.hcl b/test/sandbox/stack.tm.hcl new file mode 100644 index 000000000..ef67e7fa3 --- /dev/null +++ b/test/sandbox/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "sandbox" + description = "sandbox" + tags = ["golang"] + id = "a0e95917-b18d-42e4-b871-cb912e98d59d" +} diff --git a/test/stack.tm.hcl b/test/stack.tm.hcl new file mode 100644 index 000000000..bda3c337f --- /dev/null +++ b/test/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "test" + description = "test" + tags = ["golang"] + id = "7a6046da-af3e-4804-a58a-049b7092047f" +} diff --git a/tf/stack.tm.hcl b/tf/stack.tm.hcl new file mode 100644 index 000000000..3efd1fd81 --- /dev/null +++ b/tf/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "tf" + description = "tf" + tags = ["golang"] + id = "5f48e9d4-9ab2-49e8-80a1-13392098c43c" +} diff --git a/tg/stack.tm.hcl b/tg/stack.tm.hcl new file mode 100644 index 000000000..b5832fc82 --- /dev/null +++ b/tg/stack.tm.hcl @@ -0,0 +1,5 @@ +stack { + name = "tg" + description = "tg" + id = "6ee50f76-ba16-4241-8946-e77bedec5359" +} diff --git a/versions/stack.tm.hcl b/versions/stack.tm.hcl new file mode 100644 index 000000000..2d5b0f699 --- /dev/null +++ b/versions/stack.tm.hcl @@ -0,0 +1,9 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +stack { + name = "versions" + description = "versions" + tags = ["golang"] + id = "4c676b8f-b081-4df5-9d29-ff55f596bbb5" +} From 2175ab805bdc2fa50d41a7dc48cec104e318ec5b Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Fri, 8 Mar 2024 15:03:14 +0000 Subject: [PATCH 3/6] chore: add script commands for running tests on changed stacks. Signed-off-by: Tiago Natel --- commands.tm | 36 ++++++++++++++++++++++++++++++++++++ e2etests/commands.tm | 11 +++++++++++ makefiles/unix.mk | 15 ++++++++++++--- terramate.tm | 8 +++++++- 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 commands.tm create mode 100644 e2etests/commands.tm diff --git a/commands.tm b/commands.tm new file mode 100644 index 000000000..b5ca021a9 --- /dev/null +++ b/commands.tm @@ -0,0 +1,36 @@ +// Copyright 2023 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + +script "test" { + description = "Run Terramate tests" + job { + command = global.cmd.test.command + } +} + +script "test" "preview" { + description = "Create a Terramate Cloud Preview" + job { + command = tm_concat(global.cmd.test.command, [{ + cloud_sync_preview = true, + cloud_sync_terraform_plan_file = "test.plan" + }]) + } +} + +script "test" "deploy" { + description = "Create a Terramate Cloud Deployment" + job { + command = tm_concat(global.cmd.test.command, [{ + cloud_sync_deployment = true, + }]) + } +} + +# Command variables + +# Defines the "tm script run -- test" command. +globals "cmd" "test" { + command = ["go", "test", "-race", "-count=1"] +} + diff --git a/e2etests/commands.tm b/e2etests/commands.tm new file mode 100644 index 000000000..835687bb1 --- /dev/null +++ b/e2etests/commands.tm @@ -0,0 +1,11 @@ +script "test" "preview" { + description = "Create a Terramate Cloud Preview (e2etests)" + job { + command = tm_concat(global.cmd.test.command, [ + "-parallel=1000", // e2etests are highly parallelizable + { + cloud_sync_preview = true, + cloud_sync_terraform_plan_file = "test.plan" + }]) + } +} diff --git a/makefiles/unix.mk b/makefiles/unix.mk index bebbebc27..80f3e17e0 100644 --- a/makefiles/unix.mk +++ b/makefiles/unix.mk @@ -31,15 +31,24 @@ test/testserver: ## build the helper binary .PHONY: test/helper test/helper: - go build -o bin/helper ./cmd/terramate/e2etests/cmd/helper + go build -o bin/helper ./e2etests/cmd/helper ## test code .PHONY: test tempdir=$(shell ./bin/helper tempdir) +test: parallel?=10 test: test/helper build # Using `terramate` because it detects and fails if the generated files are outdated. - ./bin/terramate run --no-recursive -- go test -c -tags interop ./cmd/terramate/e2etests/cloud/interop/... - TM_TEST_ROOT_TEMPDIR=$(tempdir) ./bin/terramate run --no-recursive -- go test -race -count=1 ./... + TM_TEST_ROOT_TEMPDIR=$(tempdir) ./bin/terramate run --no-recursive -- go test -race -count=1 -p $(parallel) -timeout=30m ./... + ./bin/helper rm $(tempdir) + +## test/script run tests throught script run +.PHONY: test/script +tempdir=$(shell ./bin/helper tempdir) +test/script: parallel?=10 +test/script: test/helper build +# Using `terramate` because it detects and fails if the generated files are outdated. + TM_TEST_ROOT_TEMPDIR=$(tempdir) ./bin/terramate script run --parallel=$(parallel) --changed --tags=golang -- test ./bin/helper rm $(tempdir) ## test/interop diff --git a/terramate.tm b/terramate.tm index a753630b4..f783d8f67 100644 --- a/terramate.tm +++ b/terramate.tm @@ -9,9 +9,11 @@ terramate { config { + experiments = ["scripts"] run { env { - PATH = "${terramate.root.path.fs.absolute}/bin${global.PS}${env.PATH}" + PATH = "${terramate.root.path.fs.absolute}/bin${global.PS}${env.PATH}" + NO_COLOR = "1" } } @@ -20,6 +22,10 @@ terramate { check_uncommitted = false check_remote = false } + + cloud { + organization = "test" + } } } From 1877c5b8ffab537356bc210c6b3d5734f05807f8 Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Fri, 8 Mar 2024 15:04:40 +0000 Subject: [PATCH 4/6] chore: sync workflow previews and deployments. Signed-off-by: Tiago Natel --- .github/workflows/ci.yml | 117 ------------------------ .github/workflows/deploy.yml | 62 +++++++++++++ .github/workflows/preview.yml | 166 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 2 +- .tool-versions | 2 +- 5 files changed, 230 insertions(+), 119 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 440a9e709..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright 2023 Terramate GmbH -# SPDX-License-Identifier: MPL-2.0 - -name: ci -on: [push] - -jobs: - checks: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v4 - with: - go-version: '1.21' - - - name: Configure asdf and plugins needed - uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267 - - - name: checking go mod tidyness - run: terramate run --tags golang --changed -- make mod/check - - - name: linting code - run: terramate run --tags golang --changed -- make lint - - - name: checking license on source code - run: terramate run --tags golang --changed -- make license/check - - build_test: - name: Build and Test - runs-on: ${{ matrix.os }} - permissions: - id-token: write # This is required for requesting the JWT - contents: read # This is required for actions/checkout - - strategy: - matrix: - os: ["ubuntu-20.04", "macos-12", "macos-13"] - go: ["1.21"] - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go }} - - - name: Configure asdf and plugins needed - uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267 - - - name: make generate - run: terramate generate - - - name: make test - run: terramate run --tags golang --changed -- make test - - - name: make build - run: terramate run --tags golang --changed -- make build - - - name: check cloud info - run: terramate run --tags golang --changed -- ./bin/terramate -vv experimental cloud info - - gh_integration_test: - name: GHA Integration Test - - runs-on: "ubuntu-20.04" - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version: '1.21' - - - name: Configure asdf and plugins needed - uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267 - - - name: make test/ci - run: terramate run --tags golang --changed -- make test/ci - - release_dry_run: - name: Release Dry Run - - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version: '1.21' - - - name: Configure asdf and plugins needed - uses: asdf-vm/actions/install@83133f03f5693901c2296a8e622955087dc20267 - - - name: release dry run - run: terramate run --tags golang --changed -- make release/dry-run - - ci: - needs: - - checks - - build_test - - gh_integration_test - runs-on: ubuntu-20.04 - steps: - - uses: Kesin11/actions-timeline@v1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..ba00eaa31 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,62 @@ +# Copyright 2024 Terramate GmbH +# SPDX-License-Identifier: MPL-2.0 + +name: Terramate Deployment +on: + push: + branches: + - main + +jobs: + deploy: + name: Run all tests and create a Terramate Cloud Deployment + + permissions: + id-token: write + contents: read + pull-requests: read + + runs-on: "ubuntu-20.04" + + steps: + ### Check out the code + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + ### Install tooling + + - name: Install Terramate + uses: terramate-io/terramate-action@v1 + + - name: check cloud info + run: terramate run --tags golang --no-recursive -- ./bin/terramate cloud info || true + env: + TMC_API_HOST: api.stg.terramate.io + + ### Check for changed stacks + + - name: List changed stacks + id: list + run: terramate list --changed + + - name: checking go mod tidyness + if: steps.list.outputs.stdout + run: make mod/check + + - name: linting code + if: steps.list.outputs.stdout + run: make lint + + - name: checking license on source code + if: steps.list.outputs.stdout + run: make license/check + + - name: check and test all + if: steps.list.outputs.stdout + run: terramate script run --parallel=5 --changed --tags=golang -- test deploy + env: + TMC_API_HOST: api.stg.terramate.io + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 000000000..a225cb1b0 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,166 @@ +# Copyright 2023 Terramate GmbH +# SPDX-License-Identifier: MPL-2.0 + +name: preview + +on: + pull_request: + branches: + - main + +jobs: + preview: + name: Changed Terramate stacks + runs-on: ${{ matrix.os }} + + permissions: + id-token: write + contents: read + pull-requests: write + + strategy: + matrix: + os: ["ubuntu-20.04", "macos-12", "macos-13"] + go: ["1.22"] + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + + ### Create Pull Request comment + + - name: Prepare pull request preview comment + if: github.event.pull_request + uses: marocchino/sticky-pull-request-comment@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + header: preview + message: | + ## Preview of Project changes in ${{ github.event.pull_request.head.sha }} + + :warning: preview is being created... please stand by! + + ### Install tooling + + - name: Install Terramate + uses: terramate-io/terramate-action@i4k-fix-macos + + - name: Check Terramate formatting + run: terramate fmt --check + + - name: List changed stacks + id: list + run: terramate list --changed + + - name: checking go mod tidyness + if: steps.list.outputs.stdout && matrix.os == 'ubuntu-20.04' + run: make mod/check + + - name: linting code + if: steps.list.outputs.stdout && matrix.os == 'ubuntu-20.04' + run: make lint + + - name: checking license on source code + if: steps.list.outputs.stdout && matrix.os == 'ubuntu-20.04' + run: make license/check + + ### Run the terramate preview script + + - name: check cloud info + if: steps.list.outputs.stdout + run: terramate run --tags golang --no-recursive -- terramate cloud info || true + env: + TMC_API_HOST: api.stg.terramate.io + + - name: Golang test preview + if: steps.list.outputs.stdout + run: | + echo >preview_url.txt "https://cloud.stg.terramate.io/o/test/review-requests" + terramate script run --parallel=10 --tags golang --changed -- test preview + env: + TMC_API_HOST: api.stg.terramate.io + GITHUB_TOKEN: ${{ github.token }} + + ### Update Pull Request comment + + - name: Generate preview details + shell: bash + if: steps.list.outputs.stdout + id: comment + run: | + echo >>pr-comment.txt "## Preview of Terramate changes in ${{ github.event.pull_request.head.sha }}" + echo >>pr-comment.txt + echo >>pr-comment.txt "[:mag: View Details on Terramate Cloud]($(cat preview_url.txt))" + echo >>pr-comment.txt + echo >>pr-comment.txt "### Changed Stacks" + echo >>pr-comment.txt + echo >>pr-comment.txt '```bash' + echo >>pr-comment.txt "${{ steps.list.outputs.stdout }}" + echo >>pr-comment.txt '```' + cat pr-comment.txt >>$GITHUB_STEP_SUMMARY + + - name: Generate preview when no stacks changed + shell: bash + if: success() && !steps.list.outputs.stdout + run: | + echo >>pr-comment.txt "## Preview of Terramate changes in ${{ github.event.pull_request.head.sha }}" + echo >>pr-comment.txt + echo >>pr-comment.txt "### Changed Stacks" + echo >>pr-comment.txt + echo >>pr-comment.txt 'No changed stacks, no detailed preview will be generated.' + cat pr-comment.txt >>$GITHUB_STEP_SUMMARY + + - name: Generate preview when things failed + shell: bash + if: failure() + run: | + echo >>pr-comment.txt "## Preview of Terraform changes in ${{ github.event.pull_request.head.sha }}" + echo >>pr-comment.txt + echo >>pr-comment.txt "[:mag: View Details on Terramate Cloud]($(cat preview_url.txt))" + echo >>pr-comment.txt + echo >>pr-comment.txt "### Changed Stacks" + echo >>pr-comment.txt + echo >>pr-comment.txt '```bash' + echo >>pr-comment.txt "${{ steps.list.outputs.stdout }}" + echo >>pr-comment.txt '```' + echo >>pr-comment.txt ':boom: Generating preview failed. Please see details in Actions output.' + cat pr-comment.txt >>$GITHUB_STEP_SUMMARY + + - name: Publish generated preview as GitHub commnent + uses: marocchino/sticky-pull-request-comment@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + header: preview + path: pr-comment.txt + + release_dry_run: + name: Release Dry Run + + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: '1.21' + + - name: release dry run + run: make release/dry-run + + required_checks: + needs: + - preview + runs-on: ubuntu-20.04 + steps: + - uses: Kesin11/actions-timeline@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f37ed529d..963e3d0de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '1.21' diff --git a/.tool-versions b/.tool-versions index f95c824bf..fe0e1922a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -terramate 0.4.0 +terramate 0.5.0 From 4970e3dd29e46d4119135ef97985b788fde7c1ac Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Fri, 8 Mar 2024 15:18:43 +0000 Subject: [PATCH 5/6] chore: adjust imports of e2etests for tag-based packages. Signed-off-by: Tiago Natel --- e2etests/cloud/interop/interoperability_test.go | 2 +- e2etests/cloud/interop/main_test.go | 2 +- e2etests/core/run_signal_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2etests/cloud/interop/interoperability_test.go b/e2etests/cloud/interop/interoperability_test.go index 45836cbe8..906c9e5c6 100644 --- a/e2etests/cloud/interop/interoperability_test.go +++ b/e2etests/cloud/interop/interoperability_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" ) func TestInteropCloudSyncPreview(t *testing.T) { diff --git a/e2etests/cloud/interop/main_test.go b/e2etests/cloud/interop/main_test.go index c8b1f9b3d..965fe8221 100644 --- a/e2etests/cloud/interop/main_test.go +++ b/e2etests/cloud/interop/main_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/terramate-io/terramate/cloud" - "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + "github.com/terramate-io/terramate/e2etests/internal/runner" ) func TestMain(m *testing.M) { diff --git a/e2etests/core/run_signal_test.go b/e2etests/core/run_signal_test.go index 8ef6e7463..322473590 100644 --- a/e2etests/core/run_signal_test.go +++ b/e2etests/core/run_signal_test.go @@ -13,7 +13,7 @@ import ( "time" "github.com/madlambda/spells/assert" - . "github.com/terramate-io/terramate/cmd/terramate/e2etests/internal/runner" + . "github.com/terramate-io/terramate/e2etests/internal/runner" "github.com/terramate-io/terramate/test/sandbox" ) From 1f901f0691d33201d72ef5719d985952ffcdc20b Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Fri, 8 Mar 2024 15:24:30 +0000 Subject: [PATCH 6/6] chore: add license to newer stacks. Signed-off-by: Tiago Natel --- scheduler/resource/stack.tm.hcl | 3 +++ scheduler/stack.tm.hcl | 3 +++ tg/stack.tm.hcl | 3 +++ 3 files changed, 9 insertions(+) diff --git a/scheduler/resource/stack.tm.hcl b/scheduler/resource/stack.tm.hcl index 863f9efdf..8f1befef3 100644 --- a/scheduler/resource/stack.tm.hcl +++ b/scheduler/resource/stack.tm.hcl @@ -1,3 +1,6 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + stack { name = "resource" description = "resource" diff --git a/scheduler/stack.tm.hcl b/scheduler/stack.tm.hcl index b50afff5b..d03ad5a33 100644 --- a/scheduler/stack.tm.hcl +++ b/scheduler/stack.tm.hcl @@ -1,3 +1,6 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + stack { name = "scheduler" description = "scheduler" diff --git a/tg/stack.tm.hcl b/tg/stack.tm.hcl index b5832fc82..b8f93f048 100644 --- a/tg/stack.tm.hcl +++ b/tg/stack.tm.hcl @@ -1,3 +1,6 @@ +// Copyright 2024 Terramate GmbH +// SPDX-License-Identifier: MPL-2.0 + stack { name = "tg" description = "tg"