Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add smoke tests for stunnel #688

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add smoke tests for stunnel #688

wants to merge 1 commit into from

Conversation

dcermak
Copy link
Collaborator

@dcermak dcermak commented Dec 5, 2024

[CI:TOXENVS] stunnel

for SUSE/BCI-dockerfile-generator#2110

@dcermak dcermak marked this pull request as ready for review December 5, 2024 15:25
Copy link
Member

@alexandrevicenzi alexandrevicenzi left a comment

Choose a reason for hiding this comment

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

Overall LGTM, but it needs a rebase.

tests/test_stunnel.py Outdated Show resolved Hide resolved
tests/test_stunnel.py Outdated Show resolved Hide resolved
tests/test_stunnel.py Show resolved Hide resolved
"STUNNEL_DEBUG": log_level,
"STUNNEL_SERVICE_NAME": "neverssl",
"STUNNEL_ACCEPT": f"0.0.0.0:{_CTR_PORT}",
"STUNNEL_CONNECT": "neverssl.com:80",
Copy link
Member

@alexandrevicenzi alexandrevicenzi Jan 22, 2025

Choose a reason for hiding this comment

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

nit: can we trust this won't cause random failures in CI?

Copy link
Contributor

@grisu48 grisu48 left a comment

Choose a reason for hiding this comment

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

Small nitpick, otherwise LGTM.

resp = get_request_to_stunnel()
assert resp.status_code == 200
assert (
"This website is for when you try to open Facebook, Google, Amazon, etc"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"This website is for when you try to open Facebook, Google, Amazon, etc"
assert "neverssl" in resp.text.lower()

Making assumptions on external resources we have no control over is always difficult. I would limit the assumption to a minimum, so that the test doesn't fail when someone slightly changes the text on neverssl.com. We already check for status code 200, I think this check doesn't need to be extensive here.

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.

3 participants