Skip to content

Add test for HTTP default port 80 in https_check#268

Merged
jsf9k merged 4 commits into
cisagov:developfrom
arpitjain099:chore/test-http-default-port
Jun 24, 2026
Merged

Add test for HTTP default port 80 in https_check#268
jsf9k merged 4 commits into
cisagov:developfrom
arpitjain099:chore/test-http-default-port

Conversation

@arpitjain099

Copy link
Copy Markdown
Contributor

Follow-up to #267. @dav3r noted that #267 also added the http -> port 80 default but only the port 443 and explicit-port cases had tests, and it auto-merged before that could be addressed. This adds test_http_check_defaults_to_port_80 to cover the remaining branch.

It mirrors the existing test_https_check_defaults_to_port_443 test, just with an http endpoint and port 80.

Note: I couldn't run the suite locally (sslyze's nassl native lib won't load on my macOS), but I verified the logic directly: Endpoint("http", "root", "example.com").url is http://example.com, and the port parse in https_check returns 80 for an http URL with no explicit port. CI should exercise the full test on Linux like its siblings.

Follow-up to #267, which also added the http -> port 80 default. This
covers that branch, mirroring the existing port 443 test.

Signed-off-by: arpitjain099 <arpitjain099@gmail.com>
@jsf9k jsf9k self-assigned this Jun 23, 2026
@github-project-automation github-project-automation Bot moved this to In progress in BOD 18-01 Jun 23, 2026
@jsf9k jsf9k moved this to In Progress in CyHy System Jun 23, 2026
@jsf9k jsf9k enabled auto-merge June 23, 2026 13:15
@jsf9k jsf9k moved this from In progress to Review in progress in BOD 18-01 Jun 23, 2026
@jsf9k jsf9k disabled auto-merge June 23, 2026 13:16
jsf9k added 2 commits June 23, 2026 09:49
This library contains a py.typed file and type hints, but that doesn't
appear to be sufficient for mypy.
@jsf9k

jsf9k commented Jun 23, 2026

Copy link
Copy Markdown
Member

@arpitjain099 - Please let me know what you think of commits d659b65 and 01f6a13.

@jsf9k jsf9k added python Pull requests that update Python code test This issue or pull request adds or otherwise modifies test code labels Jun 23, 2026
@jsf9k jsf9k enabled auto-merge June 23, 2026 14:04
@jsf9k jsf9k disabled auto-merge June 23, 2026 14:04

@dav3r dav3r left a comment

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.

LGTM, aside from the test name comment I mentioned. 👍

Comment thread tests/test_pshtt.py Outdated
@github-project-automation github-project-automation Bot moved this from Review in progress to Reviewer approved in BOD 18-01 Jun 23, 2026
Co-authored-by: dav3r <daver@geekpad.com>
@arpitjain099

Copy link
Copy Markdown
Contributor Author

Looks great @jsf9k - folding the two into a parametrized test_check_default_web_ports is cleaner than my separate test, and it picks up @dav3r's naming suggestion too. The unittest-parametrize approach and the mypy ignore for it both look good to me. Thanks for tightening it up.

@jsf9k jsf9k merged commit 42c6097 into cisagov:develop Jun 24, 2026
36 of 37 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in BOD 18-01 Jun 24, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in CyHy System Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update Python code test This issue or pull request adds or otherwise modifies test code

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants