Skip to content

Commit

Permalink
fix: some fix and enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
amagyar-iohk committed Sep 20, 2023
1 parent 0c6644f commit 5035e66
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
package io.iohk.atala.prism

import io.cucumber.junit.CucumberOptions
import io.iohk.atala.prism.configuration.Environment
import net.serenitybdd.cucumber.CucumberWithSerenity
import org.junit.BeforeClass
import org.junit.runner.RunWith

@RunWith(CucumberWithSerenity::class)
@CucumberOptions(
features = ["src/test/resources/features"],
plugin = ["pretty"]
)
class TestSuite
class TestSuite {
companion object {
@JvmStatic
@BeforeClass
fun setupEnvironment() {
Environment.setup()
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import kotlin.time.Duration.Companion.seconds
object Environment {
private val logger = Logger.get<Environment>()

val agentUrl: String
val mediatorOobUrl: String
lateinit var agentUrl: String
lateinit var mediatorOobUrl: String
lateinit var publishedDid: String
lateinit var schemaId: String

/**
* Set up the variables based on the properties config file
*/
init {
fun setup() {
// prepare notes
Notes.prepareNotes()

Expand Down Expand Up @@ -83,7 +83,7 @@ object Environment {
this.publishedDid = publishedDid!!
return
} catch (e: AssertionError) {
Notes.appendMessage("DID [${this.publishedDid}] not found. Creating a new one.")
Notes.appendMessage("DID [${publishedDid}] not found. Creating a new one.")
}

val publicKey = ManagedDIDKeyTemplate(
Expand Down Expand Up @@ -138,7 +138,7 @@ object Environment {
this.schemaId = schemaId!!
return
} catch (e: AssertionError) {
Notes.appendMessage("Schema [${this.schemaId}] not found. Creating a new one.")
Notes.appendMessage("Schema [${schemaId}] not found. Creating a new one.")
}

val schemaName = "automation-schema-" + UUID.randomUUID()
Expand Down

0 comments on commit 5035e66

Please sign in to comment.