Files
opentf/internal/command/e2etest/module_archive_test.go
Kuba Martin 3b5b8ba719 Update internal/command to use OpenTF in user-provided strings. (#87)
* Update `internal/command` to use OpenTF

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix e2e tests.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix e2e tests.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Rewrite message.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

---------

Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-08-24 10:56:05 +02:00

36 lines
777 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package e2etest
import (
"path/filepath"
"strings"
"testing"
"github.com/placeholderplaceholderplaceholder/opentf/internal/e2e"
)
func TestInitModuleArchive(t *testing.T) {
t.Parallel()
// this fetches a module archive from github
skipIfCannotAccessNetwork(t)
fixturePath := filepath.Join("testdata", "module-archive")
tf := e2e.NewBinary(t, terraformBin, fixturePath)
stdout, stderr, err := tf.Run("init")
if err != nil {
t.Errorf("unexpected error: %s", err)
}
if stderr != "" {
t.Errorf("unexpected stderr output:\n%s", stderr)
}
if !strings.Contains(stdout, "OpenTF has been successfully initialized!") {
t.Errorf("success message is missing from output:\n%s", stdout)
}
}