From 38e3e2c7c49f7a08d4dcc64ba00a969fa7a80561 Mon Sep 17 00:00:00 2001 From: Juanadelacuesta <8647634+Juanadelacuesta@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:40:58 -0500 Subject: [PATCH] fix: update syntax to get enos running --- enos/enos-quality.hcl | 24 ++++++---------- enos/enos-scenario-upgrade.hcl | 10 +++---- enos/enos-terraform.hcl | 4 ++- enos/enos-vars.hcl | 28 +------------------ .../fetch_artifactory/scripts/install.sh | 2 +- enos/modules/fetch_artifactory/variables.tf | 2 +- 6 files changed, 19 insertions(+), 51 deletions(-) diff --git a/enos/enos-quality.hcl b/enos/enos-quality.hcl index 050d9e27eec..eeb8dfeced2 100644 --- a/enos/enos-quality.hcl +++ b/enos/enos-quality.hcl @@ -2,42 +2,34 @@ # SPDX-License-Identifier: BUSL-1.1 quality "nomad_agent_info" { - description = "A GET call to /v1/agent/members returns the correct number of - running servers and they are all alive" + 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 - same last_log_index for all of them." + 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 - and they are all `eligible` and `ready`". + 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 - they are all `running`". + 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 - allocations being started accordingly." + 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 - the stopped allocation being rescheduled" + 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 - version" + 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 - allocations and they are all `running`". + 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 62271891848..b4d2bcb2782 100644 --- a/enos/enos-scenario-upgrade.hcl +++ b/enos/enos-scenario-upgrade.hcl @@ -9,8 +9,8 @@ scenario "upgrade" { matrix { arch = ["amd64", "arm64"] - service_discovery = ["consul", "nomad"] - editions = ["ce", "ent"] + //service_discovery = ["consul", "nomad"] + edition = ["ce", "ent"] os = ["linux", "windows"] exclude { @@ -28,7 +28,7 @@ scenario "upgrade" { variables { artifactory_username = var.artifactory_username - artifactory_token = var.artifact_token + artifactory_token = var.artifactory_token arch = matrix.arch edition = matrix.edition product_version = var.product_version @@ -37,7 +37,7 @@ scenario "upgrade" { } } - step "provision_cluster" { +/* step "provision_cluster" { description = <<-EOF Using the binary from the previous step, provision a Nomad cluster using the e2e EOF @@ -51,7 +51,7 @@ scenario "upgrade" { client_count_ubuntu_jammy_amd64 = matrix.distro != "ubuntu" ? var.client_count_ubuntu_jammy_amd64 : 0 // ... } - } + } */ /* step "run_new_workloads" { description = <<-EOF diff --git a/enos/enos-terraform.hcl b/enos/enos-terraform.hcl index 873646e0eb9..63fa4dbc94c 100644 --- a/enos/enos-terraform.hcl +++ b/enos/enos-terraform.hcl @@ -1,10 +1,12 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: BUSL-1.1 -terraform { +terraform "default" { required_providers { enos = { source = "registry.terraform.io/hashicorp-forge/enos" } } + + required_version = ">= 1.2.0" } \ No newline at end of file diff --git a/enos/enos-vars.hcl b/enos/enos-vars.hcl index ca281333881..2c94d7ee858 100644 --- a/enos/enos-vars.hcl +++ b/enos/enos-vars.hcl @@ -15,39 +15,13 @@ variable "artifactory_token" { sensitive = true } -variable "artifactory_host" { - type = string - description = "The artifactory host to search for Nomad artifacts" -} - -variable "artifactory_repo" { - type = string - description = "The artifactory repo to search for Nomad artifacts" -} - -variable "edition" { - type = string - description = "The edition of the binary to search, it can be either CE or ENT" -} - -variable "os" { - type = string - description = "The operative system the binary is needed for" - default = "linux" -} - variable "product_version" { description = "The version of Nomad we are testing" type = string default = null } -variable "arch" { - description = "The artifactory path to search for Nomad artifacts" - type = string -} - -variable "binary_path" { +variable "binary_local_path" { description = "The path to donwload and unzip the binary" type = string } diff --git a/enos/modules/fetch_artifactory/scripts/install.sh b/enos/modules/fetch_artifactory/scripts/install.sh index a7f9c24ae14..e29e4433831 100755 --- a/enos/modules/fetch_artifactory/scripts/install.sh +++ b/enos/modules/fetch_artifactory/scripts/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: BUSL-1.1 diff --git a/enos/modules/fetch_artifactory/variables.tf b/enos/modules/fetch_artifactory/variables.tf index 9c51b5f3d63..b1438adcc76 100644 --- a/enos/modules/fetch_artifactory/variables.tf +++ b/enos/modules/fetch_artifactory/variables.tf @@ -23,7 +23,7 @@ variable "artifactory_host" { variable "artifactory_repo" { type = string description = "The artifactory repo to search for Nomad artifacts" - default = "hashicorp-crt-stable-local*" + default = "hashicorp-crt-staging-local*" } variable "edition" {