diff --git a/enos/enos-quality-upgrade.hcl b/enos/enos-quality-upgrade.hcl index 01ab700d921..050d9e27eec 100644 --- a/enos/enos-quality-upgrade.hcl +++ b/enos/enos-quality-upgrade.hcl @@ -2,42 +2,42 @@ # SPDX-License-Identifier: BUSL-1.1 quality "nomad_agent_info" { - description = "A GET call to /v1/agent/members returns the correct number of + description = "A GET call to /v1/agent/members returns the correct number of running servers and they are all alive" } quality "nomad_agent_info_self" { - description = "A GET call to /v1/agent/self against every server returns the + description = "A GET call to /v1/agent/self against every server returns the same last_log_index for all of them." } quality "nomad_nodes_status" { - description = "A GET call to /v1/nodes returns the correct number of clients + description = "A GET call to /v1/nodes returns the correct number of clients and they are all `eligible` and `ready`". } quality "nomad_job_status" { - description = "A GET call to /v1/jobs returns the correct number of jobs and + description = "A GET call to /v1/jobs returns the correct number of jobs and they are all `running`". } quality "nomad_register_job" { - description = "A POST call to /v1/jobs results in a new job running and + description = "A POST call to /v1/jobs results in a new job running and allocations being started accordingly." } quality "nomad_reschedule_alloc" { - description = "A POST / PUT call to /v1/allocation/:alloc_id/stop results in + description = "A POST / PUT call to /v1/allocation/:alloc_id/stop results in the stopped allocation being rescheduled" } quality "nomad_restore_snapshot" { - description = "A node can be restored from a snapshot built on a previous + description = "A node can be restored from a snapshot built on a previous version" } quality "nomad_allocs_status" { - description = "A GET call to /v1/allocs returns the correct number of + description = "A GET call to /v1/allocs returns the correct number of allocations and they are all `running`". } diff --git a/enos/enos-scenario-upgrade.hcl b/enos/enos-scenario-upgrade.hcl index ed60d1027a8..e127ccd8347 100644 --- a/enos/enos-scenario-upgrade.hcl +++ b/enos/enos-scenario-upgrade.hcl @@ -2,17 +2,17 @@ # SPDX-License-Identifier: BUSL-1.1 scenario "upgrade" { - description = <<-EOF + description = <<-EOF The upgrade scenario verifies in-place upgrades between previously released versions of Nomad against another candidate build. EOF - matrix { - arch = ["amd64", "arm64"] - //service_discovery = ["consul", "nomad"] - distro = ["alpine", "fedora", "rhel","ubuntu"] - editions = ["ce", "ent"] - os = ["linux", "darwin", "windows"] + matrix { + arch = ["amd64", "arm64"] + //service_discovery = ["consul", "nomad"] + distro = ["alpine", "fedora", "rhel", "ubuntu"] + editions = ["ce", "ent"] + os = ["linux", "darwin", "windows"] } step "copy_binary" { @@ -23,15 +23,15 @@ scenario "upgrade" { module = module.build_artifactory variables { - version = global.initial_version - artifactory_path = globals.artifact_path - artifact_token = globals.artifact_token - os = matrix.os - distro = matrix.os != "linux" ? var.distro : null - local_path = var.binary_local_path + version = global.initial_version + artifactory_path = globals.artifact_path + artifact_token = globals.artifact_token + os = matrix.os + distro = matrix.os != "linux" ? var.distro : null + local_path = var.binary_local_path } } -/* + /* step "provision_cluster" { description = <<-EOF Using the binary from the previous step, provision a Nomad cluster using the e2e diff --git a/enos/modules/fetch_artifactory/locals.tf b/enos/modules/fetch_artifactory/locals.tf index ffa575bacac..7f4b7492fc0 100644 --- a/enos/modules/fetch_artifactory/locals.tf +++ b/enos/modules/fetch_artifactory/locals.tf @@ -14,9 +14,9 @@ locals { } arm64 = { - linux = "_linux_arm64.zip" + linux = "_linux_arm64.zip" } - } + } artifact_name = "nomad_${local.artifact_version}${local.package_extensions[var.arch][var.os]}" } \ No newline at end of file diff --git a/enos/modules/fetch_artifactory/main.tf b/enos/modules/fetch_artifactory/main.tf index b559ea981c5..c9c9be8a26f 100644 --- a/enos/modules/fetch_artifactory/main.tf +++ b/enos/modules/fetch_artifactory/main.tf @@ -4,7 +4,7 @@ terraform { required_providers { enos = { - source = "registry.terraform.io/hashicorp-forge/enos" + source = "registry.terraform.io/hashicorp-forge/enos" } } } @@ -17,17 +17,17 @@ data "enos_artifactory_item" "nomad" { path = local.path name = local.artifact_name properties = tomap({ - "commit" = var.revision - "product-name" = var.edition == "ce" ? "nomad" : "nomad-enterprise" + "commit" = var.revision + "product-name" = var.edition == "ce" ? "nomad" : "nomad-enterprise" }) } resource "enos_local_exec" "install_binary" { - environment = { - URL = data.enos_artifactory_item.nomad.results[0].url - BINARY_PATH = var.binary_path - TOKEN = var.artifactory_token - } + environment = { + URL = data.enos_artifactory_item.nomad.results[0].url + BINARY_PATH = var.binary_path + TOKEN = var.artifactory_token + } - scripts = [abspath("${path.module}/scripts/install.sh")] + scripts = [abspath("${path.module}/scripts/install.sh")] } \ No newline at end of file diff --git a/enos/modules/fetch_artifactory/outputs.tf b/enos/modules/fetch_artifactory/outputs.tf index e29c16200fd..e335d514d3a 100644 --- a/enos/modules/fetch_artifactory/outputs.tf +++ b/enos/modules/fetch_artifactory/outputs.tf @@ -9,7 +9,7 @@ output "local_binary" { output "vault_artifactory_release" { description = "Binary information returned from the artifactory" value = { - url = data.enos_artifactory_item.nomad.results[0].url - sha256 = data.enos_artifactory_item.nomad.results[0].sha256 + url = data.enos_artifactory_item.nomad.results[0].url + sha256 = data.enos_artifactory_item.nomad.results[0].sha256 } } \ No newline at end of file diff --git a/enos/modules/fetch_artifactory/variables.tf b/enos/modules/fetch_artifactory/variables.tf index b8e3c815d1c..b5c7c96596d 100644 --- a/enos/modules/fetch_artifactory/variables.tf +++ b/enos/modules/fetch_artifactory/variables.tf @@ -39,7 +39,7 @@ variable "revision" { variable "os" { type = string description = "The operative system the binary is needed for" - default = "linux" + default = "linux" } variable "product_version" { @@ -56,5 +56,5 @@ variable "arch" { variable "binary_path" { description = "The path to donwload and unzip the binary" type = string - default = "/home/ubuntu/nomad" + default = "/home/ubuntu/nomad" }