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 Docker plugin test #97

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +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,docker-build-publish,ldap,matrix-combinations-parameter,postbuildscript,ssh-agent,blueocean,thinBackup,rebuild,openid,oic-auth"
17 changes: 17 additions & 0 deletions tests/integration/test_plugins.py
gtrkiller marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,23 @@ async def test_bzr_plugin(unit_web_client: UnitWebClient):
assert "Bazaar" in config_page, f"Bzr configuration option not found. {config_page}"


async def test_docker_build_publish_plugin(unit_web_client: UnitWebClient):
"""
arrange: given a Jenkins charm with docker-build-publish plugin installed.
act: when a job configuration page is accessed.
assert: docker-build-publish plugin option exists.
"""
await install_plugins(unit_web_client, ("docker-build-publish",))
unit_web_client.client.create_job("docker_plugin_test", gen_test_job_xml("k8s"))
res = unit_web_client.client.requester.get_url(
f"{unit_web_client.web}/job/docker_plugin_test/configure"
)
config_page = str(res.content, "utf-8")
assert (
"Docker Build and Publish" in config_page
), f"docker-build-publish configuration option not found. {config_page}"


@pytest.mark.usefixtures("k8s_agent_related_app")
async def test_rebuilder_plugin(unit_web_client: UnitWebClient):
"""
Expand Down
Loading