Skip to content

Fix things in tests #14

Fix things in tests

Fix things in tests #14

Workflow file for this run

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"
TEST_IMPORT_SCHEMA: 1
jobs:
run-tests:
strategy:
matrix:
dirsrv: [ '3.0', 'latest' ]
services:
dirsrv:
image: "389ds/dirsrv:${{ matrix.dirsrv }}"
ports:
- 3389:3389
env:
DS_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 libsasl2-dev python-dev-is-python3 libldap2-dev libssl-dev
- 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 > $TEST_ACI_LDIF
- name: Run test script
working-directory: ./aci
run: |
pytest test_acis.py