From 3459db437cb062e5352399b132ed9e67b24fbaae Mon Sep 17 00:00:00 2001 From: Ryan Thorn <106628688+rthorn-nr@users.noreply.github.com> Date: Fri, 20 Oct 2023 09:56:07 -0700 Subject: [PATCH] Fix nonregression tests (#982) * chore(e2e): Update ubuntu 16 AMIs * chore(e2e): Fix ubuntu 16 host collisions * chore(e2e): Fix invalid resource ID * chore(e2e): Rename ubuntu16 resource ids * chore(e2e): Update manual ubuntu16 AMI * chore(e2e): Avoid id collision --- .../apm/java/deb10-sysd-jboss.json | 10 ++-- .../infra-agent/debians/ubuntu16-infra.json | 48 +++++++++--------- .../otel/debians/ubuntu16-otel.json | 50 ++++++++++--------- .../debians/ubuntu16-super-agent.json | 50 ++++++++++--------- .../otel/debians/ubuntu16-otel.json | 50 ++++++++++--------- test/definitions/smoke/rhl2-sysd-jboss.json | 10 ++-- .../debians/ubuntu16-super-agent.json | 50 ++++++++++--------- .../infra-agent/ubuntu16-infra.json | 21 ++++---- 8 files changed, 151 insertions(+), 138 deletions(-) diff --git a/test/definitions-eu/apm/java/deb10-sysd-jboss.json b/test/definitions-eu/apm/java/deb10-sysd-jboss.json index 12a74a816..7349c6298 100644 --- a/test/definitions-eu/apm/java/deb10-sysd-jboss.json +++ b/test/definitions-eu/apm/java/deb10-sysd-jboss.json @@ -7,7 +7,7 @@ }, "resources": [ { - "id": "jboss", + "id": "deb10-jboss", "provider": "aws", "type": "ec2", "size": "t3.micro", @@ -21,7 +21,9 @@ "source_repository": "https://github.com/newrelic/open-install-library.git", "deploy_script_path": "test/deploy/linux/jboss/systemd/install/linux/roles", "port": 6001, - "destinations": ["jboss"] + "destinations": [ + "deb10-jboss" + ] } ], "instrumentations": { @@ -29,7 +31,7 @@ { "id": "jbossRecipe", "resource_ids": [ - "jboss" + "deb10-jboss" ], "provider": "newrelic", "source_repository": "https://github.com/newrelic/open-install-library.git", @@ -42,7 +44,7 @@ { "id": "recipeValidation", "resource_ids": [ - "jboss" + "deb10-jboss" ], "provider": "newrelic", "source_repository": "https://github.com/newrelic/open-install-library.git", diff --git a/test/definitions-eu/infra-agent/debians/ubuntu16-infra.json b/test/definitions-eu/infra-agent/debians/ubuntu16-infra.json index 08f8d0dcd..e36d4c5d5 100644 --- a/test/definitions-eu/infra-agent/debians/ubuntu16-infra.json +++ b/test/definitions-eu/infra-agent/debians/ubuntu16-infra.json @@ -5,29 +5,31 @@ "Department": "product", "Product": "virtuoso" }, - - "resources": [{ - "id": "host1", - "provider": "aws", - "type": "ec2", - "size": "t3.nano", - "ami_name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-????????", - "user_name": "ubuntu" - }], - + "resources": [ + { + "id": "ubuntu16-infra-eu", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "ubuntu-pro-server/images/hvm-ssd/ubuntu-xenial-16.04-amd64-pro-server-????????", + "user_name": "ubuntu" + } + ], "instrumentations": { "resources": [ - { - "id": "nr_infra", - "resource_ids": ["host1"], - "provider": "newrelic", - "source_repository": "https://github.com/newrelic/open-install-library", - "deploy_script_path": "test/deploy/linux/newrelic-cli/install/roles", - "params": { - "local_recipes": true, - "validate_output": "Infrastructure Agent\\s+\\(installed\\)" - } - } - ] - } + { + "id": "nr_infra", + "resource_ids": [ + "ubuntu16-infra-eu" + ], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install/roles", + "params": { + "local_recipes": true, + "validate_output": "Infrastructure Agent\\s+\\(installed\\)" + } + } + ] + } } diff --git a/test/definitions-eu/otel/debians/ubuntu16-otel.json b/test/definitions-eu/otel/debians/ubuntu16-otel.json index 66454b644..db69dcd8c 100644 --- a/test/definitions-eu/otel/debians/ubuntu16-otel.json +++ b/test/definitions-eu/otel/debians/ubuntu16-otel.json @@ -5,30 +5,32 @@ "Department": "product", "Product": "virtuoso" }, - - "resources": [{ - "id": "host1", - "provider": "aws", - "type": "ec2", - "size": "t3.nano", - "ami_name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-????????", - "user_name": "ubuntu" - }], - + "resources": [ + { + "id": "ubuntu16-otel-eu", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "ubuntu-pro-server/images/hvm-ssd/ubuntu-xenial-16.04-amd64-pro-server-????????", + "user_name": "ubuntu" + } + ], "instrumentations": { "resources": [ - { - "id": "nr_infra_otel", - "resource_ids": ["host1"], - "provider": "newrelic", - "source_repository": "https://github.com/newrelic/open-install-library.git", - "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", - "params": { - "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/otel/debian.yml", - "validate_output": "New Relic OpenTelemetry Collector\\s+\\(installed\\)", - "recipe_targeted": "newrelic-opentelemetry-collector" - } - } - ] - } + { + "id": "nr_otel", + "resource_ids": [ + "ubuntu16-otel-eu" + ], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", + "params": { + "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/otel/debian.yml", + "validate_output": "New Relic OpenTelemetry Collector\\s+\\(installed\\)", + "recipe_targeted": "newrelic-opentelemetry-collector" + } + } + ] + } } diff --git a/test/definitions-eu/super-agent/debians/ubuntu16-super-agent.json b/test/definitions-eu/super-agent/debians/ubuntu16-super-agent.json index b58d215df..a943992a2 100644 --- a/test/definitions-eu/super-agent/debians/ubuntu16-super-agent.json +++ b/test/definitions-eu/super-agent/debians/ubuntu16-super-agent.json @@ -5,30 +5,32 @@ "Department": "product", "Product": "virtuoso" }, - - "resources": [{ - "id": "host1", - "provider": "aws", - "type": "ec2", - "size": "t3.nano", - "ami_name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-????????", - "user_name": "ubuntu" - }], - + "resources": [ + { + "id": "ubuntu16-super-eu", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "ubuntu-pro-server/images/hvm-ssd/ubuntu-xenial-16.04-amd64-pro-server-????????", + "user_name": "ubuntu" + } + ], "instrumentations": { "resources": [ - { - "id": "nr_super_agent", - "resource_ids": ["host1"], - "provider": "newrelic", - "source_repository": "https://github.com/newrelic/open-install-library.git", - "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", - "params": { - "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/super-agent/debian.yml", - "validate_output": "New Relic Super Agent\\s+\\(installed\\)", - "recipe_targeted": "super-agent" - } - } - ] - } + { + "id": "nr_super_agent", + "resource_ids": [ + "ubuntu16-super-eu" + ], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", + "params": { + "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/super-agent/debian.yml", + "validate_output": "New Relic Super Agent\\s+\\(installed\\)", + "recipe_targeted": "super-agent" + } + } + ] + } } diff --git a/test/definitions/otel/debians/ubuntu16-otel.json b/test/definitions/otel/debians/ubuntu16-otel.json index 66454b644..ed2bcfece 100644 --- a/test/definitions/otel/debians/ubuntu16-otel.json +++ b/test/definitions/otel/debians/ubuntu16-otel.json @@ -5,30 +5,32 @@ "Department": "product", "Product": "virtuoso" }, - - "resources": [{ - "id": "host1", - "provider": "aws", - "type": "ec2", - "size": "t3.nano", - "ami_name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-????????", - "user_name": "ubuntu" - }], - + "resources": [ + { + "id": "ubuntu16-otel", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "ubuntu-pro-server/images/hvm-ssd/ubuntu-xenial-16.04-amd64-pro-server-????????", + "user_name": "ubuntu" + } + ], "instrumentations": { "resources": [ - { - "id": "nr_infra_otel", - "resource_ids": ["host1"], - "provider": "newrelic", - "source_repository": "https://github.com/newrelic/open-install-library.git", - "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", - "params": { - "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/otel/debian.yml", - "validate_output": "New Relic OpenTelemetry Collector\\s+\\(installed\\)", - "recipe_targeted": "newrelic-opentelemetry-collector" - } - } - ] - } + { + "id": "nr_otel", + "resource_ids": [ + "ubuntu16-otel" + ], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", + "params": { + "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/otel/debian.yml", + "validate_output": "New Relic OpenTelemetry Collector\\s+\\(installed\\)", + "recipe_targeted": "newrelic-opentelemetry-collector" + } + } + ] + } } diff --git a/test/definitions/smoke/rhl2-sysd-jboss.json b/test/definitions/smoke/rhl2-sysd-jboss.json index 4e3a8185d..981498c55 100644 --- a/test/definitions/smoke/rhl2-sysd-jboss.json +++ b/test/definitions/smoke/rhl2-sysd-jboss.json @@ -7,7 +7,7 @@ }, "resources": [ { - "id": "jboss", + "id": "rhel-jboss", "provider": "aws", "type": "ec2", "size": "t3.micro", @@ -22,7 +22,7 @@ "deploy_script_path": "test/deploy/linux/jboss/systemd/install/linux/roles", "port": 6001, "destinations": [ - "jboss" + "rhel-jboss" ] } ], @@ -31,7 +31,7 @@ { "id": "jbossRecipe", "resource_ids": [ - "jboss" + "rhel-jboss" ], "provider": "newrelic", "source_repository": "https://github.com/newrelic/open-install-library.git", @@ -44,7 +44,7 @@ { "id": "recipeValidation", "resource_ids": [ - "jboss" + "rhel-jboss" ], "provider": "newrelic", "source_repository": "https://github.com/newrelic/open-install-library.git", @@ -55,4 +55,4 @@ } ] } -} \ No newline at end of file +} diff --git a/test/definitions/super-agent/debians/ubuntu16-super-agent.json b/test/definitions/super-agent/debians/ubuntu16-super-agent.json index b58d215df..30f2026c3 100644 --- a/test/definitions/super-agent/debians/ubuntu16-super-agent.json +++ b/test/definitions/super-agent/debians/ubuntu16-super-agent.json @@ -5,30 +5,32 @@ "Department": "product", "Product": "virtuoso" }, - - "resources": [{ - "id": "host1", - "provider": "aws", - "type": "ec2", - "size": "t3.nano", - "ami_name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-????????", - "user_name": "ubuntu" - }], - + "resources": [ + { + "id": "ubuntu16-super", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "ubuntu-pro-server/images/hvm-ssd/ubuntu-xenial-16.04-amd64-pro-server-????????", + "user_name": "ubuntu" + } + ], "instrumentations": { "resources": [ - { - "id": "nr_super_agent", - "resource_ids": ["host1"], - "provider": "newrelic", - "source_repository": "https://github.com/newrelic/open-install-library.git", - "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", - "params": { - "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/super-agent/debian.yml", - "validate_output": "New Relic Super Agent\\s+\\(installed\\)", - "recipe_targeted": "super-agent" - } - } - ] - } + { + "id": "nr_super_agent", + "resource_ids": [ + "ubuntu16-super" + ], + "provider": "newrelic", + "source_repository": "https://github.com/newrelic/open-install-library.git", + "deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles", + "params": { + "recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/super-agent/debian.yml", + "validate_output": "New Relic Super Agent\\s+\\(installed\\)", + "recipe_targeted": "super-agent" + } + } + ] + } } diff --git a/test/manual/definitions/infra-agent/ubuntu16-infra.json b/test/manual/definitions/infra-agent/ubuntu16-infra.json index 0bbaa0d3f..bc136dff7 100644 --- a/test/manual/definitions/infra-agent/ubuntu16-infra.json +++ b/test/manual/definitions/infra-agent/ubuntu16-infra.json @@ -5,13 +5,14 @@ "Department": "product", "Product": "virtuoso" }, - - "resources": [{ - "id": "infraubuntu16", - "provider": "aws", - "type": "ec2", - "size": "t3.nano", - "ami_name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-????????", - "user_name": "ubuntu" - }] -} \ No newline at end of file + "resources": [ + { + "id": "infraubuntu16", + "provider": "aws", + "type": "ec2", + "size": "t3.nano", + "ami_name": "ubuntu-pro-server/images/hvm-ssd/ubuntu-xenial-16.04-amd64-pro-server-????????", + "user_name": "ubuntu" + } + ] +}