Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add asset generation tests #61

Open
aufi opened this issue Feb 26, 2025 · 1 comment
Open

Add asset generation tests #61

aufi opened this issue Feb 26, 2025 · 1 comment

Comments

@aufi
Copy link
Contributor

aufi commented Feb 26, 2025

There is a new asset-generation feature being added to kantra in konveyor/kantra#435

E2E test scenarios should be defined, approved, written as part of this repository.

Selected subset of those tests should be marked as TIER0 and added to upstream CI execution.

@jordigilh
Copy link

Test 1:

(1) Run command: kantra discover cloud-foundry --input ./cf-nodejs-app.yaml --output discover.yaml
(2) Validate that the generated file contains the following content:

name: cf-nodejs
randomRoute: true
timeout: 60
buildPacks:
- docker://my-registry-a.corp/nodejs
- docker://my-registry-b.corp/dynatrace
instances: 1

(3) Copy the helm found in https://github.com/gciavarrini/demo-kantra-asset-gen/tree/main/helm_sample to ./helm_sample
(4) Run command kantra generate helm --chart-dir ./helm_sample --input discover.yaml --output-dir ./manifests
(5) Validate the generated file in ./manifests matches the expected value:

apiVersion: v1
kind: ConfigMap
metadata:
  name: cf-nodejs-config
data:
  SPACE:
  VERSION:
  RANDOM_ROUTE: true
  TIMEOUT: "60"
  BUILD_PACKS: |
    - docker://my-registry-a.corp/nodejs
    - docker://my-registry-b.corp/dynatrace
  INSTANCES: "1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants