Update user-facing references to Terraform internal/command/e2etest (#91)

Signed-off-by: Marcin Białoń <mbialon@spacelift.io>
This commit is contained in:
Marcin Białoń 2023-08-24 11:14:34 +02:00 committed by GitHub
parent 3b5b8ba719
commit 90f23d19b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 20 additions and 20 deletions

View File

@ -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") {

View File

@ -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.

View File

@ -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() {}
}

View File

@ -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()

View File

@ -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 {

View File

@ -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/"

View File

@ -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

View File

@ -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) {

View File

@ -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 {

View File

@ -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()

View File

@ -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