Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Nov 17, 2024
1 parent b05707e commit 967cfd6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ 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_SERVER_ID2 = "serverId2";

// Set up jenkins and configure latest JFrog CLI.
public void initPipelineTest(JenkinsRule jenkins) throws Exception {
Expand Down Expand Up @@ -162,10 +163,8 @@ private void setGlobalConfiguration() throws IOException {
Assert.assertNotNull(jfrogBuilder);
CredentialsConfig platformCred = new CredentialsConfig(Secret.fromString(ARTIFACTORY_USERNAME), Secret.fromString(ARTIFACTORY_PASSWORD), Secret.fromString(ACCESS_TOKEN), "credentials");
List<JFrogPlatformInstance> 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("dummyServerId", "", platformCred, "", "", ""));
add(new JFrogPlatformInstance(TEST_CONFIGURED_SERVER_ID, PLATFORM_URL, platformCred, ARTIFACTORY_URL, "", ""));
add(new JFrogPlatformInstance(TEST_CONFIGURED_SERVER_ID2, PLATFORM_URL, platformCred, ARTIFACTORY_URL, "", ""));
}};
jfrogBuilder.setJfrogInstances(artifactoryServers);
Jenkins.get().getDescriptorByType(JFrogPlatformBuilder.DescriptorImpl.class).setJfrogInstances(artifactoryServers);
Expand Down

0 comments on commit 967cfd6

Please sign in to comment.