)]}'
{
  "commit": "cff1cb8939e568fc9feb421dd29429859c7a0276",
  "tree": "d2d9aee7116556fef4ec43c5c36e46329d8cf723",
  "parents": [
    "f8daf3dc8e047bd082f80a0918488f06e3ce233b"
  ],
  "author": {
    "name": "Brian Flad",
    "email": "bflad417@gmail.com",
    "time": "Thu Aug 31 05:44:39 2023 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Aug 31 10:44:39 2023 +0100"
  },
  "message": "tfexec: Initial test command support (#400)\n\nReference: https://github.com/hashicorp/terraform-exec/issues/398\r\nReference: https://github.com/hashicorp/terraform/pull/33454\r\n\r\nAdds support for the `terraform test` command, which currently supports JSON machine-readable output and one flag for configuring the tests directory away from the command default of `tests`. The command will return a non-zero status if any of the tests fail, which returns an error back to callers of the `Test` function. If consumers need access to the pass/fail test results, the terraform-json Go module will need to be enhanced to support the test summary JSON, e.g.\r\n\r\n```\r\n{\"@level\":\"info\",\"@message\":\"Failure! 0 passed, 1 failed.\",\"@module\":\"terraform.ui\",\"@timestamp\":\"2023-07-25T10:03:42.980799-04:00\",\"test_summary\":{\"status\":\"fail\",\"passed\":0,\"failed\":1,\"errored\":0,\"skipped\":0},\"type\":\"test_summary\"}\r\n```\r\n\r\nOutput of new end-to-end testing:\r\n\r\n```\r\n$ TFEXEC_E2ETEST_VERSIONS\u003d1.5.3,1.6.0-alpha20230719 go test -count\u003d1 -run\u003d\u0027TestTest\u0027 -v ./tfexec/internal/e2etest\r\n...\r\n--- PASS: TestTest (9.50s)\r\n    --- SKIP: TestTest/test_command_passing-1.5.3 (4.06s)\r\n    --- PASS: TestTest/test_command_passing-1.6.0-alpha20230719 (5.44s)\r\n...\r\n--- PASS: TestTestError (0.48s)\r\n    --- SKIP: TestTestError/test_command_failing-1.5.3 (0.27s)\r\n    --- PASS: TestTestError/test_command_failing-1.6.0-alpha20230719 (0.21s)\r\n```",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f925e2287f02a559a3cb98645f6fd7537ee664ec",
      "new_mode": 33188,
      "new_path": "tfexec/internal/e2etest/test_test.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b4652a0711b6b3b0901aa0807f20d342c56c5a97",
      "new_mode": 33188,
      "new_path": "tfexec/internal/e2etest/testdata/test_command_failing/main.tf"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "25d302602692a2cdaa0cb4513b92e5140ca012be",
      "new_mode": 33188,
      "new_path": "tfexec/internal/e2etest/testdata/test_command_failing/tests/passthrough.tftest"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b4652a0711b6b3b0901aa0807f20d342c56c5a97",
      "new_mode": 33188,
      "new_path": "tfexec/internal/e2etest/testdata/test_command_passing/main.tf"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3ebaf8d230fcfe2c4f6af89be7bb2e6a7b4bacb7",
      "new_mode": 33188,
      "new_path": "tfexec/internal/e2etest/testdata/test_command_passing/tests/passthrough.tftest"
    },
    {
      "type": "modify",
      "old_id": "e2f87b292327d6130f623b47107cf86352ef0197",
      "old_mode": 33188,
      "old_path": "tfexec/internal/testutil/tfcache.go",
      "new_id": "ff9ceb003284c3655e126c2774125bb839d49cfc",
      "new_mode": 33188,
      "new_path": "tfexec/internal/testutil/tfcache.go"
    },
    {
      "type": "modify",
      "old_id": "a9bade054ff880a0a084b00b3652bd3a82be8799",
      "old_mode": 33188,
      "old_path": "tfexec/options.go",
      "new_id": "5cccde3ec2d711d212ceea878a5a83f0410e9bb7",
      "new_mode": 33188,
      "new_path": "tfexec/options.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5e0bb6353fb663df54917b684519099965094f26",
      "new_mode": 33188,
      "new_path": "tfexec/test.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "aa2b450833500802a6afd3422d011a4f4943c651",
      "new_mode": 33188,
      "new_path": "tfexec/test_test.go"
    },
    {
      "type": "modify",
      "old_id": "ec4d5221dee3a782be2b205ba31f55c00ed7b13a",
      "old_mode": 33188,
      "old_path": "tfexec/version.go",
      "new_id": "623321220359622161fbcbe8c3ee2c47260a0411",
      "new_mode": 33188,
      "new_path": "tfexec/version.go"
    }
  ]
}
