Skip to content

Commit

Permalink
Update DS connection test
Browse files Browse the repository at this point in the history
The steps that check DS backends and user have been moved into
DS connection test.
  • Loading branch information
edewata committed Nov 27, 2023
1 parent 560be6e commit 36e4493
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ca-ds-connection-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,37 @@ jobs:
docker exec pki pki-server restart --wait
docker exec pki curl -s http://pki.example.com:8080/ca/admin/ca/getStatus
- name: Check DS backends
run: |
cat > expected << EOF
dc=ca,dc=pki,dc=example,dc=com (ca)
dc=example,dc=com (userroot)
EOF
docker exec ds dsconf localhost backend suffix list | tee actual
diff expected actual
- name: Check DS user
run: |
cat > expected << EOF
dn: uid=pkidbuser,ou=People,dc=ca,dc=pki,dc=example,dc=com
nsPagedSizeLimit: 20000
EOF
docker exec ds ldapsearch \
-H ldap://ds.example.com:3389 \
-D "cn=Directory Manager" \
-w Secret.123 \
-o ldif_wrap=no \
-LLL \
-b "uid=pkidbuser,ou=People,dc=ca,dc=pki,dc=example,dc=com" \
nsPagedSizeLimit \
| tee actual
diff expected actual
- name: Initialize PKI client
run: |
docker exec pki pki-server cert-export ca_signing --cert-file ca_signing.crt
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/ca-existing-ds-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,28 +235,6 @@ jobs:
--pkcs12-password Secret.123
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Check DS suffix
run: |
echo "dc=example,dc=com (userroot)" > expected
docker exec ds dsconf localhost backend suffix list | tee actual
diff expected actual
- name: Check users have nsPagedSizeLimit attribute set
run: |
printf "dn: uid=pkidbuser,ou=People,dc=ca,dc=pki,dc=example,dc=com\nnsPagedSizeLimit: 20000\n\n" > expected
docker exec ds ldapsearch \
-H ldap://ds.example.com:3389 \
-D "cn=Directory Manager" \
-w Secret.123 \
-o ldif_wrap=no \
-LLL \
-b "uid=pkidbuser,ou=People,dc=ca,dc=pki,dc=example,dc=com" \
nsPagedSizeLimit \
| tee actual
diff expected actual
- name: Gather artifacts
if: always()
run: |
Expand Down

0 comments on commit 36e4493

Please sign in to comment.