Skip to content

Commit

Permalink
fix: update syntax to get enos running
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanadelacuesta committed Dec 3, 2024
1 parent 8295814 commit 38e3e2c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 51 deletions.
24 changes: 8 additions & 16 deletions enos/enos-quality.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
10 changes: 5 additions & 5 deletions enos/enos-scenario-upgrade.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion enos/enos-terraform.hcl
Original file line number Diff line number Diff line change
@@ -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"
}
28 changes: 1 addition & 27 deletions enos/enos-vars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion enos/modules/fetch_artifactory/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1

Expand Down
2 changes: 1 addition & 1 deletion enos/modules/fetch_artifactory/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 38e3e2c

Please sign in to comment.