From 90f23d19b634996c3a82b2d99ffbf61ca6c0331e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Bia=C5=82o=C5=84?= Date: Thu, 24 Aug 2023 11:14:34 +0200 Subject: [PATCH] Update user-facing references to Terraform `internal/command/e2etest` (#91) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Białoń --- internal/command/e2etest/automation_test.go | 6 +++--- internal/command/e2etest/init_test.go | 4 ++-- internal/command/e2etest/main_test.go | 2 +- internal/command/e2etest/primary_test.go | 8 ++++---- internal/command/e2etest/provider_dev_test.go | 4 ++-- internal/command/e2etest/provider_plugin_test.go | 2 +- internal/command/e2etest/providers_mirror_test.go | 2 +- internal/command/e2etest/providers_tamper_test.go | 2 +- internal/command/e2etest/provisioner_plugin_test.go | 2 +- internal/command/e2etest/provisioner_test.go | 2 +- internal/command/e2etest/unmanaged_test.go | 6 +++--- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/internal/command/e2etest/automation_test.go b/internal/command/e2etest/automation_test.go index f6905f4bd9..a6b76cf2dd 100644 --- a/internal/command/e2etest/automation_test.go +++ b/internal/command/e2etest/automation_test.go @@ -236,9 +236,9 @@ func TestPlanOnlyInAutomation(t *testing.T) { } // Because we're running with TF_IN_AUTOMATION set, we should not see - // any mention of the the "terraform apply" command in the output. - if strings.Contains(stdout, "terraform apply") { - t.Errorf("unwanted mention of \"terraform apply\" in plan output\n%s", stdout) + // any mention of the the "opentf apply" command in the output. + if strings.Contains(stdout, "opentf apply") { + t.Errorf("unwanted mention of \"opentf apply\" in plan output\n%s", stdout) } if tf.FileExists("tfplan") { diff --git a/internal/command/e2etest/init_test.go b/internal/command/e2etest/init_test.go index 9ebfdd0cf0..d8f9a4895a 100644 --- a/internal/command/e2etest/init_test.go +++ b/internal/command/e2etest/init_test.go @@ -58,7 +58,7 @@ func TestInitProvidersInternal(t *testing.T) { t.Parallel() // This test should _not_ reach out anywhere because the "terraform" - // provider is internal to the core terraform binary. + // provider is internal to the core opentf binary. fixturePath := filepath.Join("testdata", "terraform-provider") tf := e2e.NewBinary(t, terraformBin, fixturePath) @@ -145,7 +145,7 @@ func TestInitProvidersLocalOnly(t *testing.T) { fixturePath := filepath.Join("testdata", "local-only-provider") tf := e2e.NewBinary(t, terraformBin, fixturePath) // If you run this test on a workstation with a plugin-cache directory - // configured, it will leave a bad directory behind and terraform init will + // configured, it will leave a bad directory behind and opentf init will // not work until you remove it. // // To avoid this, we will "zero out" any existing cli config file. diff --git a/internal/command/e2etest/main_test.go b/internal/command/e2etest/main_test.go index 7e68d4f8ba..9562adb4ec 100644 --- a/internal/command/e2etest/main_test.go +++ b/internal/command/e2etest/main_test.go @@ -43,7 +43,7 @@ func setup() func() { var err error terraformBin, err = filepath.Abs(terraformBin) if err != nil { - panic(fmt.Sprintf("failed to find absolute path of terraform executable: %s", err)) + panic(fmt.Sprintf("failed to find absolute path of opentf executable: %s", err)) } return func() {} } diff --git a/internal/command/e2etest/primary_test.go b/internal/command/e2etest/primary_test.go index d92b9e4b40..9172005d27 100644 --- a/internal/command/e2etest/primary_test.go +++ b/internal/command/e2etest/primary_test.go @@ -18,10 +18,10 @@ import ( // The tests in this file are for the "primary workflow", which includes // variants of the following sequence, with different details: -// terraform init -// terraform plan -// terraform apply -// terraform destroy +// opentf init +// opentf plan +// opentf apply +// opentf destroy func TestPrimarySeparatePlan(t *testing.T) { t.Parallel() diff --git a/internal/command/e2etest/provider_dev_test.go b/internal/command/e2etest/provider_dev_test.go index b465aa42bd..d6f8753be6 100644 --- a/internal/command/e2etest/provider_dev_test.go +++ b/internal/command/e2etest/provider_dev_test.go @@ -67,11 +67,11 @@ func TestProviderDevOverrides(t *testing.T) { t.Errorf("configuration should depend on %s, but doesn't\n%s", want, got) } - // NOTE: We're intentionally not running "terraform init" here, because + // NOTE: We're intentionally not running "opentf init" here, because // dev overrides are always ready to use and don't need any special action // to "install" them. This test is mimicking the a happy path of going // directly from "go build" to validate/plan/apply without interacting - // with any registries, mirrors, lock files, etc. To verify "terraform + // with any registries, mirrors, lock files, etc. To verify "opentf // init" does actually show a warning, that behavior is tested at the end. stdout, stderr, err = tf.Run("validate") if err != nil { diff --git a/internal/command/e2etest/provider_plugin_test.go b/internal/command/e2etest/provider_plugin_test.go index 89821b639f..85e9b585ec 100644 --- a/internal/command/e2etest/provider_plugin_test.go +++ b/internal/command/e2etest/provider_plugin_test.go @@ -38,7 +38,7 @@ func TestProviderProtocols(t *testing.T) { simpleProvider := filepath.Join(tf.WorkDir(), "terraform-provider-simple") simpleProviderExe := e2e.GoBuild("github.com/placeholderplaceholderplaceholder/opentf/internal/provider-simple/main", simpleProvider) - // Move the provider binaries into a directory that we will point terraform + // Move the provider binaries into a directory that we will point opentf // to using the -plugin-dir cli flag. platform := getproviders.CurrentPlatform.String() hashiDir := "cache/registry.terraform.io/hashicorp/" diff --git a/internal/command/e2etest/providers_mirror_test.go b/internal/command/e2etest/providers_mirror_test.go index 1615ccc7a6..79d98d48ac 100644 --- a/internal/command/e2etest/providers_mirror_test.go +++ b/internal/command/e2etest/providers_mirror_test.go @@ -13,7 +13,7 @@ import ( "github.com/placeholderplaceholderplaceholder/opentf/internal/e2e" ) -// The tests in this file are for the "terraform providers mirror" command, +// The tests in this file are for the "opentf providers mirror" command, // which is tested in an e2etest mode rather than a unit test mode because it // interacts directly with Terraform Registry and the full details of that are // tricky to mock. Such a mock is _possible_, but we're using e2etest as a diff --git a/internal/command/e2etest/providers_tamper_test.go b/internal/command/e2etest/providers_tamper_test.go index 2770d1b886..28e8663899 100644 --- a/internal/command/e2etest/providers_tamper_test.go +++ b/internal/command/e2etest/providers_tamper_test.go @@ -15,7 +15,7 @@ import ( ) // TestProviderTampering tests various ways that the provider plugins in the -// local cache directory might be modified after an initial "terraform init", +// local cache directory might be modified after an initial "opentf init", // which other Terraform commands which use those plugins should catch and // report early. func TestProviderTampering(t *testing.T) { diff --git a/internal/command/e2etest/provisioner_plugin_test.go b/internal/command/e2etest/provisioner_plugin_test.go index 299d237da6..645d6561e9 100644 --- a/internal/command/e2etest/provisioner_plugin_test.go +++ b/internal/command/e2etest/provisioner_plugin_test.go @@ -12,7 +12,7 @@ import ( "github.com/placeholderplaceholderplaceholder/opentf/internal/e2e" ) -// TestProvisionerPlugin is a test that terraform can execute a 3rd party +// TestProvisionerPlugin is a test that opentf can execute a 3rd party // provisioner plugin. func TestProvisionerPlugin(t *testing.T) { if !canRunGoBuild { diff --git a/internal/command/e2etest/provisioner_test.go b/internal/command/e2etest/provisioner_test.go index 9ab6415388..fffccf8570 100644 --- a/internal/command/e2etest/provisioner_test.go +++ b/internal/command/e2etest/provisioner_test.go @@ -10,7 +10,7 @@ import ( "github.com/placeholderplaceholderplaceholder/opentf/internal/e2e" ) -// TestProviderDevOverrides is a test that terraform can execute a 3rd party +// TestProviderDevOverrides is a test that opentf can execute a 3rd party // provisioner plugin. func TestProvisioner(t *testing.T) { t.Parallel() diff --git a/internal/command/e2etest/unmanaged_test.go b/internal/command/e2etest/unmanaged_test.go index 4dc1421eee..56892ea01f 100644 --- a/internal/command/e2etest/unmanaged_test.go +++ b/internal/command/e2etest/unmanaged_test.go @@ -26,9 +26,9 @@ import ( // The tests in this file are for the "unmanaged provider workflow", which // includes variants of the following sequence, with different details: -// terraform init -// terraform plan -// terraform apply +// opentf init +// opentf plan +// opentf apply // // These tests are run against an in-process server, and checked to make sure // they're not trying to control the lifecycle of the binary. They are not