Skip to content

Conversation

@oboehmer
Copy link
Contributor

@oboehmer oboehmer commented Dec 13, 2025

Replace httpbin.org with local HTTP server and reliable external HTTPS services

This PR eliminates the dependency on httpbin.org, which was causing intermittent test failures due to rate limiting (got frequent 503 messages).

This PR still requires addtl. cleanup in atests/http_server/helpers.py as some functions are no longer needed/used. Please comment.

Changes

Local HTTP Server for Authentication Tests

  • Enhanced local Flask server with missing endpoints (/basic-auth, /digest-auth)
  • Implemented HTTP Basic and Digest authentication using Flask-HTTPAuth
  • All authentication tests now use local HTTP server at http://localhost:5010
  • Automatic server startup/teardown at suite level

External HTTPS for SSL/Certificate Tests

  • SSL/TLS tests migrated to use github.com (hopefully more reliable ;-) )

Code Cleanup

  • Marked unused authentication helper functions in hepers.ply

@oboehmer oboehmer changed the title Remove httpbin.org dependency for acceptance tests Replace httpbin.org with github.com for acceptance tests Dec 13, 2025
…ervices

Eliminates dependency on httpbin.org which was causing intermittent test
failures due to rate limiting (503 errors).

Changes:
- Enhanced local Flask server with /basic-auth and /digest-auth endpoints
- Implemented authentication using Flask-HTTPAuth library
- Migrated SSL/TLS tests to use github.com for reliable HTTPS testing
- Removed local HTTPS server and certificate generation infrastructure
- Removed cryptography dependency from test requirements
- Marked unused authentication helper functions in helpers.py

All authentication tests now use local HTTP server at http://localhost:5010
All SSL/TLS tests use github.com with proper CA-signed certificates

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@oboehmer oboehmer force-pushed the remove-httpbin-dependency branch from 7f082b8 to 5eee821 Compare December 13, 2025 13:16
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.93%. Comparing base (19c9017) to head (778d529).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #413      +/-   ##
==========================================
+ Coverage   85.38%   88.93%   +3.54%     
==========================================
  Files           9        9              
  Lines         479      479              
  Branches       49       49              
==========================================
+ Hits          409      426      +17     
+ Misses         65       51      -14     
+ Partials        5        2       -3     
Flag Coverage Δ
acceptance 85.38% <ø> (ø)
unit 60.12% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lucagiove
Copy link
Member

Nice!
I always wanted to move more atest to run locally! The ssl one is for sure the most complicated but using github sounds a good idea.

@lucagiove lucagiove self-assigned this Dec 15, 2025
@lucagiove lucagiove added feature and removed feature labels Dec 15, 2025
@lucagiove lucagiove added this to the 1.0 milestone Dec 15, 2025
@lucagiove lucagiove moved this to To do in Requests Library Dec 15, 2025
@lucagiove lucagiove moved this from To do to In progress in Requests Library Dec 15, 2025
lucagiove
lucagiove previously approved these changes Dec 15, 2025
@lucagiove
Copy link
Member

I think you could safely remove unused methods.
I copie pasted from the httpbin source code the endpoint I needed but if this library for authentication is doing the job, fine.

@oboehmer oboehmer marked this pull request as ready for review December 15, 2025 21:53
@oboehmer
Copy link
Contributor Author

thanks for reviewing so quickly.. I removed the unused helper functions.

@lucagiove lucagiove merged commit 3f83f5d into MarketSquare:master Dec 17, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Requests Library Dec 17, 2025
@oboehmer oboehmer deleted the remove-httpbin-dependency branch December 17, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants