Skip to content

Commit

Permalink
More blocklist
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet committed Dec 18, 2024
1 parent 958c64e commit b51a75b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions docker-compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
build:
context: .
dockerfile: docker/Dockerfile
entrypoint: ""
command: bash -c "python -m unittest discover test.modules && python -m unittest discover test.reporting && python -m unittest discover test.unit"
environment:
TEST_REDIS_HOST: test-redis
Expand Down
22 changes: 11 additions & 11 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ docker compose -f docker-compose.test.yaml down --remove-orphans
docker compose -f docker-compose.test.yaml up -d --build --scale test=0 --scale=test-e2e=0

# Wait for the dependency services to be available
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-old-joomla-mysql:3306
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-old-wordpress-mysql:3306
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-service-with-bruteable-files:80
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-robots-service:80
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-ftp-server-with-easy-password:21
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-old-joomla:80
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-smtp-server:25
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-service-with-exposed-git:80
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-old-wordpress:80
docker compose -f docker-compose.test.yaml run test /wait-for-it.sh test-service-with-directory-index:80
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-old-joomla-mysql:3306
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-old-wordpress-mysql:3306
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-service-with-bruteable-files:80
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-robots-service:80
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-ftp-server-with-easy-password:21
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-old-joomla:80
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-smtp-server:25
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-service-with-exposed-git:80
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-old-wordpress:80
docker compose -f docker-compose.test.yaml run --entrypoint bash test /wait-for-it.sh test-service-with-directory-index:80

# Set up Joomla instance
docker compose -f docker-compose.test.yaml cp test/data/joomla/configuration.php test-old-joomla:/var/www/html
Expand Down Expand Up @@ -68,7 +68,7 @@ docker compose \
-f docker-compose.test.yaml \
-f docker-compose.yaml \
-f docker-compose.test-e2e.yaml \
run \
run --entrypoint bash \
test-e2e

EXIT_CODE=$?
Expand Down
5 changes: 5 additions & 0 deletions test/modules/test_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def test_parsing(self) -> None:
TestData(
"CERT.pl",
[
ExpectedTaskData(
headers={"origin": "classifier", "type": "domain_that_may_not_exist"},
payload={"domain": "cert.pl", "last_domain": "cert.pl"},
payload_persistent={"original_domain": "cert.pl"},
),
ExpectedTaskData(
headers={"origin": "classifier", "type": "domain"},
payload={"domain": "cert.pl", "last_domain": "cert.pl"},
Expand Down

0 comments on commit b51a75b

Please sign in to comment.