Skip to content

Commit

Permalink
remove unneeded test
Browse files Browse the repository at this point in the history
  • Loading branch information
dsa0x committed Jan 16, 2025
1 parent 614c682 commit a4070ff
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 960 deletions.
4 changes: 0 additions & 4 deletions internal/command/test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ func TestTest_Runs(t *testing.T) {
expectedErr: []string{"Test assertion failed", "resource renamed without moved block"},
code: 1,
},
"simple_testdata": {
expectedOut: []string{" passed, 0 failed."},
code: 0,
},
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {
Expand Down
101 changes: 101 additions & 0 deletions internal/command/testdata/test/shared_state_parallel/main.tftest.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# // To run in parallel, sequential runs must have different state keys, and not depend on each other
# // NotDepends: true
# // DiffStateKey: true

# variables {
# foo = "foo"
# }


# run "setup" {
# module {
# source = "./setup"
# }

# variables {
# input = "foo"
# }

# assert {
# condition = output.value == var.foo
# error_message = "bad"
# }
# }

# // Depends on previous run, but has different state key, so would not run in parallel
# // NotDepends: false
# // DiffStateKey: true
# run "test_a" {
# variables {
# input = run.setup.value
# }

# assert {
# condition = output.value == var.foo
# error_message = "double bad"
# }

# assert {
# condition = run.setup.value == var.foo
# error_message = "triple bad"
# }
# }

# // Depends on previous run, and has same state key, so would not run in parallel
# // NotDepends: false
# // DiffStateKey: false
# run "test_b" {
# variables {
# input = run.test_a.value
# }

# assert {
# condition = output.value == var.foo
# error_message = "double bad"
# }

# assert {
# condition = run.setup.value == var.foo
# error_message = "triple bad"
# }
# }

# // Does not depend on previous run, and has same state key, so would not run in parallel
# // NotDepends: true
# // DiffStateKey: false
# run "test_c" {

# variables {
# input = "foo"
# }

# assert {
# condition = output.value == var.foo
# error_message = "double bad"
# }

# assert {
# condition = run.setup.value == var.foo
# error_message = "triple bad"
# }
# }

# // Does not depend on previous run, and has different state key, so would run in parallel
# // NotDepends: true
# // DiffStateKey: true
# run "test_d" {

# variables {
# input = "foo"
# }

# assert {
# condition = output.value == var.foo
# error_message = "double bad"
# }

# assert {
# condition = run.setup.value == var.foo
# error_message = "triple bad"
# }
# }
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ run "test_c" {
// Does not depend on previous run, and has different state key, so would run in parallel
// NotDepends: true
// DiffStateKey: true
// However, it has a state key that is the same as a previous run, so it should wait for that run.
// However, it has a state key that is the same as run.setup, so it should wait for that run.
run "test_d" {
parallel = true
state_key = "test_d"
Expand All @@ -96,18 +96,9 @@ run "test_d" {
}
}

// Does not depend on previous run, and has different state key, so would run in parallel
// NotDepends: true
// DiffStateKey: true
# run "test_d" {
# parallel = true
# state_key = "test_d"
# variables {
# input = "foo"
# }

# assert {
# condition = output.value == var.foo
# error_message = "double bad"
# }
# }
// Expected order:
// - run [setup]
// - run [test_a, test_d]
// - run [test_b]
// - run [test_c]

15 changes: 0 additions & 15 deletions internal/command/testdata/test/simple_testdata/main.tf

This file was deleted.

Loading

0 comments on commit a4070ff

Please sign in to comment.