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

[Backport release-1.1] Fix namespaced resources testing #25

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Sep 2, 2024

Description

Backport of #24 to release-1.1.

* Before this change any namespaced resource testing lead to generation
  of malformed apply test case that led to uptest failure

```
2024/08/31 02:05:36 Error: spec.steps[1].try[1].script.content: Invalid value: v1alpha1.Script{Timeout:(*v1.Duration)(nil), Bindings:[]v1alpha1.Binding(nil), Outputs:[]v1alpha1.Output(nil), Env:[]v1alpha1.Binding(nil), Cluster:"", Content:"", SkipLogOutput:false, Check:(*v1alpha1.Any)(nil)}: content must be specified
```

* Reason of the failure is empty `content: |` in case of namespace
  resources in generated `00-apply.yaml`
```
    - script:
        content: |
  - name: Assert Status Conditions
```

* This change fixes the generation loop to enable `script` only when we
  have at least 1 cluster-scoped resource

Signed-off-by: Yury Tsarev <yury@upbound.io>
(cherry picked from commit 5049702)
Signed-off-by: Yury Tsarev <yury@upbound.io>
(cherry picked from commit 312bb2a)
Signed-off-by: Yury Tsarev <yury@upbound.io>
(cherry picked from commit 484d14e)
Copy link
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of this was done in #24. LGTM!

@sergenyalcin sergenyalcin merged commit 4fe9322 into release-1.1 Sep 2, 2024
1 check passed
@sergenyalcin sergenyalcin deleted the backport-24-to-release-1.1 branch September 2, 2024 10:09
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 this pull request may close these issues.

2 participants