Skip to content

Commit

Permalink
Test one server
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Sep 11, 2024
1 parent 33ccd7d commit 19196fd
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<JFrogPlatformInstance> artifactoryServers = new ArrayList<JFrogPlatformInstance>() {{
// 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);
Expand Down

0 comments on commit 19196fd

Please sign in to comment.