To avoid breaking changes after a minor version upgrade, we need a version upgrade test after it. Every sample code folder should have a corresponding version upgrade test under test/upgrade/
directory. All go test code files in test/upgrade
directory must be put in upgrade
package:
package upgrade
import ...
The logics of version upgrade tests are implemented in E2E test helper: github.com/Azure/terraform-module-test-helper.
Firstly it will get the latest version number through Github API, then a copy of the latest module code will be checked out under /tmp/
. After that Terratest will be executed in every sub directory under examples
, change the source
of module
which has a path like ../..
or ../../
, pointing it to the directory in the main branch after merging the current PR. Then re-execute terraform init
and terraform plan
to see of there are changes. If the changes exist, that means the upgrade contains an "accident" breaking change.
Ideally, users won't see any changes in minor version upgrade if they don't modify input variable
s.