Add suffix, database, userRoot, DIT, backends and other things that s… #8
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
name: CI | |
on: | |
push: | |
pull_request: | |
env: | |
TEST_PASSWORD: "asd" | |
TEST_LDAP_CONNECTION_STRING: "ldap://localhost:3389" | |
TEST_SUFFIX: "dc=example,dc=test" | |
TEST_ACI_LDIF: "aci_tmp.ldif" | |
jobs: | |
run-tests: | |
strategy: | |
matrix: | |
dirsrv: [ '2.4', 'latest' ] | |
services: | |
dirsrv: | |
image: "389ds/dirsrv:${{ matrix.dirsrv }}" | |
ports: | |
- 3389:3389 | |
env: | |
DS_SUFFIX_NAME: ${{env.TEST_SUFFIX}} | |
SUFFIX_NAME: ${{env.TEST_SUFFIX}} | |
DS_DM_PASSWORD: ${{env.TEST_PASSWORD}} | |
options: >- | |
--health-cmd "dsctl localhost healthcheck --check backends:localhost:search" --health-interval 10s --health-timeout 5s --health-retries 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install package dependencies | |
run: | | |
sudo apt-get install -y python3-lib389 libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev | |
- name: Actually create the suffix | |
run: | | |
dsconf -D "cn=Directory Manager" -w "$TEST_PASSWORD" $TEST_LDAP_CONNECTION_STRING backend create --create-suffix --suffix="$TEST_SUFFIX" --be-name="userRoot" | |
- name: Install Python dependencies | |
working-directory: ./aci | |
run: | | |
pip install -r requirements.txt | |
- name: Generate ACIs | |
working-directory: ./aci | |
run: | | |
python make_acis.py -l -s $TEST_SUFFIX > aci_tmp.ldif | |
- name: Run test script | |
working-directory: ./aci | |
run: | | |
pytest test_acis.py |