Skip to content

Commit

Permalink
style: apply linters automatic fixes (#1222)
Browse files Browse the repository at this point in the history
Signed-off-by: Hyperledger Bot <[email protected]>
Co-authored-by: Hyperledger Bot <[email protected]>
  • Loading branch information
2 people authored and amagyar-iohk committed Jun 24, 2024
1 parent f606cd7 commit 2b580d5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import org.testcontainers.containers.ComposeContainer
import org.testcontainers.containers.wait.strategy.Wait
import java.io.*


data class Agent(
val version: String,
@ConfigAlias("http_port") val httpPort: Int,
Expand All @@ -18,7 +17,7 @@ data class Agent(
val keycloak: Keycloak?,
val vault: Vault?,
@ConfigAlias("keep_running") override val keepRunning: Boolean = false,
) : ServiceBase() {
) : ServiceBase() {

override val logServices = listOf("identus-cloud-agent")
override val container: ComposeContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ data class Vault(
mapOf(
"VAULT_PORT" to httpPort.toString(),

),
),
).waitingFor(
"vault",
Wait.forHealthcheck(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data class VerifiableDataRegistry(
@ConfigAlias("http_port") val httpPort: Int,
val version: String,
@ConfigAlias("keep_running") override val keepRunning: Boolean = false,
) : ServiceBase() {
) : ServiceBase() {
override val logServices: List<String> = listOf("prism-node")
private val vdrComposeFile = "src/test/resources/containers/vdr.yml"
override val container: ComposeContainer = ComposeContainer(File(vdrComposeFile)).withEnv(
Expand Down
2 changes: 0 additions & 2 deletions tests/integration-tests/src/test/kotlin/steps/Setup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import io.cucumber.java.AfterAll
import io.cucumber.java.BeforeAll
import io.restassured.RestAssured
import io.restassured.builder.RequestSpecBuilder
import net.serenitybdd.core.di.SerenityInfrastructure
import net.serenitybdd.screenplay.Actor
import net.serenitybdd.screenplay.actors.Cast
import net.serenitybdd.screenplay.actors.OnStage
import net.serenitybdd.screenplay.rest.abilities.CallAnApi
import net.thucydides.model.configuration.SystemPropertiesConfiguration
import org.apache.http.HttpStatus
import org.hyperledger.identus.client.models.CreateWalletRequest
import org.hyperledger.identus.client.models.CreateWebhookNotification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ class IssueCredentialsSteps {
fun holderReceivesCredentialOffer(holder: Actor) {
Wait.until(
errorMessage = "Holder was unable to receive the credential offer from Issuer! " +
"Protocol state did not achieve ${IssueCredentialRecord.ProtocolState.OFFER_RECEIVED} state.",
"Protocol state did not achieve ${IssueCredentialRecord.ProtocolState.OFFER_RECEIVED} state.",
) {
credentialEvent = ListenToEvents.with(holder).credentialEvents.lastOrNull {
it.data.thid == holder.recall<String>("thid")
}
credentialEvent != null &&
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.OFFER_RECEIVED
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.OFFER_RECEIVED
}

val recordId = ListenToEvents.with(holder).credentialEvents.last().data.recordId
Expand Down Expand Up @@ -193,7 +193,7 @@ class IssueCredentialsSteps {
it.data.thid == issuer.recall<String>("thid")
}
credentialEvent != null &&
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.REQUEST_RECEIVED
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.REQUEST_RECEIVED
}
val recordId = credentialEvent!!.data.recordId
issuer.attemptsTo(
Expand All @@ -206,29 +206,29 @@ class IssueCredentialsSteps {
Wait.until(
10.seconds,
errorMessage = "Issuer was unable to issue the credential! " +
"Protocol state did not achieve ${IssueCredentialRecord.ProtocolState.CREDENTIAL_SENT} state.",
"Protocol state did not achieve ${IssueCredentialRecord.ProtocolState.CREDENTIAL_SENT} state.",
) {
credentialEvent = ListenToEvents.with(issuer).credentialEvents.lastOrNull {
it.data.thid == issuer.recall<String>("thid")
}
issuer.remember("issuedCredential", credentialEvent!!.data)

credentialEvent != null &&
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.CREDENTIAL_SENT
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.CREDENTIAL_SENT
}
}

@Then("{actor} receives the issued credential")
fun bobHasTheCredentialIssued(holder: Actor) {
Wait.until(
errorMessage = "Holder was unable to receive the credential from Issuer! " +
"Protocol state did not achieve ${IssueCredentialRecord.ProtocolState.CREDENTIAL_RECEIVED} state.",
"Protocol state did not achieve ${IssueCredentialRecord.ProtocolState.CREDENTIAL_RECEIVED} state.",
) {
credentialEvent = ListenToEvents.with(holder).credentialEvents.lastOrNull {
it.data.thid == holder.recall<String>("thid")
}
credentialEvent != null &&
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.CREDENTIAL_RECEIVED
credentialEvent!!.data.protocolState == IssueCredentialRecord.ProtocolState.CREDENTIAL_RECEIVED
}
holder.remember("issuedCredential", ListenToEvents.with(holder).credentialEvents.last().data)
}
Expand Down

0 comments on commit 2b580d5

Please sign in to comment.