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 reverse proxy plugin integration test #105

Merged
merged 6 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ options:
Comma-separated list of allowed plugin short names. If empty, any plugin can be installed.
Plugins installed by the user and their dependencies will be removed automatically if not on
the list. Included plugins are not automatically installed.
default: "bazaar,blueocean,dependency-check-jenkins-plugin,docker-build-publish,git,kubernetes,ldap,matrix-combinations-parameter,oic-auth,openid,pipeline-groovy-lib,postbuildscript,rebuild,ssh-agent,thinBackup"
default: "bazaar,blueocean,dependency-check-jenkins-plugin,docker-build-publish,git,kubernetes,ldap,matrix-combinations-parameter,oic-auth,openid,pipeline-groovy-lib,postbuildscript,rebuild,reverse-proxy-auth-plugin,ssh-agent,thinBackup"
16 changes: 16 additions & 0 deletions tests/integration/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,22 @@ async def test_docker_build_publish_plugin(unit_web_client: UnitWebClient):
), f"docker-build-publish configuration option not found. {config_page}"


async def test_reverse_proxy_plugin(unit_web_client: UnitWebClient):
gtrkiller marked this conversation as resolved.
Show resolved Hide resolved
"""
arrange: given a Jenkins charm with reverse-proxy-auth-plugin plugin installed.
act: when the security configuration is accessed.
assert: reverse-proxy-auth-plugin plugin option exists.
"""
await install_plugins(unit_web_client, ("reverse-proxy-auth-plugin",))
res = unit_web_client.client.requester.get_url(
f"{unit_web_client.web}/manage/configureSecurity"
)
config_page = str(res.content, "utf-8")
assert (
"HTTP Header by reverse proxy" in config_page
), f"reverse-proxy-auth-plugin configuration option not found. {config_page}"


async def test_dependency_check_plugin(unit_web_client: UnitWebClient):
"""
arrange: given a Jenkins charm with dependency-check-jenkins-plugin plugin installed.
Expand Down
Loading