Skip to content

Commit

Permalink
fix password argument in SecureRestClientBuilder constructor for Secu…
Browse files Browse the repository at this point in the history
…reWorkflowRestApiIT

Signed-off-by: Surya Sashank Nistala <[email protected]>
  • Loading branch information
eirsep committed Jul 17, 2023
1 parent 064e5f5 commit fc120af
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
fun create() {
if (userClient == null) {
createUser(user, arrayOf())
userClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), user, user).setSocketTimeout(60000).build()
userClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), user, password).setSocketTimeout(60000).build()
}
}

Expand Down Expand Up @@ -369,7 +369,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
listOf("role2"),
getClusterPermissionsFromCustomRole(ALERTING_GET_WORKFLOW_ACCESS)
)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, getUser)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, password)
.setSocketTimeout(60000).build()

val getWorkflowResponse = getUserClient?.makeRequest(
Expand Down Expand Up @@ -430,7 +430,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
)

val userWithDifferentRoleClient = SecureRestClientBuilder(
clusterHosts.toTypedArray(), isHttps(), userWithDifferentRole, userWithDifferentRole
clusterHosts.toTypedArray(), isHttps(), userWithDifferentRole, password
)
.setSocketTimeout(60000).build()

Expand Down Expand Up @@ -625,7 +625,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
listOf("role2"),
getClusterPermissionsFromCustomRole(ALERTING_GET_WORKFLOW_ACCESS)
)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, getUser)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, password)
.setSocketTimeout(60000).build()

val getWorkflowResponse = getUserClient?.makeRequest(
Expand Down Expand Up @@ -786,7 +786,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
listOf("role2"),
getClusterPermissionsFromCustomRole(ALERTING_GET_WORKFLOW_ACCESS)
)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, getUser)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, password)
.setSocketTimeout(60000).build()

val getWorkflowResponse = getUserClient?.makeRequest(
Expand Down Expand Up @@ -846,7 +846,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
false
)

val updateUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), updateUser, updateUser)
val updateUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), updateUser, password)
.setSocketTimeout(60000).build()
val updatedWorkflow = updateWorkflowWithClient(updateUserClient, createdWorkflow, listOf("role5"))

Expand Down Expand Up @@ -904,7 +904,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
listOf("role1", "role2"),
getClusterPermissionsFromCustomRole(ALERTING_GET_WORKFLOW_ACCESS)
)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, getUser)
val getUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), getUser, password)
.setSocketTimeout(60000).build()

val getWorkflowResponse = getUserClient?.makeRequest(
Expand Down Expand Up @@ -1074,7 +1074,7 @@ class SecureWorkflowRestApiIT : AlertingRestTestCase() {
getClusterPermissionsFromCustomRole(ALERTING_GET_WORKFLOW_ACCESS)
)
)
val deleteUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), deleteUser, deleteUser)
val deleteUserClient = SecureRestClientBuilder(clusterHosts.toTypedArray(), isHttps(), deleteUser, password)
.setSocketTimeout(60000).build()

try {
Expand Down

0 comments on commit fc120af

Please sign in to comment.