From 5c9d9be0e6c8c363afb215f02d92e0f5165670df Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Tue, 4 Jan 2022 14:37:43 -0800 Subject: [PATCH 1/6] Uses requirements file to install pytest and dependencies --- .github/dependabot.yml | 5 +++++ Makefile | 12 +++--------- requirements.txt | 4 ---- tests/terraform_pytest/requirements.txt | 10 ++++++++++ 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 tests/terraform_pytest/requirements.txt diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a8090242..e0847e48 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,11 @@ updates: schedule: interval: weekly open-pull-requests-limit: 10 +- package-ecosystem: pip + directory: "/tests/terraform_pytest" + schedule: + interval: weekly + open-pull-requests-limit: 10 - package-ecosystem: docker directory: "/" schedule: diff --git a/Makefile b/Makefile index 0ccf0351..8abb246d 100644 --- a/Makefile +++ b/Makefile @@ -173,15 +173,14 @@ ec/install: $(@D) --version @ echo "[$@]: Completed successfully!" +install/pip/% install/pip_pkg_with_no_cli/% pytest/install: PIP ?= $(if $(shell pyenv which $(PYTHON) 2> /dev/null),pip,$(PYTHON) -m pip) install/pip/%: PKG_VERSION_CMD ?= $* --version -install/pip/%: PIP ?= $(if $(shell pyenv which $(PYTHON) 2> /dev/null),pip,$(PYTHON) -m pip) install/pip/%: | $(BIN_DIR) guard/env/PYPI_PKG_NAME @ echo "[$@]: Installing $*..." $(PIP) install $(PYPI_PKG_NAME) $(PKG_VERSION_CMD) @ echo "[$@]: Completed successfully!" -install/pip_pkg_with_no_cli/%: PIP ?= $(if $(shell pyenv which $(PYTHON) 2> /dev/null),pip,$(PYTHON) -m pip) install/pip_pkg_with_no_cli/%: | guard/env/PYPI_PKG_NAME @ echo "[$@]: Installing $*..." $(PIP) install $(PYPI_PKG_NAME) @@ -202,13 +201,8 @@ black/install: BLACK_VERSION ?= $(call match_pattern_in_file,$(TARDIGRADE_CI_PYT black/install: @ $(MAKE) install/pip/$(@D) PYPI_PKG_NAME='$(@D)==$(BLACK_VERSION)' -tftest/install: TFTEST_VERSION ?= $(call match_pattern_in_file,$(TARDIGRADE_CI_PYTHON_TOOLS),'tftest==','$(SEMVER_PATTERN)') -tftest/install: - @ $(MAKE) install/pip_pkg_with_no_cli/$(@D) PYPI_PKG_NAME='$(@D)==$(TFTEST_VERSION)' - -pytest/install: PYTEST_VERSION ?= $(call match_pattern_in_file,$(TARDIGRADE_CI_PYTHON_TOOLS),'^pytest==','$(SEMVER_PATTERN)') pytest/install: - @ $(MAKE) install/pip/$(@D) PYPI_PKG_NAME='$(@D)==$(PYTEST_VERSION)' + @ $(PIP) install -r $(TERRAFORM_PYTEST_DIR)/requirements.txt pylint/install: PYLINT_VERSION ?= $(call match_pattern_in_file,$(TARDIGRADE_CI_PYTHON_TOOLS),'pylint==','$(SEMVER_PATTERN)') pylint/install: @@ -514,7 +508,7 @@ project/validate: @ echo "[$@]: Target test folder validation successful" install: terragrunt/install terraform/install shellcheck/install terraform-docs/install -install: bats/install black/install pylint/install pylint-pytest/install pydocstyle/install pytest/install tftest/install +install: bats/install black/install pylint/install pylint-pytest/install pydocstyle/install pytest/install install: ec/install yamllint/install cfn-lint/install yq/install bumpversion/install jq/install install: docker-compose/install rclone/install packer/install diff --git a/requirements.txt b/requirements.txt index 2c056ee6..b7e44f29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,8 +17,4 @@ pylint==2.12.2 pylint-pytest==1.1.2 -pytest==6.2.5 - -tftest==1.6.2 - yamllint==1.26.3 diff --git a/tests/terraform_pytest/requirements.txt b/tests/terraform_pytest/requirements.txt new file mode 100644 index 00000000..a7e39ebb --- /dev/null +++ b/tests/terraform_pytest/requirements.txt @@ -0,0 +1,10 @@ +# This requirements.txt file is used to let Dependabot manage pinned versions of +# tools that will be installed using the target `make pytest/install` + +# Keep this list in alphabetical order, with a single blank line between each package + +pytest==6.2.5 + +python-hcl2==3.0.1 + +tftest==1.6.2 From 57875654a1b59689da5677853ea1618e1224323f Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Tue, 4 Jan 2022 15:16:15 -0800 Subject: [PATCH 2/6] Provides a fixture that returns the base aws provider override config --- .../test_terraform_install.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tests/terraform_pytest/test_terraform_install.py b/tests/terraform_pytest/test_terraform_install.py index 20de8ec7..28fb3870 100644 --- a/tests/terraform_pytest/test_terraform_install.py +++ b/tests/terraform_pytest/test_terraform_install.py @@ -76,6 +76,58 @@ def tf_vars(is_mock, only_moto): ) +@pytest.fixture(scope="function") +def aws_provider_override(only_moto): + """Return override config for mock aws provider.""" + mockstack_port = MOTO_PORT if only_moto else MOCKSTACK_PORT + mockstack_endpoint = f"http://{MOCKSTACK_HOST}:{mockstack_port}" + moto_endpoint = f"http://{MOCKSTACK_HOST}:{MOTO_PORT}" + return { + "provider": { + "aws": [ + { + "skip_credentials_validation": True, + "skip_get_ec2_platforms": True, + "skip_metadata_api_check": True, + "skip_region_validation": True, + "skip_requesting_account_id": True, + "s3_force_path_style": True, + "endpoints": { + # Supported by localstack + "apigateway": mockstack_endpoint, + "cloudformation": mockstack_endpoint, + "cloudwatch": mockstack_endpoint, + "cloudwatchevents": mockstack_endpoint, + "cloudwatchlogs": mockstack_endpoint, + "configservice": mockstack_endpoint, + "dynamodb": mockstack_endpoint, + "ec2": mockstack_endpoint, + "iam": mockstack_endpoint, + "kinesis": mockstack_endpoint, + "kms": mockstack_endpoint, + "lambda": mockstack_endpoint, + "redshift": mockstack_endpoint, + "s3": mockstack_endpoint, + "secretsmanager": mockstack_endpoint, + "ses": mockstack_endpoint, + "sns": mockstack_endpoint, + "sqs": mockstack_endpoint, + "ssm": mockstack_endpoint, + "stepfunctions": mockstack_endpoint, + "sts": mockstack_endpoint, + # Supported by moto only + "cloudtrail": moto_endpoint, + "ds": moto_endpoint, + "firehose": moto_endpoint, + "route53": moto_endpoint, + "route53resolver": moto_endpoint, + }, + } + ] + } + } + + def test_modules(subdir, monkeypatch, tf_test_object, tf_vars): """Run plan/apply against a Terraform module found in tests subdir.""" monkeypatch.setenv("AWS_DEFAULT_REGION", AWS_DEFAULT_REGION) From d5118c8e32e8b5a876e3c8cfea3ff4d195b9c6cb Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Wed, 5 Jan 2022 13:31:54 -0800 Subject: [PATCH 3/6] Uses override file for mock provider config with tftest Previously, we were directly managing the provider blocks in the terraform tests, in order to inject the endpoints and required aliases. This had the unfortunate effect of requiring that we *not* specify the provider block in test config. Which also meant we would need to support directly all provider arguments we wanted to use in the test config. This patch removes all of that. Instead, it relies on the terraform overrides feature, to inject a provider config into the test. The provider config in the override file is merged with any existing provider config. This allows the test config to maintain its own provider block for the "nomock" use case, and take advantage of any argument supported by the provider. For the "mockstack" use case, tftest will write an override file to the test directory. The override file contains a provider config with the arguments and endpoints needed for the "mockstack" use case. --- INTEGRATION_TESTING.md | 2 - Makefile | 3 +- tests/terraform_pytest/aws.tf | 3 - tests/terraform_pytest/conftest.py | 11 -- tests/terraform_pytest/mockstack.tf | 37 ------ tests/terraform_pytest/mockstack_variables.tf | 20 --- .../test_terraform_install.py | 115 ++++++++++-------- 7 files changed, 63 insertions(+), 128 deletions(-) delete mode 100644 tests/terraform_pytest/aws.tf delete mode 100644 tests/terraform_pytest/mockstack.tf delete mode 100644 tests/terraform_pytest/mockstack_variables.tf diff --git a/INTEGRATION_TESTING.md b/INTEGRATION_TESTING.md index 66c5daa0..5fbdd1f3 100644 --- a/INTEGRATION_TESTING.md +++ b/INTEGRATION_TESTING.md @@ -33,7 +33,6 @@ be located in the directory `tests` off the repo\'s root directory. | -------------------------------- | --------------------------------------- | | INTEGRATION_TEST_BASE_IMAGE_NAME | $(basename $PWD)-integration-test | | ONLY_MOTO | False; adds "--only-moto" to PYTEST_ARGS | -| PROVIDER_ALIAS | No default; adds "--alias \" to PYTEST_ARGS | | PYTEST_ARGS | | | TERRAFORM_PYTEST_DIR | $PWD/tests/terraform/pytest | @@ -45,7 +44,6 @@ PYTEST_ARGS. | Command line option | Description | | ------------------- | ----------------------------------------------- | | --nomock | Use AWS, not mocked AWS services. Takes precedence over the "--only-moto" option. | -| --alias ALIAS | Add a provider ALIAS to the Terraform test | | --alternate-profile | Configure an alternate profile in addition to default profile | | --only-moto | Use moto ports only for mock AWS services | | --tf-dir=TF_DIR | Directory of Terraform files under test; default: './tests' | diff --git a/Makefile b/Makefile index 8abb246d..91379863 100644 --- a/Makefile +++ b/Makefile @@ -303,12 +303,11 @@ python/format: # Run pytests, typically for unit tests. PYTEST_ARGS ?= -PYTEST_ALIAS_ARG ?= $(if $(PROVIDER_ALIAS),--alias $(PROVIDER_ALIAS),) PYTEST_ONLY_MOTO_ARG ?= $(if $(ONLY_MOTO),--only-moto,) pytest/%: | guard/program/pytest pytest/%: @ echo "[$@] Starting Python tests found under the directory \"$*\"" - pytest $* $(PYTEST_ARGS) $(PYTEST_ALIAS_ARG) $(PYTEST_ONLY_MOTO_ARG) + pytest $* $(PYTEST_ARGS) $(PYTEST_ONLY_MOTO_ARG) @ echo "[$@]: Tests executed!" ## Lints terraform files diff --git a/tests/terraform_pytest/aws.tf b/tests/terraform_pytest/aws.tf deleted file mode 100644 index c1259402..00000000 --- a/tests/terraform_pytest/aws.tf +++ /dev/null @@ -1,3 +0,0 @@ -provider "aws" { - region = "us-east-1" -} diff --git a/tests/terraform_pytest/conftest.py b/tests/terraform_pytest/conftest.py index 494159fd..54e9b409 100644 --- a/tests/terraform_pytest/conftest.py +++ b/tests/terraform_pytest/conftest.py @@ -24,11 +24,6 @@ def pytest_addoption(parser): default=str(Path(Path.cwd() / "tests")), help="Directory of Terraform files under test; default: './tests'", ) - parser.addoption( - "--alias", - action="store", - help="Name of Terraform provider alias to include in test", - ) parser.addoption( "--only-moto", action="store_true", @@ -101,12 +96,6 @@ def tf_dir(request): return Path(terraform_dir).resolve() -@pytest.fixture(scope="session") -def provider_alias(request): - """Return name of alias for provider, if one was given.""" - return request.config.getoption("--alias") - - @pytest.fixture(scope="session") def only_moto(request): """Return True if only moto ports are to be used for mock services.""" diff --git a/tests/terraform_pytest/mockstack.tf b/tests/terraform_pytest/mockstack.tf deleted file mode 100644 index 8f2cceb9..00000000 --- a/tests/terraform_pytest/mockstack.tf +++ /dev/null @@ -1,37 +0,0 @@ -provider "aws" { - region = "us-east-1" - skip_credentials_validation = true - skip_metadata_api_check = true - skip_requesting_account_id = true - s3_force_path_style = true - - endpoints { - apigateway = "http://${var.mockstack_host}:${var.mockstack_port}" - cloudformation = "http://${var.mockstack_host}:${var.mockstack_port}" - cloudwatch = "http://${var.mockstack_host}:${var.mockstack_port}" - cloudwatchevents = "http://${var.mockstack_host}:${var.mockstack_port}" - cloudwatchlogs = "http://${var.mockstack_host}:${var.mockstack_port}" - configservice = "http://${var.mockstack_host}:${var.mockstack_port}" - dynamodb = "http://${var.mockstack_host}:${var.mockstack_port}" - ec2 = "http://${var.mockstack_host}:${var.mockstack_port}" - iam = "http://${var.mockstack_host}:${var.mockstack_port}" - kinesis = "http://${var.mockstack_host}:${var.mockstack_port}" - kms = "http://${var.mockstack_host}:${var.mockstack_port}" - lambda = "http://${var.mockstack_host}:${var.mockstack_port}" - redshift = "http://${var.mockstack_host}:${var.mockstack_port}" - s3 = "http://${var.mockstack_host}:${var.mockstack_port}" - secretsmanager = "http://${var.mockstack_host}:${var.mockstack_port}" - ses = "http://${var.mockstack_host}:${var.mockstack_port}" - sns = "http://${var.mockstack_host}:${var.mockstack_port}" - sqs = "http://${var.mockstack_host}:${var.mockstack_port}" - ssm = "http://${var.mockstack_host}:${var.mockstack_port}" - stepfunctions = "http://${var.mockstack_host}:${var.mockstack_port}" - sts = "http://${var.mockstack_host}:${var.mockstack_port}" - - cloudtrail = "http://${var.mockstack_host}:${var.moto_port}" - ds = "http://${var.mockstack_host}:${var.moto_port}" - firehose = "http://${var.mockstack_host}:${var.moto_port}" - route53 = "http://${var.mockstack_host}:${var.moto_port}" - route53resolver = "http://${var.mockstack_host}:${var.moto_port}" - } -} diff --git a/tests/terraform_pytest/mockstack_variables.tf b/tests/terraform_pytest/mockstack_variables.tf deleted file mode 100644 index 8f413e47..00000000 --- a/tests/terraform_pytest/mockstack_variables.tf +++ /dev/null @@ -1,20 +0,0 @@ -variable "mockstack_host" { - description = "Hostname for mock AWS endpoint" - type = string - default = "localhost" -} - -variable "mockstack_port" { - description = "Port for mock AWS endpoint" - type = string - default = "4566" -} - -# Port 4615 was chosen to be used for moto because that port is used by -# LocalStack for the organizations service. We'll piggyback onto that -# port for other moto-specific services. -variable "moto_port" { - description = "Port for moto; for services not provided by LocalStack" - type = string - default = "4615" -} diff --git a/tests/terraform_pytest/test_terraform_install.py b/tests/terraform_pytest/test_terraform_install.py index 28fb3870..78aecaca 100644 --- a/tests/terraform_pytest/test_terraform_install.py +++ b/tests/terraform_pytest/test_terraform_install.py @@ -1,8 +1,12 @@ """Run Terraform plan/apply against each set of Terraform test files.""" +import copy +import glob +import json import os from pathlib import Path +import hcl2 import pytest import tftest @@ -11,71 +15,76 @@ MOCKSTACK_PORT = "4566" MOTO_PORT = "4615" -VARIABLES_TF_FILENAME = "mockstack_variables.tf" -MOCKSTACK_TF_FILENAME = "mockstack.tf" -AWS_TF_FILENAME = "aws.tf" +MOCKSTACK_TF_PROVIDER_OVERRIDE = "tardigrade_ci_provider_override.tf.json" @pytest.fixture(scope="function") -def tf_test_object(is_mock, provider_alias, tf_dir, tmp_path): +def tf_test_object(is_mock, tf_dir, tmp_path, aws_provider_override): """Return function that will create tf_test object using given subdir.""" - def create_provider_alias_file(alias_path): - """Create copy of Terraform file to insert alias into provider block. - - It's not possible with Terraform to use a variable for an alias. - """ - with open(str(alias_path), encoding="utf8") as fhandle: - all_lines = fhandle.readlines() - all_lines.insert(1, f' alias = "{provider_alias}"\n\n') - - path = tmp_path / f"{alias_path.stem}_alias.tf" - path.write_text("".join(all_lines)) + def parse_tf_module(tf_module): + """Parse all tf files in directory.""" + tf_objects = [] + for file in glob.glob(f"{tf_module}/*.tf"): + with open(file, "r", encoding="utf8") as handle: + tf_objects.append(hcl2.load(handle)) + return tf_objects + + def tf_aws_providers(tf_object): + """Return list of aws provider configs.""" + aws_providers = [] + for provider in tf_object.get("provider", []): + if "aws" in provider: + aws_providers.append(provider["aws"]) + return aws_providers + + def write_file(path, content): + """Write content to path.""" + path = tmp_path / MOCKSTACK_TF_PROVIDER_OVERRIDE + path.write_text(content) return str(path) def make_tf_test(tf_module): """Return a TerraformTest object for given module.""" tf_test = tftest.TerraformTest(tf_module, basedir=str(tf_dir), env=None) + extra_files = [] - # Create a list of provider files that contain endpoints for all - # the services in use. The endpoints will be represented by - # Terraform variables. - current_dir = Path(__file__).resolve().parent - copy_files = [str(Path(current_dir / VARIABLES_TF_FILENAME))] - + # Create an override file that contain endpoints for all the services in use if is_mock: - tf_provider_path = Path(current_dir / MOCKSTACK_TF_FILENAME) - else: - tf_provider_path = Path(current_dir / AWS_TF_FILENAME) - copy_files.append(str(tf_provider_path)) - - if provider_alias: - copy_files.append(create_provider_alias_file(tf_provider_path)) - - tf_test.setup(extra_files=copy_files) + current_dir = Path(__file__).resolve().parent + + # Get the terraform objects from the test module + tf_objects = parse_tf_module(tf_dir / tf_module) + + mock_provider = copy.deepcopy(aws_provider_override) + mock_aws_provider = mock_provider["provider"]["aws"][0] + + # Get the aws providers from the terraform objects + aws_providers = [] + for tf_object in tf_objects: + aws_providers.extend(tf_aws_providers(tf_object)) + + # For all aws provider blocks that contain an "alias" attribute, + # add a mock aws provider config with that alias + for provider in aws_providers: + if "alias" in provider: + mock_provider["provider"]["aws"].append( + { + **mock_aws_provider, + **{"alias": provider["alias"]}, + } + ) + + tf_provider_path = Path(current_dir / MOCKSTACK_TF_PROVIDER_OVERRIDE) + extra_files.append( + write_file(tf_provider_path, json.dumps(mock_provider, indent=4)) + ) + tf_test.setup(extra_files=extra_files) return tf_test return make_tf_test -@pytest.fixture(scope="function") -def tf_vars(is_mock, only_moto): - """Return values for variables used for the Terraform apply. - - Set the Terraform variables for the hostname and port to differentiate - between using "localhost" or the docker network name. - """ - return ( - { - "mockstack_host": MOCKSTACK_HOST, - "mockstack_port": MOTO_PORT if only_moto else MOCKSTACK_PORT, - "moto_port": MOTO_PORT, - } - if is_mock - else {} - ) - - @pytest.fixture(scope="function") def aws_provider_override(only_moto): """Return override config for mock aws provider.""" @@ -128,7 +137,7 @@ def aws_provider_override(only_moto): } -def test_modules(subdir, monkeypatch, tf_test_object, tf_vars): +def test_modules(subdir, monkeypatch, tf_test_object): """Run plan/apply against a Terraform module found in tests subdir.""" monkeypatch.setenv("AWS_DEFAULT_REGION", AWS_DEFAULT_REGION) @@ -139,11 +148,11 @@ def test_modules(subdir, monkeypatch, tf_test_object, tf_vars): # itself. if Path(subdir / "prereq").exists(): prereq_tf_test = tf_test_object(str(subdir / "prereq")) - prereq_tf_test.apply(tf_vars=tf_vars) + prereq_tf_test.apply() # Apply the plan for the module under test. tf_test = tf_test_object(str(subdir)) - tf_test.apply(tf_vars=tf_vars) + tf_test.apply() except tftest.TerraformTestError as exc: pytest.exit( msg=f"catastropic error running Terraform 'apply': {exc}", @@ -153,6 +162,6 @@ def test_modules(subdir, monkeypatch, tf_test_object, tf_vars): # Destroy the resources for the module under test, then destroy the # "prereq" resources, if a "prereq" subdirectory exists. if tf_test: - tf_test.destroy(tf_vars=tf_vars) + tf_test.destroy() if prereq_tf_test: - prereq_tf_test.destroy(tf_vars=tf_vars) + prereq_tf_test.destroy() From b80a44ea9fb614c9b478616a09f15a4b53efc766 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Thu, 6 Jan 2022 10:49:39 -0800 Subject: [PATCH 4/6] Updates terraform lock file automatically in test config --- .bumpversion.cfg | 2 +- tests/terraform_pytest/requirements.txt | 2 +- tests/terraform_pytest/test_terraform_install.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c2f94b1b..15cc7ba2 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.19.7 +current_version = 0.20.0 commit = True message = Bumps version to {new_version} tag = False diff --git a/tests/terraform_pytest/requirements.txt b/tests/terraform_pytest/requirements.txt index a7e39ebb..deec5a2a 100644 --- a/tests/terraform_pytest/requirements.txt +++ b/tests/terraform_pytest/requirements.txt @@ -7,4 +7,4 @@ pytest==6.2.5 python-hcl2==3.0.1 -tftest==1.6.2 +tftest==1.6.3 diff --git a/tests/terraform_pytest/test_terraform_install.py b/tests/terraform_pytest/test_terraform_install.py index 78aecaca..96212f08 100644 --- a/tests/terraform_pytest/test_terraform_install.py +++ b/tests/terraform_pytest/test_terraform_install.py @@ -79,7 +79,7 @@ def make_tf_test(tf_module): extra_files.append( write_file(tf_provider_path, json.dumps(mock_provider, indent=4)) ) - tf_test.setup(extra_files=extra_files) + tf_test.setup(extra_files=extra_files, upgrade=True) return tf_test return make_tf_test From 8bb9d2a179916c440d5aed41c0874b49f921af48 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Thu, 6 Jan 2022 11:45:40 -0800 Subject: [PATCH 5/6] Skips cleanup on exit, so the tfstate remains in case of errors --- tests/terraform_pytest/test_terraform_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/terraform_pytest/test_terraform_install.py b/tests/terraform_pytest/test_terraform_install.py index 96212f08..e93b5fdd 100644 --- a/tests/terraform_pytest/test_terraform_install.py +++ b/tests/terraform_pytest/test_terraform_install.py @@ -79,7 +79,7 @@ def make_tf_test(tf_module): extra_files.append( write_file(tf_provider_path, json.dumps(mock_provider, indent=4)) ) - tf_test.setup(extra_files=extra_files, upgrade=True) + tf_test.setup(extra_files=extra_files, upgrade=True, cleanup_on_exit=False) return tf_test return make_tf_test From a830953ea6142749dc9f8d23a055d218363ffb8b Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Thu, 6 Jan 2022 10:49:58 -0800 Subject: [PATCH 6/6] Bumps version to 0.21.0 --- .bumpversion.cfg | 2 +- CHANGELOG.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 15cc7ba2..02767056 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.20.0 +current_version = 0.21.0 commit = True message = Bumps version to {new_version} tag = False diff --git a/CHANGELOG.md b/CHANGELOG.md index 723142b2..ac29d21b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +### 0.20.0 + +**Released**: 2022.01.06 + +**Commit Delta**: [Change from 0.19.7 release](https://github.com/plus3it/tardigrade-ci/compare/0.19.7..0.20.0) + +**Summary**: + +* Uses override file to inject mockstack config for aws provider. Allows test configs + to manage their aws provider config entirely, including any argument supported + by the aws provider. Test configs should now always work without modification + for the "--nomock" use case, running against real aws endpoints. For more, + see [PR #372](https://github.com/plus3it/tardigrade-ci/pull/372). +* Removes pytest argument `--alias`. +* Skips tftest cleanup on exit, so the tfstate remains intact. This is useful if + there were errors when tftest ran the destroy action, as it allows us to manually + inspect the state and re-run `terraform destroy`. + +* Updates tool versions: + * tftest 1.6.3 + ### 0.19.7 **Released**: 2022.01.03