-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move integration tests to
./tests
(#1490)
This consolidates integration tests (currently located in `./examples` and `./provider`) under `./tests`. This is prep work for #1474, and the net result is a clearer distinction between "fast" and "slow" tests meant to be run during the "prerequisites" and "tests" steps in CI. Everything under `./provider` can be considered "fast" and everything under `./tests` can be considered "slow" and worthy of sharding. Specifically: * Everything under `./examples/tests` is moved to `./tests/testdata/programs` as these were assumed to not be user-facing. * Upgrade tests under `./provider` are also moved to `./tests` but tagged in a way that they continue to run as their own job. (These are the new `upgrade_test.go` and `validation_test.go` files.) * `examples/utils/utils.go` moves to `tests/internal/utils`. * `TestEksAuthModeUpgrade` wasn't re-enabled as part of #1387, so I re-enabled and re-recorded it. * `go.mod` is consolidated at the repo root to keep dependencies consistent across the provider and tests. (There are a ton of additional DX advantages to structuring things this way.) This project is not meant to be consumed as a library so this is an acceptable breaking change.
- Loading branch information
Showing
251 changed files
with
2,747 additions
and
3,786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,12 +263,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=nodejs | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 10 | ||
|
@@ -368,12 +368,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=python | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -470,7 +470,7 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
test-go: | ||
name: Run Go Tests | ||
needs: | ||
|
@@ -559,7 +559,7 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
name: cron | ||
"on": | ||
schedule: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -279,12 +279,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=nodejs | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 10 | ||
|
@@ -384,12 +384,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=python | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
|
@@ -487,7 +487,7 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
test-go: | ||
name: Run Go Tests | ||
needs: | ||
|
@@ -576,7 +576,7 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
name: master | ||
"on": | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,12 +271,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=nodejs | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 10 | ||
|
@@ -376,12 +376,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=python | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
|
@@ -479,7 +479,7 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
test-go: | ||
name: Run Go Tests | ||
needs: | ||
|
@@ -568,7 +568,7 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
name: release | ||
"on": | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -401,12 +401,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=nodejs | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=nodejs -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 10 | ||
|
@@ -507,12 +507,12 @@ jobs: | |
id: test_split | ||
uses: hashicorp-forge/[email protected] | ||
with: | ||
working-directory: examples | ||
working-directory: tests | ||
flags: -tags=python | ||
total: ${{ matrix.total }} | ||
index: ${{ matrix.index }} | ||
- name: Run tests | ||
run: cd examples && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=python -v -json -count=1 -cover -timeout 3h -parallel 6 . --run="${{ steps.test_split.outputs.run}}" 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
|
@@ -611,7 +611,7 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=dotnet -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
test-go: | ||
name: Run Go Tests | ||
needs: | ||
|
@@ -701,4 +701,4 @@ jobs: | |
cd ${{ github.workspace }}/bin | ||
yarn install && yarn link @pulumi/eks | ||
- name: Run tests | ||
run: cd examples && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
run: cd tests && go test -tags=go -v -json -count=1 -cover -timeout 3h -parallel 6 . 2>&1 | tee /tmp/gotest.log | gotestfmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.