-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from SciCatProject/integration-test
Add more integration helpers.
- Loading branch information
Showing
4 changed files
with
113 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Entry point for integration test. | ||
# All system arguments are passed to the ``scicat_ingestor``. | ||
|
||
|
||
if __name__ == "__main__": | ||
import signal | ||
import subprocess | ||
import sys | ||
from time import sleep | ||
|
||
# Run the main function in a subprocess | ||
process = subprocess.Popen( | ||
[ | ||
"scicat_ingestor", | ||
*(sys.argv[1:] or ["--verbose", "-c", "resources/config.sample.json"]), | ||
] | ||
) | ||
|
||
# Send a SIGINT signal to the process after 5 seconds | ||
sleep(5) | ||
process.send_signal(signal.SIGINT) | ||
|
||
# Kill the process after 5 more seconds | ||
sleep(5) |