forked from dogtagpki/pki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic pki and pki-server CLI tests
- Loading branch information
Showing
3 changed files
with
92 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Basic PKI CLI | ||
# https://github.com/dogtagpki/pki/wiki/PKI-CLI | ||
|
||
on: workflow_call | ||
|
||
env: | ||
DS_IMAGE: ${{ vars.DS_IMAGE || 'quay.io/389ds/dirsrv' }} | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
env: | ||
SHARED: /tmp/workdir/pki | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Retrieve PKI images | ||
uses: actions/cache@v4 | ||
with: | ||
key: pki-images-${{ github.sha }} | ||
path: pki-images.tar | ||
|
||
- name: Load PKI images | ||
run: docker load --input pki-images.tar | ||
|
||
- name: Set up runner container | ||
run: | | ||
tests/bin/runner-init.sh \ | ||
--hostname=pki.example.com \ | ||
pki | ||
- name: Check pki CLI help message | ||
run: | | ||
docker exec pki pki | ||
docker exec pki pki --help | ||
- name: Check pki CLI version | ||
run: | | ||
docker exec pki pki --version | ||
- name: Check pki CLI with wrong command | ||
run: | | ||
docker exec pki pki wrong \ | ||
> >(tee stdout) 2> >(tee stderr >&2) || true | ||
cat > expected << EOF | ||
ERROR: Invalid module "wrong". | ||
EOF | ||
diff expected stderr | ||
- name: Check pki CLI subcommand help message | ||
run: | | ||
docker exec pki pki --debug nss | ||
docker exec pki pki nss --help |
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