Repository: runatlantis/atlantis (language: go)

Issue:
Tests requiring the `conftest` binary fail with newer versions of the utility
When running the tests on a fresh system the following failure occurs:

```
--- FAIL: TestGitHubWorkflowWithPolicyCheck (0.03s)
    events_controller_e2e_test.go:1324: conftest >= 0.25.0 must be installed to run this test
FAIL
FAIL	github.com/runatlantis/atlantis/server/controllers/events	131.108s
FAIL
```

When the latest version of conftest (0.34.0) is installed using homebrew this failure persists despite the binary being on `$PATH`. Digging into the code I found that the tests are looking for a binary named `conftest0.25.0`, adding a symlink with this name allowed the tests to find the binary but they still fail with a different error.

```
» go test ./server/controllers/events
--- FAIL: TestGitHubWorkflowWithPolicyCheck (0.13s)
    events_controller_e2e_test.go:1335: could not parse contest version from Conftest: 0.34.0
        OPA: 0.43.0
FAIL
FAIL	github.com/runatlantis/atlantis/server/controllers/events	138.859s
FAIL
```

It seems like there are two problems here.
1. We're looking for a binary with a version in the name rather than the generic binary name
2. The version detection logic checking the program output is not handling the new output correctly.


Discussion / hints:
Hmm then perhaps we need to update this version or change the logic so we can avoid this check. I'm unsure how much value a version check is doing here.

https://github.com/runatlantis/atlantis/blob/3bfd76921185822e951041d45f4ebe6edbebf765/server/controllers/events/events_controller_e2e_test.go#L44

https://github.com/runatlantis/atlantis/blob/90e92e3a13e8cb7f07ae6b0935b1a0bdf90be927/server/core/runtime/policy/conftest_client_test.go#L25

But perhaps it's simply testing downloading custom versions of conftest? Would you be able to look at this closer @tpickett66 ?

Fix patch:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index f04dbd871d..01249b936b 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,7 +2,7 @@ version: 2
 jobs:
   test:
     docker:
-    - image: ghcr.io/runatlantis/testing-env:2023.01.04
+    - image: ghcr.io/runatlantis/testing-env:latest
     steps:
     - checkout
     - run: make check-fmt
diff --git a/Makefile b/Makefile
index b49e594be8..1d688d21fa 100644
--- a/Makefile
+++ b/Makefile
@@ -36,14 +36,14 @@ test: ## Run tests
 
 .PHONY: docker/test
 docker/test: ## Run tests in docker
-	docker run -it -v $(PWD):/atlantis ghcr.io/runatlantis/testing-env:2022.12.17 sh -c "cd /atlantis && make test"
+	docker run -it -v $(PWD):/atlantis ghcr.io/runatlantis/testing-env:latest sh -c "cd /atlantis && make test"
 
 test-all: ## Run tests including integration
 	@go test  $(PKG)
 
 .PHONY: docker/test-all
 docker/test-all: ## Run all tests in docker
-	docker run -it -v $(pwd):/atlantis ghcr.io/runatlantis/testing-env:2022.12.17 sh -c "cd /atlantis && make test-all"
+	docker run -it -v $(pwd):/atlantis ghcr.io/runatlantis/testing-env:latest sh -c "cd /atlantis && make test-all"
 
 test-coverage:
 	@mkdir -p .cover


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 517f269278..1405623822 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -27,7 +27,7 @@ jobs:
     if: github.event.pull_request.draft == false
     name: runner / gotest
     runs-on: ubuntu-22.04
-    container: ghcr.io/runatlantis/testing-env:2023.01.04
+    container: ghcr.io/runatlantis/testing-env:latest
     steps:
       - uses: actions/checkout@v3
       - run: make test-all