github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/configs/testdata/valid-modules/with-tests/test_case_one.tftest.hcl (about)

     1  variables {
     2    input = "default"
     3  }
     4  
     5  # test_run_one runs a partial plan
     6  run "test_run_one" {
     7    command = plan
     8  
     9    plan_options {
    10      target = [
    11        foo_resource.a
    12      ]
    13    }
    14  
    15    assert {
    16      condition = foo_resource.a.value == "default"
    17      error_message = "invalid value"
    18    }
    19  }
    20  
    21  # test_run_two does a complete apply operation
    22  run "test_run_two" {
    23    variables {
    24      input = "custom"
    25    }
    26  
    27    assert {
    28      condition = foo_resource.a.value == "custom"
    29      error_message = "invalid value"
    30    }
    31  }