diff --git a/pom.xml b/pom.xml index 88d4c5a7..1062b430 100644 --- a/pom.xml +++ b/pom.xml @@ -259,12 +259,6 @@ docker-commons true - - - org.jenkinsci.plugins - pipeline-model-extensions - true - junit diff --git a/src/main/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertor.java b/src/main/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertor.java similarity index 97% rename from src/main/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertor.java rename to src/main/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertor.java index 56fc688f..42f01db9 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertor.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertor.java @@ -31,7 +31,7 @@ import org.jenkinsci.plugins.variant.OptionalExtension; @OptionalExtension(requirePlugins = {"docker-commons"}) -public class X509ClientCertConvertor extends SecretToCredentialConverter { +public class DockerServerCredentialsConvertor extends SecretToCredentialConverter { @Override public boolean canConvert(String type) { diff --git a/src/test/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest.java b/src/test/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest.java similarity index 97% rename from src/test/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest.java rename to src/test/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest.java index 91b8186f..33fa5baa 100644 --- a/src/test/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest.java +++ b/src/test/java/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest.java @@ -34,7 +34,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -public class X509ClientCertConvertorTest extends AbstractConverterTest { +public class DockerServerCredentialsConvertorTest extends AbstractConverterTest { private final String clientCertificate = "-----BEGIN CERTIFICATE-----\n" + "MIIBYjCCAQygAwIBAgIJAKZlQzqGGWu9MA0GCSqGSIb3DQEBBQUAMEExCzAJBgNV\n" + @@ -69,7 +69,7 @@ public class X509ClientCertConvertorTest extends AbstractConverterTest { "XoR7JjrHmbI+f1BkwSbMVxxadAWpSkk/NNI1+SHR/nYSv/loQ3UjmA==\n" + "-----END CERTIFICATE-----"; - private X509ClientCertConvertor convertor = new X509ClientCertConvertor(); + private DockerServerCredentialsConvertor convertor = new DockerServerCredentialsConvertor(); @Test public void canConvert() throws Exception { diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/corruptClientCertificate.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/corruptClientCertificate.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/corruptClientCertificate.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/corruptClientCertificate.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/corruptClientKeySecret.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/corruptClientKeySecret.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/corruptClientKeySecret.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/corruptClientKeySecret.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/corruptServerCaCertificate.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/corruptServerCaCertificate.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/corruptServerCaCertificate.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/corruptServerCaCertificate.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/missingClientCertificate.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/missingClientCertificate.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/missingClientCertificate.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/missingClientCertificate.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/missingClientKeySecret.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/missingClientKeySecret.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/missingClientKeySecret.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/missingClientKeySecret.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/missingServerCaCertificate.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/missingServerCaCertificate.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/missingServerCaCertificate.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/missingServerCaCertificate.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/valid.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/valid.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/valid.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/valid.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/validMapped.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/validMapped.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/validMapped.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/validMapped.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/validNoDescription.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/validNoDescription.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/validNoDescription.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/validNoDescription.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/validScoped.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/validScoped.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/validScoped.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/validScoped.yaml diff --git a/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/void.yaml b/src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/void.yaml similarity index 100% rename from src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/X509ClientCertConvertorTest/void.yaml rename to src/test/resources/com/cloudbees/jenkins/plugins/kubernetes_credentials_provider/convertors/DockerServerCredentialsConvertorTest/void.yaml