chore(e2e): Remove go version variable (#6524)

This commit is contained in:
Michael Li authored and GitHub committed 2026-04-01 15:13:43 -04:00
1 parent cb8edfc926
commit 0ad2bb65dc
13 files changed
+17 -55

No files matched your search

-23
View File
@@ -14,10 +14,6 @@ terraform {
}
}
variable "docker_mirror" {
description = "URL to the docker repository"
type = string
}
variable "network_name" {
description = "Name of Docker Network"
type = string
@@ -27,11 +23,6 @@ variable "controller_container_name" {
type = string
default = ""
}
variable "go_version" {
description = "Version of Golang used by the application under test"
type = string
default = ""
}
variable "debug_no_run" {
description = "If set, this module will not execute the tests so that you can still access environment variables"
type = bool
@@ -301,29 +292,15 @@ variable "gcp_host_set_ips" {
default = [""]
}
resource "enos_local_exec" "get_go_version" {
count = var.go_version == "" ? 1 : 0
inline = ["cat $(echo $(git rev-parse --show-toplevel))/.go-version | xargs"]
}
locals {
go_version = var.go_version == "" ? enos_local_exec.get_go_version[0].stdout : var.go_version
image_name = trimspace("${var.docker_mirror}/library/golang:${local.go_version}")
aws_ssh_private_key_path = abspath(var.aws_ssh_private_key_path)
package_name = reverse(split("/", var.test_package))[0]
}
resource "docker_image" "go" {
name = local.image_name
keep_locally = true
}
resource "enos_local_exec" "run_e2e_test" {
depends_on = [docker_image.go]
environment = {
TEST_PACKAGE = var.test_package
TEST_TIMEOUT = var.test_timeout
TEST_RUNNER_IMAGE = docker_image.go.image_id
TEST_NETWORK_NAME = var.network_name
E2E_TESTS = "true"
BOUNDARY_ADDR = var.alb_boundary_api_addr