Skip to content

Commit

Permalink
add reverse proxy test
Browse files Browse the repository at this point in the history
  • Loading branch information
gtrkiller committed Jan 29, 2024
1 parent e771448 commit ecf1047
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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):
"""
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

0 comments on commit ecf1047

Please sign in to comment.