Skip to content

Commit

Permalink
chore: enable flake8 in circleci config for tools/integration_tests (#…
Browse files Browse the repository at this point in the history
…1121)

closes #944

Enable flake8 in circleci config for tools/integration_tests
Format contents in tool/integration_tests to be flake8 compliant
  • Loading branch information
tiftran authored Jul 26, 2021
1 parent f0c16ba commit dee69dd
Show file tree
Hide file tree
Showing 4 changed files with 986 additions and 818 deletions.
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ commands:
steps:
- run:
name: Core Python Checks
command: flake8 src/tokenserver/verify.py
command: |
flake8 src/tokenserver/verify.py
flake8 tools/integration_tests
rust-clippy:
steps:
- run:
Expand Down Expand Up @@ -150,6 +152,8 @@ jobs:
- setup-gcp-grpc
- rust-check
- rust-clippy
- setup-python
- python-check

build-and-test:
docker:
Expand Down
16 changes: 11 additions & 5 deletions tools/integration_tests/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import time


DEBUG_BUILD = 'target/debug/syncstorage'
RELEASE_BUILD = '/app/bin/syncstorage'
DEBUG_BUILD = "target/debug/syncstorage"
RELEASE_BUILD = "/app/bin/syncstorage"

if __name__ == "__main__":
# When run as a script, this file will execute the
Expand All @@ -21,9 +21,15 @@
elif os.path.exists(RELEASE_BUILD):
target_binary = RELEASE_BUILD
else:
raise RuntimeError("Neither target/debug/syncstorage nor /app/bin/syncstorage were found.")
the_server_subprocess = subprocess.Popen('SYNC_MASTER_SECRET=secret0 ' + target_binary, shell=True)
## TODO we should change this to watch for a log message on startup to know when to continue instead of sleeping for a fixed amount
raise RuntimeError(
"Neither target/debug/syncstorage \
nor /app/bin/syncstorage were found."
)
the_server_subprocess = subprocess.Popen(
"SYNC_MASTER_SECRET=secret0 " + target_binary, shell=True
)
# TODO we should change this to watch for a log message on startup
# to know when to continue instead of sleeping for a fixed amount
time.sleep(20)

def stop_subprocess():
Expand Down
Loading

0 comments on commit dee69dd

Please sign in to comment.