mirror of
https://github.com/ViViDboarder/bitwarden_rs_ldap.git
synced 2024-11-22 03:06:27 +00:00
Make running integration tests easier
This commit is contained in:
parent
5fd947f127
commit
0ea5eadd71
18
Makefile
18
Makefile
@ -33,6 +33,24 @@ run-debug: target/debug/vaultwarden_ldap
|
|||||||
test:
|
test:
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
|
# Run bootstrapped integration test
|
||||||
|
.PHONY: itest
|
||||||
|
itest:
|
||||||
|
docker-compose -f docker-compose.yml \
|
||||||
|
-f itest/docker-compose.itest.yml \
|
||||||
|
up --build
|
||||||
|
|
||||||
|
# Run bootstrapped integration test using env for config
|
||||||
|
.PHONY: itest-env
|
||||||
|
itest-env:
|
||||||
|
docker-compose -f docker-compose.yml \
|
||||||
|
-f itest/docker-compose.itest-env.yml \
|
||||||
|
up --build
|
||||||
|
|
||||||
|
.PHONY: clean-itest
|
||||||
|
clean-itest:
|
||||||
|
docker-compose down -v
|
||||||
|
|
||||||
# Installs pre-commit hooks
|
# Installs pre-commit hooks
|
||||||
.PHONY: install-hooks
|
.PHONY: install-hooks
|
||||||
install-hooks:
|
install-hooks:
|
||||||
|
21
itest/docker-compose.itest-env.yml
Normal file
21
itest/docker-compose.itest-env.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
ldap_sync:
|
||||||
|
environment:
|
||||||
|
CONFIG_PATH: ""
|
||||||
|
APP_VAULTWARDEN_URL: "http://vaultwarden:80"
|
||||||
|
APP_VAULTWARDEN_ADMIN_TOKEN: "admin"
|
||||||
|
APP_LDAP_HOST: "ldap"
|
||||||
|
APP_LDAP_BIND_DN: "cn=admin,dc=example,dc=org"
|
||||||
|
APP_LDAP_BIND_PASSWORD: "admin"
|
||||||
|
APP_LDAP_SEARCH_BASE_DN: "dc=example,dc=org"
|
||||||
|
APP_LDAP_SEARCH_FILTER: "(&(objectClass=*)(uid=*))"
|
||||||
|
APP_LDAP_SYNC_INTERVAL_SECONDS: 10
|
||||||
|
|
||||||
|
vaultwarden:
|
||||||
|
|
||||||
|
ldap:
|
||||||
|
command: ["--copy-service"]
|
||||||
|
volumes:
|
||||||
|
- ./itest/50-seed-user.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/50-seed-user.ldif
|
Loading…
Reference in New Issue
Block a user