Skip to content

Commit

Permalink
Fixes broken integTest task
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Feb 15, 2024
1 parent 6c0edad commit 5a98399
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ int endJmxPort = startJmxPort
integTest {
useCluster testClusters.leaderCluster
useCluster testClusters.followCluster
systemProperty "password", "admin" // setting it to `admin` explicitly since its a custom security setup

if(knnEnabled){
nonInputProperties.systemProperty('tests.knn_plugin_enabled', "true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ abstract class MultiClusterRestTestCase : OpenSearchTestCase() {
defaultHeaders[i++] = BasicHeader(key, value)
}

val creds = System.getProperty("user", "admin") + System.getProperty("password", "myStrongPassword123!");
val creds = System.getProperty("user", "admin") + ":" + System.getProperty("password", "myStrongPassword123!")
if(securityEnabled) {
defaultHeaders[i++] = BasicHeader("Authorization", "Basic " + Base64.getUrlEncoder().encodeToString(creds.toByteArray(StandardCharsets.UTF_8)))
defaultHeaders[i++] = BasicHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(creds.toByteArray(StandardCharsets.UTF_8)))
}

builder.setDefaultHeaders(defaultHeaders)
Expand Down

0 comments on commit 5a98399

Please sign in to comment.