github.com/opentofu/opentofu@v1.7.1/internal/command/e2etest/doc.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 // Package e2etest contains a set of tests that run against a real OpenTofu 7 // binary, compiled on the fly at the start of the test run. 8 // 9 // These tests help ensure that key end-to-end OpenTofu use-cases are working 10 // for a real binary, whereas other tests always have at least _some_ amount 11 // of test stubbing. 12 // 13 // The goal of this package is not to duplicate the functional testing done 14 // in other packages but rather to fully exercise a few important workflows 15 // in a realistic way. 16 // 17 // These tests can be used in two ways. The simplest way is to just run them 18 // with "go test" as normal: 19 // 20 // go test -v github.com/opentofu/opentofu/internal/command/e2etest 21 // 22 // This will compile on the fly a OpenTofu binary and run the tests against 23 // it. 24 // 25 // Alternatively, the make-archive.sh script can be used to produce a 26 // self-contained zip file that can be shipped to another machine to run 27 // the tests there without needing a locally-installed Go compiler. This 28 // is primarily useful for testing cross-compiled builds during our release 29 // process. For more information, see the commentary in make-archive.sh. 30 // 31 // The TF_ACC environment variable must be set for the tests to reach out 32 // to external network services. Since these are end-to-end tests, only a 33 // few very basic tests can execute without this environment variable set. 34 package e2etest