Skip to content

Commit

Permalink
Merge pull request quintush#72 from quintush/feature/RestructureTests
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
quintush authored Oct 12, 2020
2 parents 3973c45 + d059129 commit b2757f2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
0.2.5 /
==================
- Restructure solution to align more on go structure.

0.2.4 / 2020-09-11
==================
- Fix resetting chart dependencies with conditions when running multiple tests in a testsuite (resolves #60 )
- Fix automatic publishing docker image after distribution (resolves #33 )

0.2.3 / 2020-08-31
==================
- Auto upload latest plugin version with a combination of helm clients (resolves #33 )
- Add support for setting Release on test suite level
- Add support for setting Capabilities, also on test suite level (resolves #36 ).
- Fix missing file assertion (resolves #39 , resolves #53 ).

0.2.2 / 2020-08-21
==================
- Add overriding capabilities within the testsuite (resolves #36).
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ defined in test suite files.

## Example

Check [`__fixtures__/v2/basic/`](./__fixtures__/v2/basic) for some basic use cases of a simple chart (version < 2).
Check [`__fixtures__/v3/basic/`](./__fixtures__/v3/basic) for some basic use cases of a simple chart (version > 3).
Check [`test/data/v2/basic/`](./test/data/v2/basic) for some basic use cases of a simple chart (version < 2).
Check [`test/data/v3/basic/`](./test/data/v3/basic) for some basic use cases of a simple chart (version > 3).

## Snapshot Testing

Expand All @@ -149,7 +149,7 @@ The `matchSnapshot` assertion validate the content rendered the same as cached l
```
$ helm unittest -u my-chart
```
The cache files is stored as `__snapshot__/v2/*_test.yaml.snap` at the directory your test file placed, you should add them in version control with your chart.
The cache files is stored as `__snapshot__/*_test.yaml.snap` at the directory your test file placed, you should add them in version control with your chart.
## Dependend subchart Testing (Requirements.yaml)
Expand All @@ -170,7 +170,7 @@ tests:
Note 1: if dependend subcharts uses an alias, use the alias name in the templates.
Note 2: using the folder structure in templates can also be used to unittest templates which are placed in subfolders or unittest subcharts from the rootchart.

Check [`__fixtures__/v2/with-subchart/`](./__fixtures__/v2/with-subchart) or [`__fixtures__/v3/with-subchart/`](./__fixtures__/v3/with-subchart) as an example.
Check [`test/data/v2/with-subchart/`](./test/data/v2/with-subchart) or [`test/data/v3/with-subchart/`](./test/data/v3/with-subchart) as an example.

## Tests within subchart

Expand All @@ -188,7 +188,7 @@ tests:
asserts:
- ...
```
Check [`__fixtures__/v2/with-subchart/`](./__fixtures__/v2/with-subchart) or [`__fixtures__/v3/with-subchart/`](./__fixtures__/v3/with-subchart) as an example.
Check [`test/data/v2/with-subchart/`](./test/data/v2/with-subchart) or [`test/data/v3/with-subchart/`](./test/data/v3/with-subchart) as an example.

## Related Projects / Commands

Expand Down Expand Up @@ -225,7 +225,7 @@ And please make CI passed when request a PR which would check following things:
In some cases you might need to manually fix the tests in `*_test.go`. If the snapshot tests (of the plugin's test code) failed you need to run:

```
UPDATE_SNAPSHOTS=true go test ./unittest/...
UPDATE_SNAPSHOTS=true go test ./...
```

This update the snapshot cache file and please add them before you commit.
2 changes: 0 additions & 2 deletions pkg/unittest/test_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ set:
template: ingress.yaml
asserts:
- failedTemplate:
errorType: required
errorMessage: The externalPort is required
`
var tj TestJob
Expand Down Expand Up @@ -398,7 +397,6 @@ set:
template: ingress.yaml
asserts:
- failedTemplate:
errorType: required
errorMessage: The externalPort is required
`
var tj TestJob
Expand Down

0 comments on commit b2757f2

Please sign in to comment.