Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
if: matrix.command == 'docker-image'
run: |
git clone https://github.com/kiwitcms/openldap.git
pushd openldap/ && git checkout openldap-2.4.41 && SKIP_SQUASH=1 make build && popd
pushd openldap/ && docker build -t kiwitcms/openldap-fedora34 -f images/Dockerfile . && popd

- name: Sanity test - boot the docker image
if: matrix.command == 'docker-image'
Expand Down Expand Up @@ -179,8 +179,23 @@ jobs:
name: kc-json-files
path: ./*.json

- name: Collect docker logs
if: always() && matrix.command == 'docker-image'
run: |
docker logs keycloak_server > keyclock_server.log
docker logs openldap_server > openldap_server.log
docker logs web > kiwitcms.log
docker logs db > database.log

- name: Upload logs
if: always() && matrix.command == 'docker-image'
uses: actions/upload-artifact@v3
with:
name: docker-logs
path: ./*.log

- name: Sanity test - shut down the docker image
if: matrix.command == 'docker-image'
if: always() && matrix.command == 'docker-image'
run: |
docker kill keycloak_server
docker-compose -f docker-compose.testing down
2 changes: 1 addition & 1 deletion docker-compose.testing
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '2'
services:
openldap_server:
container_name: openldap_server
image: openshift/openldap-2441-centos7
image: kiwitcms/openldap-fedora34
restart: always
ports:
- 389:389
Expand Down
15 changes: 15 additions & 0 deletions test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@
LDAP_AUTH_USE_TLS = True
LDAP_AUTH_SEARCH_BASE = "ou=People,dc=example,dc=com"

LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"console": {
"class": "logging.StreamHandler",
},
},
"loggers": {
"django_python3_ldap": {
"handlers": ["console"],
"level": "INFO",
},
},
}

SOCIAL_AUTH_KEYCLOAK_KEY = 'kiwitcms-web-app'
SOCIAL_AUTH_KEYCLOAK_SECRET = os.environ["KC_CLIENT_SECRET"]
Expand Down
6 changes: 3 additions & 3 deletions testing/ldap.ldif
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dn: ou=People,dc=example,dc=com
ou: People
objectClass: organizationalUnit
# dn: ou=People,dc=example,dc=com
# ou: People
# objectClass: organizationalUnit

dn: uid=ldap_atodorov,ou=People,dc=example,dc=com
cn: ldap_atodorov
Expand Down