mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
command: fix failing TestPlan_noState test
Turns out that isolating statefiles in the Apply tests is an important step to prevent leaking .tfstate in a common dir, which can affect other tests.
This commit is contained in:
parent
ec2d22cf29
commit
9428e9f1d1
@ -61,6 +61,7 @@ func TestApply(t *testing.T) {
|
|||||||
|
|
||||||
func TestApply_parallelism(t *testing.T) {
|
func TestApply_parallelism(t *testing.T) {
|
||||||
provider := testProvider()
|
provider := testProvider()
|
||||||
|
statePath := testTempFile(t)
|
||||||
|
|
||||||
// This blocks all the appy functions. We close it when we exit so
|
// This blocks all the appy functions. We close it when we exit so
|
||||||
// they end quickly after this test finishes.
|
// they end quickly after this test finishes.
|
||||||
@ -91,6 +92,7 @@ func TestApply_parallelism(t *testing.T) {
|
|||||||
|
|
||||||
par := uint64(5)
|
par := uint64(5)
|
||||||
args := []string{
|
args := []string{
|
||||||
|
"-state", statePath,
|
||||||
fmt.Sprintf("-parallelism=%d", par),
|
fmt.Sprintf("-parallelism=%d", par),
|
||||||
testFixturePath("parallelism"),
|
testFixturePath("parallelism"),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user