-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conformance: support OCI_REPORT_DIR (#473)
This makes it possible to run the conformance tests in a read-only directory without failing by specifying an output directory for the report files instead of hard-coding it to the current directory (which may not be writable, and _won't_ be writable if the tests are being run with `go test github.com/opencontainers/distribution-spec/conformance` rather than in a git checkout of the conformance module. We recognize the value `none` for disabling report generation entirely. Signed-off-by: Roger Peppe <[email protected]>
- Loading branch information
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,10 +39,20 @@ Lastly, run the tests: | |
./conformance.test | ||
``` | ||
|
||
This will produce `junit.xml` and `report.html` with the results. | ||
|
||
Note: for some registries, you may need to create `OCI_NAMESPACE` ahead of time. | ||
|
||
This will produce `junit.xml` and `report.html` in the current directory with the results. To choose an alternative directory: | ||
|
||
``` | ||
export OCI_REPORT_DIR=/alternative/directory | ||
``` | ||
|
||
To disable writing of the result files: | ||
|
||
``` | ||
export OCI_REPORT_DIR=none | ||
``` | ||
|
||
#### Testing registry workflows | ||
|
||
The tests are broken down into 4 major categories: | ||
|
@@ -230,7 +240,7 @@ jobs: | |
- name: Run OCI Distribution Spec conformance tests | ||
uses: opencontainers/distribution-spec@main | ||
# you can also run against a specific tag or commit instead | ||
# uses: opencontainers/[email protected] | ||
# uses: opencontainers/[email protected] | ||
env: | ||
OCI_ROOT_URL: https://myreg.io | ||
OCI_NAMESPACE: mytestorg/mytestrepo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters