diff --git a/tests/integration/test_plugins.py b/tests/integration/test_plugins.py index 461dccd0..1f1ef42e 100644 --- a/tests/integration/test_plugins.py +++ b/tests/integration/test_plugins.py @@ -32,6 +32,7 @@ logger = logging.getLogger(__name__) +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("app_with_allowed_plugins") async def test_plugins_remove_delay( ops_test: OpsTest, update_status_env: typing.Iterable[str], unit_web_client: UnitWebClient @@ -94,6 +95,7 @@ async def has_delay_log(): ) +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("app_with_allowed_plugins") async def test_jenkins_plugins_config( ops_test: OpsTest, @@ -127,6 +129,7 @@ async def test_jenkins_plugins_config( assert all(unit_web_client.client.has_plugin(plugin) for plugin in ALLOWED_PLUGINS) +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("k8s_agent_related_app") async def test_git_plugin_k8s_agent(unit_web_client: UnitWebClient): """ @@ -152,6 +155,7 @@ async def test_git_plugin_k8s_agent(unit_web_client: UnitWebClient): ) == "
", f"Non-empty error message returned, {check_url_content}" +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("app_with_allowed_plugins") async def test_ldap_plugin( unit_web_client: UnitWebClient, @@ -220,6 +224,7 @@ async def test_ldap_plugin( ), f"User lookup unsuccessful, {res.content}" +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("app_with_allowed_plugins") async def test_matrix_combinations_parameter_plugin(unit_web_client: UnitWebClient): """ @@ -254,6 +259,7 @@ async def test_matrix_combinations_parameter_plugin(unit_web_client: UnitWebClie ), f"Configuration matrix table not found, {test_page}" +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("k8s_agent_related_app") async def test_postbuildscript_plugin( ops_test: OpsTest, unit_web_client: UnitWebClient, jenkins_k8s_agents: Application @@ -288,6 +294,7 @@ async def test_postbuildscript_plugin( assert stdout == test_output +@pytest.mark.abort_on_fail async def test_ssh_agent_plugin(unit_web_client: UnitWebClient): """ arrange: given jenkins charm with ssh_agent plugin installed. @@ -305,6 +312,7 @@ async def test_ssh_agent_plugin(unit_web_client: UnitWebClient): assert "SSH Agent" in config_page, f"SSH agent configuration not found. {config_page}" +@pytest.mark.abort_on_fail async def test_blueocean_plugin(unit_web_client: UnitWebClient): """ arrange: given a jenkins charm with blueocean plugin installed. @@ -322,6 +330,7 @@ async def test_blueocean_plugin(unit_web_client: UnitWebClient): ), f"Failed to access Blueocean frontend, {str(res.content, encoding='utf-8')}" +@pytest.mark.abort_on_fail async def test_thinbackup_plugin(ops_test: OpsTest, unit_web_client: UnitWebClient): """ arrange: given a Jenkins charm with thinbackup plugin installed and backup configured. @@ -374,6 +383,7 @@ async def has_backup() -> bool: await wait_for(has_backup) +@pytest.mark.abort_on_fail async def test_bzr_plugin(unit_web_client: UnitWebClient): """ arrange: given a Jenkins charm with bazaar plugin installed. @@ -391,6 +401,7 @@ async def test_bzr_plugin(unit_web_client: UnitWebClient): assert "Bazaar" in config_page, f"Bzr configuration option not found. {config_page}" +@pytest.mark.abort_on_fail async def test_docker_build_publish_plugin(unit_web_client: UnitWebClient): """ arrange: given a Jenkins charm with docker-build-publish plugin installed. @@ -408,6 +419,7 @@ async def test_docker_build_publish_plugin(unit_web_client: UnitWebClient): ), f"docker-build-publish configuration option not found. {config_page}" +@pytest.mark.abort_on_fail async def test_reverse_proxy_plugin(unit_web_client: UnitWebClient): """ arrange: given a Jenkins charm with reverse-proxy-auth-plugin plugin installed. @@ -426,6 +438,7 @@ async def test_reverse_proxy_plugin(unit_web_client: UnitWebClient): ), f"reverse-proxy-auth-plugin configuration option not found. {config_page}" +@pytest.mark.abort_on_fail async def test_dependency_check_plugin(unit_web_client: UnitWebClient): """ arrange: given a Jenkins charm with dependency-check-jenkins-plugin plugin installed. @@ -448,6 +461,7 @@ async def test_dependency_check_plugin(unit_web_client: UnitWebClient): ), f"Dependency check tool configuration option not found. {tools_page}" +@pytest.mark.abort_on_fail async def test_groovy_libs_plugin(unit_web_client: UnitWebClient): """ arrange: given a Jenkins charm with pipeline-groovy-lib plugin installed. @@ -463,6 +477,7 @@ async def test_groovy_libs_plugin(unit_web_client: UnitWebClient): ), f"Groovy libs configuration option not found. {config_page}" +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("k8s_agent_related_app") async def test_rebuilder_plugin(unit_web_client: UnitWebClient): """ @@ -484,6 +499,7 @@ async def test_rebuilder_plugin(unit_web_client: UnitWebClient): assert job.get_last_buildnumber() == 2, "Rebuild not triggered." +@pytest.mark.abort_on_fail async def test_openid_plugin(unit_web_client: UnitWebClient): """ arrange: given a Jenkins charm with openid plugin installed. @@ -501,6 +517,7 @@ async def test_openid_plugin(unit_web_client: UnitWebClient): assert res.status_code == 200, "Failed to validate openid endpoint using the plugin." +@pytest.mark.abort_on_fail async def test_openid_connect_plugin( unit_web_client: UnitWebClient, keycloak_oidc_meta: KeycloakOIDCMetadata, @@ -572,6 +589,7 @@ async def test_openid_connect_plugin( assert res.status_code == 200, "Failed to load Jenkins native login UI." +@pytest.mark.abort_on_fail async def test_kubernetes_plugin(unit_web_client: UnitWebClient, kube_config: str): """ arrange: given a Jenkins charm with kubernetes plugin installed and credentials from microk8s. @@ -599,6 +617,7 @@ async def test_kubernetes_plugin(unit_web_client: UnitWebClient, kube_config: st assert build.get_status() == "SUCCESS" +@pytest.mark.abort_on_fail @pytest.mark.usefixtures("k8s_agent_related_app") async def test_pipeline_model_definition_plugin(unit_web_client: UnitWebClient): """