Skip to content

Commit

Permalink
ATL-6027: lint
Browse files Browse the repository at this point in the history
Signed-off-by: Bassam Riman <bassam.riman@iohk.io>
  • Loading branch information
CryptoKnightIOG committed Mar 11, 2024
1 parent 9d1a605 commit aab21a0
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 28 deletions.
1 change: 1 addition & 0 deletions tests/integration-tests/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.6.2
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package config

enum class AgentRole(val roleName: String) {
Admin("admin"),
Tenant("tenant"),
Tenant("tenant")
}
2 changes: 1 addition & 1 deletion tests/integration-tests/src/test/kotlin/config/Role.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ data class Role(
val token: String?,
val authHeader: String = "apikey",
val webhook: Webhook?,
val agentRole: AgentRole?,
val agentRole: AgentRole?
)
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ data class Agent(
"OPEN_ENTERPRISE_AGENT_VERSION" to version,
"API_KEY_ENABLED" to authEnabled.toString(),
"AGENT_DIDCOMM_PORT" to didcommPort.toString(),
"DIDCOMM_SERVICE_URL" to (didcommServiceUrl ?: "http://host.docker.internal:${didcommPort}"),
"DIDCOMM_SERVICE_URL" to (didcommServiceUrl ?: "http://host.docker.internal:$didcommPort"),
"AGENT_HTTP_PORT" to httpPort.toString(),
"REST_SERVICE_URL" to (restServiceUrl ?: "http://host.docker.internal:${httpPort}"),
"REST_SERVICE_URL" to (restServiceUrl ?: "http://host.docker.internal:$httpPort"),
"PRISM_NODE_PORT" to (prismNode?.httpPort?.toString() ?: ""),
"SECRET_STORAGE_BACKEND" to if (vault != null) "vault" else "postgres",
"VAULT_HTTP_PORT" to (vault?.httpPort?.toString() ?: ""),
Expand Down
6 changes: 3 additions & 3 deletions tests/integration-tests/src/test/kotlin/features/Init.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ fun initActors() {
.auth().oauth2(actor.recall("BEARER_TOKEN"))
.body(
CreateWalletRequest(
name = UUID.randomUUID().toString(),
),
name = UUID.randomUUID().toString()
)
)
.post("/wallets")
.then().statusCode(HttpStatus.SC_CREATED)
Expand Down Expand Up @@ -84,7 +84,7 @@ fun initActors() {
config.roles.forEach { role ->
cast.actorNamed(
role.name,
CallAnApi.at(role.url.toExternalForm()),
CallAnApi.at(role.url.toExternalForm())
)
}
if (config.services?.keycloak != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ import abilities.ListenToEvents
import common.Utils.wait
import interactions.Patch
import interactions.Post
import io.cucumber.java.en.Then
import io.cucumber.java.en.When
import io.iohk.atala.automation.extensions.get
import io.iohk.atala.automation.serenity.ensure.Ensure
import io.iohk.atala.prism.models.*
import models.AnoncredsSchema
import models.PresentationEvent
import net.serenitybdd.rest.SerenityRest
import net.serenitybdd.screenplay.Actor
import net.serenitybdd.screenplay.rest.abilities.CallAnApi
import org.apache.http.HttpStatus.SC_CREATED
import java.util.*

class AnoncredsPresentProofSteps {

Expand All @@ -33,15 +30,15 @@ class AnoncredsPresentProofSteps {
val anoncredsPresentationRequestV1 = AnoncredPresentationRequestV1(
requestedAttributes = mapOf(
"sex" to
AnoncredRequestedAttributeV1(
name = "sex",
restrictions = listOf(
mapOf(
("attr::sex::value" to "M"),
("cred_def_id" to credentialDefinitionId)
)
AnoncredRequestedAttributeV1(
name = "sex",
restrictions = listOf(
mapOf(
("attr::sex::value" to "M"),
("cred_def_id" to credentialDefinitionId)
)
)
)
),
requestedPredicates = mapOf(
"age" to AnoncredRequestedPredicateV1(
Expand Down Expand Up @@ -85,7 +82,7 @@ class AnoncredsPresentProofSteps {
it.data.thid == bob.recall<String>("thid")
}
proofEvent != null &&
proofEvent!!.data.status == PresentationStatus.Status.REQUEST_RECEIVED
proofEvent!!.data.status == PresentationStatus.Status.REQUEST_RECEIVED
},
"ERROR: Bob did not achieve any presentation request!"
)
Expand All @@ -96,15 +93,15 @@ class AnoncredsPresentProofSteps {
fun bobAcceptsTheAnoncredsPresentationWithProof(bob: Actor, faber: Actor) {
val requestPresentationAction = RequestPresentationAction(
anoncredPresentationRequest =
AnoncredCredentialProofsV1(
listOf(
AnoncredCredentialProofV1(
bob.recall<IssueCredentialRecord>("issuedCredential").recordId,
listOf("sex"),
listOf("age")
)
AnoncredCredentialProofsV1(
listOf(
AnoncredCredentialProofV1(
bob.recall<IssueCredentialRecord>("issuedCredential").recordId,
listOf("sex"),
listOf("age")
)
),
)
),
action = RequestPresentationAction.Action.REQUEST_MINUS_ACCEPT
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,4 @@ class SystemSteps {
Ensure.that(metricsResponse.body.asString()).contains("issuance_flow_did_com_exchange_job_ms_gauge")
)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import io.cucumber.java.en.Then
import io.cucumber.java.en.When
import io.iohk.atala.automation.extensions.get
import io.iohk.atala.automation.serenity.ensure.Ensure
import io.iohk.atala.prism.models.VerificationPolicyResponse
import io.iohk.atala.prism.models.VerificationPolicyInput
import io.iohk.atala.prism.models.VerificationPolicyResponse
import net.serenitybdd.rest.SerenityRest
import net.serenitybdd.screenplay.Actor
import org.apache.http.HttpStatus
Expand Down

0 comments on commit aab21a0

Please sign in to comment.