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

openshiftApply step unit test #18

Open
dtschan opened this issue Oct 22, 2020 · 1 comment · Fixed by #42
Open

openshiftApply step unit test #18

dtschan opened this issue Oct 22, 2020 · 1 comment · Fixed by #42
Assignees

Comments

@dtschan
Copy link
Member

dtschan commented Oct 22, 2020

Implement unit test for openshiftApply step which tests:

  • Works whether oc is in PATH or not
    • Installs oc if not in PATH
  • Executes oc convert -f ${tmpfile} to validate configuration argument
    • Where tmpfile contains the configuration argument of the step
    • Fails when configuration is invalid, e.g.
apiVersion: extensions/v1beta1
kind: Deployment
spec:
  template:
    spec:
      containers:
      - name: mycontainer        
        resources:
          limits:
            cpu: 1   # Wrong type, must be a string
...

or:

apiVersion: v1  # Unknown type, API group is missing
kind: DeploymentConfig
...
  • Executes oc apply -f ${tmpfile} -l "app=${appLabel}" --prune
    • Where tmpfile contains the value of configuration
  • if waitForRollout is true:
    • if rolloutSelector is not provided:
      • Executes oc rollout status ${rolloutKind}/${appLabel}
    • else
      • Executes oc rollout status ${rolloutKind}/${object} for every rolloutKind object matched by rolloutSelector
@chrira
Copy link
Member

chrira commented Nov 17, 2021

OC Install check und Rollout abgdeckt durch #42

Andere Testfälle ev. durch einen System Test abdecken

@chrira chrira reopened this Nov 17, 2021
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

Successfully merging a pull request may close this issue.

3 participants