feat(e2e): Add configurable timeout for go test execution within scenarios (#3213)

pull/3216/head
Josh Brand 3 years ago committed by GitHub
parent 736cde3584
commit 5ac29eb2e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -118,7 +118,8 @@ module "vault" {
}
module "test_e2e" {
source = "./modules/test_e2e"
source = "./modules/test_e2e"
test_timeout = var.go_test_timeout
}
module "test_e2e_ui" {

@ -172,3 +172,9 @@ variable "boundary_license_path" {
type = string
default = null
}
variable "go_test_timeout" {
description = "Timeout for go test used in e2e tests"
type = string
default = "10m"
}

@ -57,3 +57,6 @@
// would not be able to access the environment variables needed to test locally. Enabling this
// will ensure that the enos scenario passes.
// e2e_debug_no_run = true
// Timeout for `go test` execution in the e2e tests, 10m default
// go_test_timeout = "10m"

@ -116,6 +116,10 @@ variable "worker_tags" {
type = list(string)
default = [""]
}
variable "test_timeout" {
type = string
default = "10m"
}
locals {
aws_ssh_private_key_path = abspath(var.aws_ssh_private_key_path)
@ -149,7 +153,7 @@ resource "enos_local_exec" "run_e2e_test" {
E2E_WORKER_TAG = jsonencode(var.worker_tags),
}
inline = var.debug_no_run ? [""] : ["set -o pipefail; PATH=\"${var.local_boundary_dir}:$PATH\" go test -v ${var.test_package} -count=1 -json | tparse -follow -format plain 2>&1 | tee ${path.module}/../../test-e2e-${local.package_name}.log"]
inline = var.debug_no_run ? [""] : ["set -o pipefail; PATH=\"${var.local_boundary_dir}:$PATH\" go test -v ${var.test_package} -count=1 -json -timeout ${var.test_timeout}| tparse -follow -format plain 2>&1 | tee ${path.module}/../../test-e2e-${local.package_name}.log"]
}
output "test_results" {

Loading…
Cancel
Save