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

Reuse Assertions across different tests #57

Open
tony-clarke-amdocs opened this issue Sep 4, 2018 · 4 comments
Open

Reuse Assertions across different tests #57

tony-clarke-amdocs opened this issue Sep 4, 2018 · 4 comments
Labels

Comments

@tony-clarke-amdocs
Copy link
Contributor

It would be nice if we could re use the same assertions that are common across different test cases (it). Assume there are 10 assertions a1 to a10 for it1. For it2 there is the same assertions a1 to a10 plus a11. Today, we need to repeat a1 to a10 twice.

@lrills lrills added the feature label Mar 14, 2019
@lrills
Copy link
Collaborator

lrills commented Mar 14, 2019

Sounds good if we can have something like

assertionTemplate:
  - name: myAsserts
    template: |
      equal:
        path: some.path.{{ .prop }}
        value: {{ .val }}
     ...

and use it like

...
  asserts:
    withTemplate:
      name: myAsserts
      args:
        prop: ...
        val: ...

so the logic can be easily reuse.

@lrills
Copy link
Collaborator

lrills commented Mar 14, 2019

Oh and you can alway use yaml reference within the same file:

- it: test1
  asserts: &myAssert
    - some assertions...
    - ...
- it: test2
  asserts: *myAssert

jglick pushed a commit to jglick/helm-unittest that referenced this issue Jun 21, 2021
…eleaseAndCapabilities

Update docker deployment and versioning order
@lrills
Copy link
Collaborator

lrills commented Jun 22, 2021

Close due to archiving repository.

Sorry for not presenting so long. I've been working on another project and don't have time to for helm-unittest.
Please consider other working forks like quintush/helm-unittest.

@lrills lrills closed this as completed Jun 22, 2021
@laureanray
Copy link

Can we re-open this @quintush, I haven't seen this feature implemented yet, and it seems that you're actively maintaining and is a collaborator for this repo.

@quintush quintush reopened this Aug 21, 2023
mbaldessari pushed a commit to mbaldessari/gitea-helm-chart that referenced this issue Feb 10, 2024
…(#554)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [helm-unittest/helm-unittest](https://github.com/helm-unittest/helm-unittest) | patch | `0.3.4` -> `v0.3.6` |

---

### Release Notes

<details>
<summary>helm-unittest/helm-unittest (helm-unittest/helm-unittest)</summary>

### [`v0.3.6`](https://github.com/helm-unittest/helm-unittest/releases/tag/v0.3.6)

[Compare Source](helm-unittest/helm-unittest@v0.3.5...v0.3.6)

**Added Features**

-   Added templated Test Suites, to make re-usable tests possible (credits [@&#8203;hanseltime](https://github.com/hanseltime), resolves [#&#8203;57](helm-unittest/helm-unittest#57), resolves [#&#8203;186](helm-unittest/helm-unittest#186))

**Improvements**

-   Optimize installation (resolves [#&#8203;176](helm-unittest/helm-unittest#176), resolves [#&#8203;214](helm-unittest/helm-unittest#214), resolves [#&#8203;225](helm-unittest/helm-unittest#225))

**Fixes**

-   Fix incorrect filtering template files (resolves [#&#8203;219](helm-unittest/helm-unittest#219))
-   Fix snapshot validator with Empty documents (credits [@&#8203;matthyx](https://github.com/matthyx))
-   Fix inconsistent results lengthEqual validator (credits [@&#8203;hanseltime](https://github.com/hanseltime))
-   Fix global values (credit [@&#8203;zidoshare](https://github.com/zidoshare), resolves [#&#8203;215](helm-unittest/helm-unittest#215))

**Updates**

-   Update packages to latest patch versions
-   Update documenation

### [`v0.3.5`](https://github.com/helm-unittest/helm-unittest/releases/tag/v0.3.5)

[Compare Source](helm-unittest/helm-unittest@v0.3.4...v0.3.5)

**Fixes**

-   Fix recursive subchart testing (credits [@&#8203;zidoshare](https://github.com/zidoshare), resolves [#&#8203;206](helm-unittest/helm-unittest#206))
-   Fix old containsDocument behaviour to ignore other documents in multidocument validation (resolves [#&#8203;205](helm-unittest/helm-unittest#205))
-   Fix failed_template to also work when empty documents are found (resolves [#&#8203;191](helm-unittest/helm-unittest#191))
-   Fix failed_template multi colon handling (resolves [#&#8203;200](helm-unittest/helm-unittest#200))
-   Fix glob all valid filenames (resolves [#&#8203;201](helm-unittest/helm-unittest#201))

**Updates**

-   Update packages to latest patch versions
-   Update documenation (thanks to [@&#8203;yariksheptykin](https://github.com/yariksheptykin))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NC4wIiwidXBkYXRlZEluVmVyIjoiMzcuNDQuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/554
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants