Skip to content

Commit cfd5afe

Browse files
Revert "having single test group running multiple packages for each cluster test"
This reverts commit ecddf7b.
1 parent d43392a commit cfd5afe

File tree

5 files changed

+38
-7
lines changed

5 files changed

+38
-7
lines changed

.github/workflows/e2e-testing.yaml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,43 @@ jobs:
6161
MONGODB_ATLAS_ORG_ID: ${{ secrets.CLOUD_DEV_ORG_ID }}
6262
MONGODB_ATLAS_BASE_URL: https://cloud-dev.mongodb.com/
6363
MONGODB_ATLAS_SECRET_PROFILE: cfn-cloud-dev-github-action
64-
# Have each test defined in separate packages to allow for parallel execution. Due to usage of t.Setenv() in test code, t.Parallel() is not possible
64+
# run idividual test allowing for parallel execution. Due to usage of t.Setenv() in test code, t.Parallel() is not possible
6565
run: |
66-
cd cfn-resources/test/e2e
67-
go test ./cluster-pause ./cluster-basic -timeout 90m -v
66+
cd cfn-resources/test/e2e/cluster
67+
go test -timeout 90m -v -run '^TestClusterCFN$' .
68+
69+
cluster-pause:
70+
needs: change-detection
71+
if: ${{ needs.change-detection.outputs.cluster == 'true' }}
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
75+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
76+
with:
77+
python-version: '3.9'
78+
cache: 'pip'
79+
- run: pip install cloudformation-cli-go-plugin
80+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
81+
with:
82+
go-version-file: 'cfn-resources/go.mod'
83+
- uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8
84+
with:
85+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_TEST_ENV }}
86+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_TEST_ENV }}
87+
aws-region: eu-west-1
88+
- name: Run E2E test
89+
shell: bash
90+
env:
91+
MONGODB_ATLAS_PUBLIC_KEY: ${{ secrets.CLOUD_DEV_PUBLIC_KEY }}
92+
MONGODB_ATLAS_PRIVATE_KEY: ${{ secrets.CLOUD_DEV_PRIVATE_KEY }}
93+
MONGODB_ATLAS_ORG_ID: ${{ secrets.CLOUD_DEV_ORG_ID }}
94+
MONGODB_ATLAS_BASE_URL: https://cloud-dev.mongodb.com/
95+
MONGODB_ATLAS_SECRET_PROFILE: cfn-cloud-dev-github-action
96+
# run idividual test allowing for parallel execution. Due to usage of t.Setenv() in test code, t.Parallel() is not possible
97+
run: |
98+
cd cfn-resources/test/e2e/cluster
99+
go test -timeout 90m -v -run '^TestClusterPauseCFN$' .
100+
68101

69102
flex-cluster:
70103
needs: change-detection

cfn-resources/test/e2e/cluster-pause/cluster_pause_test.go renamed to cfn-resources/test/e2e/cluster/cluster_pause_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
package cluster_pause_test
14+
package cluster_test
1515

1616
import (
1717
ctx "context"
@@ -41,8 +41,6 @@ type pauseTestCluster struct {
4141
}
4242

4343
const (
44-
resourceTypeName = "MongoDB::Atlas::Cluster"
45-
resourceDirectory = "cluster"
4644
pauseCfnTemplatePath = "cluster_pause.json.template"
4745
)
4846

cfn-resources/test/e2e/cluster-basic/cluster_test.go renamed to cfn-resources/test/e2e/cluster/cluster_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
package cluster_basic_test
14+
package cluster_test
1515

1616
import (
1717
ctx "context"

0 commit comments

Comments
 (0)