Skip to content

Commit

Permalink
Set the random seed for the server when running ci tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
terjekv committed Aug 2, 2024
1 parent 32af34b commit 4622f79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ci/new_testsuite_log.json
*.log
local_settings.py
db.sqlite3
!ci/local_settings.py

# Flask stuff:
instance/
Expand Down
2 changes: 2 additions & 0 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ services:
timeout: 5s
retries: 10
start_period: 5s
volumes:
- ${PWD}/local_settings.py:/app/mregsite/local_settings.py

# The purpose of the dummy container is to depend on the mreg container,
# so the "docker compose" command won't return until mreg is up and running.
Expand Down
4 changes: 4 additions & 0 deletions ci/local_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import random

print("Setting fixed random seed")
random.seed(42)

0 comments on commit 4622f79

Please sign in to comment.