Skip to content

Fix/1059: Re-enable BE unit tests for CI#1069

Merged
catinhere merged 6 commits intomasterfrom
fix/1059-be-unit-test-ci
Apr 7, 2026
Merged

Fix/1059: Re-enable BE unit tests for CI#1069
catinhere merged 6 commits intomasterfrom
fix/1059-be-unit-test-ci

Conversation

@catinhere
Copy link
Copy Markdown
Contributor

@catinhere catinhere commented Apr 7, 2026

Closes #1059

  • Unit tests failing:
    • test_saml_metadata in test_login.py

      • If don't mock, it makes an actual HTTP call to SAML_METADATA_URL. Mock it to prevent our unit tests from making real HTTP calls.
      • It passes fine when running locally (SAML_METADATA_URL=None) but fails when running inside a container.
      • Fails because [https://samltest.id/saml/idp](https://samltest.id/saml/idp%60) no longer exists and therefore returns 410 Gone error.
    • test_create_attachment in test_file.py

      • Remove assert equals statement checking that file name is the same as file id plus file extension, which is no longer the case after 25051fa
  • Re-enabled BE unit tests in GitHub actions and changed to use pytest instead of nosetests

- If don't mock, it makes an actual HTTP call to `SAML_METADATA_URL`. Mock it to prevent our unit tests from making real HTTP calls.
- It passes fine when running locally (`SAML_METADATA_URL=None`) but fails when running inside a container.
- Fails because `https://samltest.id/saml/idp` no longer exists and therefore returns 410 Gone error.
@catinhere catinhere requested review from ionparticle and removed request for ionparticle April 7, 2026 16:29
Comment thread .github/workflows/main.yml Outdated
if: false # Temporarily disabled
strategy:
matrix:
python-version: [3.8]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should update to python 3.10 to match new Dockerfile. Otherwise, I think it's good to go. Feel free to merge anytime.

@catinhere catinhere merged commit 7c97ef8 into master Apr 7, 2026
8 checks passed
@catinhere catinhere deleted the fix/1059-be-unit-test-ci branch April 7, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-enable backend test cases for github action

2 participants