From 19196fd888aa76cee9d8707e36728c8fffdd337a Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 11 Sep 2024 17:08:30 +0300 Subject: [PATCH] Test one server --- .../io/jenkins/plugins/jfrog/integration/PipelineTestBase.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/test/java/io/jenkins/plugins/jfrog/integration/PipelineTestBase.java b/src/test/java/io/jenkins/plugins/jfrog/integration/PipelineTestBase.java index f6e0b145..9397aae1 100644 --- a/src/test/java/io/jenkins/plugins/jfrog/integration/PipelineTestBase.java +++ b/src/test/java/io/jenkins/plugins/jfrog/integration/PipelineTestBase.java @@ -69,7 +69,6 @@ public class PipelineTestBase { static final String JFROG_CLI_TOOL_NAME_1 = "jfrog-cli"; static final String JFROG_CLI_TOOL_NAME_2 = "jfrog-cli-2"; static final String TEST_CONFIGURED_SERVER_ID = "serverId"; - static final String TEST_CONFIGURED_DUMMY_SERVER_ID = "dummyId"; // Set up jenkins and configure latest JFrog CLI. public void initPipelineTest(JenkinsRule jenkins) throws Exception { @@ -162,12 +161,10 @@ private static void verifyEnvironment() { private void setGlobalConfiguration() throws IOException { JFrogPlatformBuilder.DescriptorImpl jfrogBuilder = (JFrogPlatformBuilder.DescriptorImpl) jenkins.getInstance().getDescriptor(JFrogPlatformBuilder.class); Assert.assertNotNull(jfrogBuilder); - CredentialsConfig emptyCred = new CredentialsConfig(StringUtils.EMPTY, new Credentials(Secret.fromString("username"), Secret.fromString("123"), null)); CredentialsConfig platformCred = new CredentialsConfig(Secret.fromString(ARTIFACTORY_USERNAME), Secret.fromString(ARTIFACTORY_PASSWORD), Secret.fromString(ACCESS_TOKEN), "credentials"); List artifactoryServers = new ArrayList() {{ // Dummy server to test multiple configured servers. // The dummy server should be configured first to ensure the right server is being used (and not the first one). - add(new JFrogPlatformInstance(TEST_CONFIGURED_DUMMY_SERVER_ID, PLATFORM_URL, platformCred, ARTIFACTORY_URL, "", "")); add(new JFrogPlatformInstance(TEST_CONFIGURED_SERVER_ID, PLATFORM_URL, platformCred, ARTIFACTORY_URL, "", "")); }}; jfrogBuilder.setJfrogInstances(artifactoryServers);