-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Devops: Allow unit test suite to be ran against SQLite (#6425)
The unit test suite currently automatically creates a test profile using the `core.psql_dos` storage plugin. The reason is mostly historical as originally the `core.psql_dos` storage was the only. The downside of this storage plugin, however, is that it requires a PostgreSQL database. This typically requires a PostgreSQL service to be running, making it more difficult to get a working development environment. This was made slightly easier through the use of `pgtest`, which would create a PSQL cluster on-the-fly, but this would still require postgres libraries to be installed. Nowadays, storage plugins are customizable and the `core.sqlite_dos` replaces PostgreSQL with the serviceless SQLite. The dependencies for these are a lot easier to install, making it perfect for testing. However, the test suite automatically configures a `core.psql_dos` profile and some tests are not compatible with SQLite since they directly depend on functionality that is only supported by PSQL and not SQLite. In this commit, changes are made that allow running the test with SQLite. Two new pytest markers are added to the test suite: * `requires_pgsql`: for tests that are known to require PostgreSQL (i.e. do not work with SQLite) * `presto`: an alias for `not requires_rmq and not requires_pgsql`. The tests are marked with `presto` automagically in `tests/conftest.py:pytest_collection_modifyitems` A new CI job is added `test-presto` that runs the tests with the `presto` marker.
- Loading branch information
1 parent
082589f
commit 0dc8bbc
Showing
38 changed files
with
303 additions
and
100 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: continuous-integration-style | ||
name: ci-style | ||
|
||
on: | ||
push: | ||
|
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,9 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
ssh-keygen -q -t rsa -b 4096 -N "" -f "${HOME}/.ssh/id_rsa" | ||
ssh-keygen -y -f "${HOME}/.ssh/id_rsa" >> "${HOME}/.ssh/authorized_keys" | ||
ssh-keyscan -H localhost >> "${HOME}/.ssh/known_hosts" | ||
|
||
# The permissions on the GitHub runner are 777 which will cause SSH to refuse the keys and cause authentication to fail | ||
chmod 755 "${HOME}" |
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
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
Oops, something went wrong.