0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00
zot - A scale-out production-ready vendor-neutral OCI-native container image/artifact registry (purely based on OCI Distribution Specification)
Find a file
Andrei Aaron af222de108
test: refactor CVE tests in CLI package (#1170)
Changes in this commit:

A.
There were nested conveys following the pattern:
- outer convey was a positive test
- inner conveys were negative tests
The positive and negative tests did not depend on one another, but the positive test was repeated for each negative test.

So for example if there was 1 positive test and 2 negative tests what go would do is:
1. execute the outer convey with the positive test
2. execute the 1st inner convey with the 1st negative test
3. execute the outer convey with the positive test
4. execute the 2nd inner convey with the 2nd negative test

Since there were no dependencies between these tests they can be moved on the same level.

B.
The test function bringing up the controller for `TestServerCVEResponseGQL` was the same for `TestServerCVEResponse`, so I removed `TestServerCVEResponseGQL` and moved the Conveys under `TestServerCVEResponse`. This will save time on the initial TrivyDB download, since it's done only once when the controller starts.

C. The `Convey("without flags", func() {` was actually the same as the test under which it was nested: `Convey("Test CVE invalid url port", t, func() {` no code differences so I removed it.

D. Use the new test functions to start/stop and wait for the zot contoller to be reachable

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-02-06 13:16:28 -08:00
.github ci(cache): split go build cache from go modules cache (#1169) 2023-02-04 09:57:07 +02:00
build fix(ci): set correct arch/os for published container images (#991) 2022-11-12 11:08:45 +02:00
cmd perf(zb): cleanup tool output (#1033) 2022-11-29 14:04:36 -08:00
demos oras fix: 2022-08-30 21:39:16 +03:00
docs swagger: rename 'docs/' to 'swagger/' 2021-10-21 13:46:14 -07:00
errors chore(trivy): update trivy version and enforce OCI compliant repo names in local image storage (#1068) 2023-01-18 08:24:44 -08:00
examples fix: removed references to old dist-spec (#1128) 2023-01-31 09:35:33 -08:00
pkg test: refactor CVE tests in CLI package (#1170) 2023-02-06 13:16:28 -08:00
swagger fix: removed references to old dist-spec (#1128) 2023-01-31 09:35:33 -08:00
test fix: removed references to old dist-spec (#1128) 2023-01-31 09:35:33 -08:00
.gitignore fix: add stacker to .gitignore (#1091) 2023-01-10 20:56:54 -08:00
CODE_OF_CONDUCT.md doc: add a CODE_OF_CONDUCT.md 2020-12-15 11:20:45 -08:00
codecov.yml test(swagger): remove autogenerated swagger code from code coverage (#993) 2022-11-13 16:43:28 +02:00
CODEOWNERS add a CODEOWNERS file 2022-05-04 11:52:28 -07:00
COMPARISON.md move references to zotregistry.io and project-zot 2021-12-05 10:52:27 -08:00
CONTRIBUTING.md build(tags): remove redundant build tag ui_base (#857) 2022-10-10 15:05:55 +03:00
go.mod chore(deps): fix dependabot alerts (#1153) 2023-02-01 00:21:14 -08:00
go.sum chore(deps): fix dependabot alerts (#1153) 2023-02-01 00:21:14 -08:00
golangcilint.yaml chore(deps): fix dependabot alerts (#1143) 2023-01-26 22:39:18 -08:00
LICENSE docs: fix copyright related info for cncf onboarding (#1117) 2023-01-17 15:43:45 -08:00
MAINTAINERS.md docs: fix CNCF related documentation (#1099) 2023-01-10 15:52:11 -08:00
Makefile ci: also allow manual workflow triggers (#1109) 2023-01-13 00:49:42 -08:00
NOTICE docs: fix copyright related info for cncf onboarding (#1117) 2023-01-17 15:43:45 -08:00
README.md docs: update README.md (#1078) 2022-12-21 10:46:31 +02:00
README_fuzz.md Add fuzz tests for storage_fs (#601) 2022-07-27 20:37:55 +03:00
SECURITY.md add a security policy document 2022-07-12 14:25:57 -07:00
THIRD-PARTY-LICENSES.md update 3rd party licenses 2022-04-08 09:48:13 -07:00
tools.go chore(trivy): update trivy version and enforce OCI compliant repo names in local image storage (#1068) 2023-01-18 08:24:44 -08:00
zot.go zot: initial commit 2019-06-21 15:29:19 -07:00

zot build-test codecov.io Conformance Results CodeQL CII Best Practices Go Reference

zot: a production-ready vendor-neutral OCI image registry - images stored in OCI image format, distribution specification on-the-wire, that's it!

Docs

Documentation for zot is located at: https://zotregistry.io

Code of Conduct

Details are in the code of conduct