-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
102 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Tutor Integration Tests | ||
on: [pull_request] | ||
|
||
jobs: | ||
integration-test: | ||
name: Tutor Integration Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
tutor_version: ["<17.0.0", "<18.0.0"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: eox-theming | ||
- uses: eduNEXT/integration-test-in-tutor@main | ||
with: | ||
tutor_version: ${{ matrix.tutor_version }} | ||
app_name: "eox-theming" | ||
shell_file_to_run: "eox_theming/tests/tutor/integration.sh" |
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
Empty file.
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,16 @@ | ||
""" | ||
The conftest module sets up the database connection for pytest-django. | ||
The integration tests will reuse the database from tutor local so a noop | ||
django_db_setup is required. | ||
See: https://pytest-django.readthedocs.io/en/latest/database.html | ||
""" | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def django_db_setup(): | ||
""" | ||
Makes the tests reuse the existing database | ||
""" |
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,11 @@ | ||
#!/bin/bash | ||
|
||
# This script installs the package in the edxapp environment, installs test requirements from Open edX and runs the tests using the Tutor settings. | ||
echo "Install package" | ||
pip install -e /openedx/eox-theming | ||
|
||
echo "Install test-requirements" | ||
make test-requirements | ||
|
||
echo "Run tests" | ||
pytest -s --ds=lms.envs.tutor.test /openedx/eox-theming/eox_theming/tests/tutor |
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 @@ | ||
""" | ||
Test integration file. | ||
""" | ||
from django.test import TestCase | ||
|
||
|
||
class TutorIntegrationTestCase(TestCase): | ||
""" | ||
Tests integration with Open edX | ||
""" | ||
|
||
# pylint: disable=import-outside-toplevel, unused-import | ||
def test_current_settings_code_imports(self): | ||
""" | ||
Running this imports means that our backends import the right signature | ||
""" | ||
# isort: off | ||
import eox_theming.edxapp_wrapper.backends.j_configuration_helpers | ||
import eox_theming.edxapp_wrapper.backends.j_finders | ||
import eox_theming.edxapp_wrapper.backends.j_loaders | ||
import eox_theming.edxapp_wrapper.backends.j_models | ||
import eox_theming.edxapp_wrapper.backends.j_theming_helpers | ||
import eox_theming.edxapp_wrapper.backends.l_mako | ||
import eox_theming.edxapp_wrapper.backends.l_storage |
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,7 @@ | ||
[pytest] | ||
python_files = integration_test_*.py | ||
filterwarnings = | ||
default | ||
# We ignore every warning while we actually get the testing infrastructure | ||
# running for different version of tutor in gh actions | ||
ignore: |
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ coverage | |
mako | ||
path-py | ||
testfixtures | ||
pyyaml |
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