-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add new tests and refactoring (#1442)
Signed-off-by: Hyperledger Bot <hyperledger-bot@hyperledger.org> Signed-off-by: Allain Magyar <allain.magyar@iohk.io> Co-authored-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
- Loading branch information
1 parent
7839b95
commit 8781d3d
Showing
32 changed files
with
355 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
tests/integration-tests/src/test/kotlin/common/DidDocumentTemplate.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package common | ||
|
||
import org.hyperledger.identus.client.models.ManagedDIDKeyTemplate | ||
import org.hyperledger.identus.client.models.Service | ||
|
||
data class DidDocumentTemplate( | ||
val publicKeys: MutableList<ManagedDIDKeyTemplate>, | ||
val services: MutableList<Service>, | ||
) |
41 changes: 0 additions & 41 deletions
41
tests/integration-tests/src/test/kotlin/common/DidPurpose.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package common | ||
|
||
import org.hyperledger.identus.client.models.* | ||
|
||
enum class DidType { | ||
CUSTOM { | ||
override val documentTemplate get() = DidDocumentTemplate( | ||
publicKeys = mutableListOf(), | ||
services = mutableListOf(), | ||
) | ||
}, | ||
SD_JWT { | ||
override val documentTemplate get() = DidDocumentTemplate( | ||
publicKeys = mutableListOf( | ||
ManagedDIDKeyTemplate("auth-1", Purpose.AUTHENTICATION, Curve.ED25519), | ||
ManagedDIDKeyTemplate("assertion-1", Purpose.ASSERTION_METHOD, Curve.ED25519), | ||
), | ||
services = mutableListOf(), | ||
) | ||
}, | ||
JWT { | ||
override val documentTemplate get() = DidDocumentTemplate( | ||
publicKeys = mutableListOf( | ||
ManagedDIDKeyTemplate("auth-1", Purpose.AUTHENTICATION, Curve.SECP256K1), | ||
ManagedDIDKeyTemplate("auth-2", Purpose.AUTHENTICATION, Curve.ED25519), | ||
ManagedDIDKeyTemplate("assertion-1", Purpose.ASSERTION_METHOD, Curve.SECP256K1), | ||
ManagedDIDKeyTemplate("assertion-2", Purpose.ASSERTION_METHOD, Curve.ED25519), | ||
), | ||
services = mutableListOf(), | ||
) | ||
}, | ||
OIDC_JWT { | ||
override val documentTemplate get() = DidDocumentTemplate( | ||
publicKeys = mutableListOf( | ||
ManagedDIDKeyTemplate("auth-1", Purpose.AUTHENTICATION, Curve.SECP256K1), | ||
ManagedDIDKeyTemplate("auth-2", Purpose.AUTHENTICATION, Curve.ED25519), | ||
ManagedDIDKeyTemplate("assertion-1", Purpose.ASSERTION_METHOD, Curve.SECP256K1), | ||
), | ||
services = mutableListOf(), | ||
) | ||
}, | ||
ANONCRED { | ||
override val documentTemplate get() = DidDocumentTemplate( | ||
publicKeys = mutableListOf(), | ||
services = mutableListOf(), | ||
) | ||
}, ; | ||
|
||
abstract val documentTemplate: DidDocumentTemplate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.