Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: apply linters automatic fixes #1222

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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