Skip to content

Unit test fails in GitHub Actions due to Cloudflare bot protection — proposal to test only PURL redirect header #41

@alexskr

Description

@alexskr

test_purl_umls, test_purl_obo, test_purl_owl unit test fails when running in GitHub Actions. The root cause appears to be Cloudflare's bot protection, which blocks the redirect from the PURL server to the BioPortal UI. This doesn't happen locally, but CI consistently hits the anti-bot mechanism.

The test uses Faraday with redirect-following enabled and asserts that the final response is a 200 OK from the BioPortal UI.

Proposal:
Instead of following the redirect to the final UI page (which triggers Cloudflare), we could:

  • Disable redirect-following in the HTTP client
  • Check only for a 302 response
  • Assert that the Location header matches the expected UI URL

This would make the test more robust, reduce external dependency on the prod UI, and still validate that the PURL redirect is functioning correctly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions