generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add E2E Test Suite for module create (#47)
* add workflow and tests * fmt * test * test * test * revert renaming fail * renaming * add unit tests for scaffold options Validate function * fix yaml unmarshal of module template * add new ginkgo format create e2e tests * lint * fix linter but keep todo to fail * fix unit tests * use build tags for e2e tests * test new e2e structure against kyma bin * stash * migrate all e2e tests * clean-up * clean-up * adapt some review issues * Add registryUrl != "" check * adapt testcases to new modulectl api * clean-up * Revert "Add registryUrl != "" check" This reverts commit f26ab1e. * Fix E2E tests * Add test case for missing security (still not passing) * add more testdata * use new testdata * clean-up * add testcases for different valid module-configs * bump mandatory version * move consts * fix tests * fix tests * fix tests * fix merge diff * new line * fix e2e expected err * adapt coverage * retrigger jobs --------- Co-authored-by: Badr, Nesma <[email protected]>
- Loading branch information
Showing
34 changed files
with
1,043 additions
and
411 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 |
---|---|---|
@@ -1,21 +1,20 @@ | ||
name: Build modulectl | ||
name: Build | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- 'release-**' | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
name: Build modulectl | ||
build-modulectl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout modulectl | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
- name: Go setup | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache-dependency-path: 'go.sum' | ||
- name: Run CLI Build | ||
- name: "Run 'make build'" | ||
run: make build |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: E2E test - create command | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'release-**' | ||
pull_request: | ||
branches: | ||
- main | ||
- 'release-**' | ||
jobs: | ||
test-create-cmd: | ||
runs-on: ubuntu-latest | ||
env: | ||
K3D_VERSION: v5.4.7 | ||
MODULE_TEMPLATE_VERSION: 1.0.0 | ||
OCI_REPOSITORY_URL: http://k3d-oci.localhost:5001 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Go setup | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache-dependency-path: 'go.sum' | ||
- name: Build | ||
run: | | ||
make build-linux | ||
chmod +x ./bin/modulectl-linux | ||
ls -la ./bin | ||
mv ./bin/modulectl-linux /usr/local/bin/modulectl | ||
timeout-minutes: 5 | ||
- name: Install k3d and create registry | ||
run: | | ||
wget -qO - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=$K3D_VERSION bash | ||
k3d registry create oci.localhost --port 5001 | ||
- name: Run tests | ||
run: | | ||
make -C tests/e2e test-create-cmd | ||
timeout-minutes: 3 |
17 changes: 8 additions & 9 deletions
17
...ub/workflows/e2e-test-create-scaffold.yml → .github/workflows/test-e2e-scaffold.yml
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 |
---|---|---|
@@ -1,29 +1,28 @@ | ||
name: E2E Test - Create Scaffold | ||
name: E2E test - scaffold command | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- 'release-**' | ||
jobs: | ||
e2e-test: | ||
name: E2E Test - Create Scaffold | ||
test-scaffold-cmd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout modulectl | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
- name: Go setup | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache-dependency-path: 'go.sum' | ||
- name: Build modulectl | ||
- name: Build | ||
run: | | ||
make build-linux | ||
chmod +x ./bin/modulectl-linux | ||
ls -la ./bin | ||
mv ./bin/modulectl-linux /usr/local/bin/modulectl | ||
timeout-minutes: 10 | ||
- name: Run E2E Test - Create Scaffold | ||
timeout-minutes: 5 | ||
- name: Run tests | ||
run: | | ||
make -C tests/e2e test-create-scaffold | ||
make -C tests/e2e test-scaffold-cmd | ||
timeout-minutes: 3 |
File renamed without changes.
File renamed without changes.
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
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
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
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
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
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.