-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test/pattern for backend integration testing (#117)
* chore: Sperated tests into unit and integration tests * chore: Added common test utility files. * chore: Moved unit tests into tests/unit dir * feat: Added backend integration tests. * chore: Added Test PDF file. * chore: Added poe script to run integration tests Updated GitHub build action file. * core: Added env config for test files. * chore: Remove .ini env template formatting * chore: Restore DOCQ_OPENAI_API_KEY name in env template files. * chore: Load test env configs using python-dotenv * chore: Restore DOCQ_OPENAI_API_KEY name * chore: Separate unit tests from integration tests. Fix local linting errors for test modules. * chore: Update manual upload test. * chore: Update integration settings to work with model selection. * chore: Update manage_spaces.reindex to handle exceptions when model settings are not available. * fix: Fix key error when trying to retrieve system settings before they are saved. * chore: Re-organize imports. * doc: Update getting started docs on how to run integration tests. * fix: Fix circular dependency between m_users and m_organisation.
- Loading branch information
Showing
23 changed files
with
334 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copy and place the following file to the root of the project as pytest.env | ||
# To setup enviroment variables for integration testing | ||
DOCQ_DATA=./.persisted-test-integration/ | ||
DOCQ_OPENAI_API_KEY=YOUR_OPEN_AI_KEY | ||
DOCQ_COOKIE_HMAC_SECRET_KEY=32_char_secret_used_to_encrypt | ||
|
||
# This will use the DOCQ_OPENAI_API_KEY for now. | ||
OPENAI_API_KEY=${DOCQ_OPENAI_API_KEY} |
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,4 @@ | ||
"""Integration tests.""" | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv("pytest.env") |
Oops, something went wrong.