Skip to content

Commit

Permalink
chore: clean unnecesary logic, tried to fix instrumented tests with n…
Browse files Browse the repository at this point in the history
…o luck

Signed-off-by: Cristian G <cristian.castro@iohk.io>
  • Loading branch information
cristianIOHK committed Jun 13, 2024
1 parent 75b7ccc commit 7ea8380
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package org.hyperledger.identus.walletsdk.edgeagent

import androidx.test.ext.junit.runners.AndroidJUnit4
import anoncreds_wrapper.LinkSecret
import io.iohk.atala.prism.apollo.base64.base64UrlDecoded
import io.iohk.atala.prism.apollo.derivation.MnemonicHelper
import io.ktor.http.HttpHeaders
import io.ktor.http.HttpMethod
Expand Down Expand Up @@ -306,9 +307,9 @@ class AnoncredsTests {
kotlin.test.assertEquals(CredentialType.ANONCREDS_REQUEST.type, attachmentDescriptor.mediaType)
val attachmentData = attachmentDescriptor.data
kotlin.test.assertTrue(attachmentData is AttachmentBase64)
// kotlin.test.assertEquals(
// testVerifiablePresentationJWTPayload,
// attachmentData.base64.base64UrlDecoded
// )
kotlin.test.assertEquals(
"""{"proof":{"proofs":[{"primary_proof":{"eq_proof":{"revealed_attrs":{"emailaddress":"36342383745538684791930503362573944243706207518759025169102837001334611372743"},"a_prime":"75555599320691856351002972790964507743259608799396184344541696893471394637127661939470559055918400174600131162403902596806596008037621766104791274925032891134701359471250733811908862880124623622242646384164278841055189223972708751492017036866916847588899478898728314035320150302493869790982703003850423661862339103092932633667516260864687128185531093313871255430583387984517355504369857263612298472789490874757171316625504597781037042278637608080636066165201520547060396966112808052785924020601967821019837389041906479005692215847269872005449075302808340654866856255802767116919380985225243056849027137376681486582818","e":"100209177101521786682966134789533254422493451234537776082122164864760143387363230695309523042705784158918390705825652518669765836825203300","v":"178331476818659778072467986471866901191865973623150536757942080391196938867935526828163027831511137197891851370559015025357666731692706289563286494791781085902083939496765766651104576034528336681252799236247545042184133208240068562495956159754425007937837602741653267622541250674720264352025503083012557027138141741293598605546831092472150528307355618171751114430318689977096313288777637274411399936314200224678819344062056758865963103087657338600103094924383937537529951015221895722357870253910771118533348193011795013960937036008661938550218041455310853245639082489059752257272669724527838029498543653660034107865481209867751760440427040180496081508913385558471621692036568068279072627156348544149495262368811645487015170909867100196391118996977840178134078380584448186166822157017733830215855864150659242469386817146447989894502256527298339416469229026703699310300548915155380284652056194208462615712186659482961423470","m":{"master_secret":"12739681732295460153552221477146176923590602923858978282154069826992077112093445380370500844894360788399835625886830285816036458101692053486036566205496472537158262999356942308039"},"m2":"10730637363968976197425244567493130875694075891202685347735030524663013637337424174462499881076744797950636739776103538770381430136299181982622169683133641116517401540150700947125"},"ge_proofs":[]},"non_revoc_proof":null}],"aggregated_proof":{"c_hash":"29595499927648919440579888790113482165197154350717253781719126431885310271465","c_list":[[2,86,132,0,176,23,192,204,104,15,117,0,48,179,251,30,245,63,67,177,163,195,38,165,138,223,241,244,113,242,194,129,215,89,0,135,102,70,221,154,200,49,40,42,162,162,229,9,229,206,85,96,8,150,33,239,177,1,187,189,133,171,34,95,195,15,35,239,29,57,173,137,254,218,90,137,57,126,50,78,195,132,62,110,116,146,169,166,67,131,26,89,175,207,90,64,127,138,103,18,254,211,252,54,214,134,115,211,151,212,124,247,127,85,77,13,159,143,17,129,100,103,30,65,100,8,182,184,210,188,224,182,206,115,96,97,128,217,245,107,60,30,167,111,212,133,173,170,150,219,62,132,245,234,231,4,30,179,123,50,222,134,181,49,219,25,92,155,26,252,54,131,184,50,158,182,235,55,117,35,123,144,182,29,36,91,243,165,63,154,0,146,80,207,45,56,245,23,244,127,171,214,220,14,54,31,65,64,80,29,166,167,101,49,42,145,214,244,216,8,41,202,227,198,98,183,170,232,36,183,190,122,120,14,160,116,54,60,241,100,133,42,210,173,47,210,113,235,206,217,147,228,238,212,154,4,34]]}},"requested_proof":{"revealed_attrs":{"attribute1":{"sub_proof_index":0,"raw":"cristian.castro@iohk.io","encoded":"36342383745538684791930503362573944243706207518759025169102837001334611372743"}},"self_attested_attrs":{},"unrevealed_attrs":{},"predicates":{}},"identifiers":[{"schema_id":"http://host.docker.internal:8000/prism-agent/schema-registry/schemas/f52ebc61-6146-3238-99c5-a3fd693b96f7/schema","cred_def_id":"http://192.168.68.113:8000/prism-agent/credential-definition-registry/definitions/3f4ea098-87b6-302a-a726-f93fe938cf24/definition","rev_reg_id":null,"timestamp":null}]}""",
attachmentData.base64.base64UrlDecoded
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ class PolluxImpl(
requestedAttribute = requestedAttributes,
requestedPredicate = requestedPredicate
)
val schemaId = credential.schemaID.replace("host.docker.internal", "192.168.68.113")
val schemaId = credential.schemaID
// When testing using a local instance of an agent, we need to replace the host.docker.internal with the local IP
// .replace("host.docker.internal", "192.168.68.114")
val schema = getSchema(schemaId)

val schemaMap: Map<SchemaId, Schema> = mapOf(Pair(credential.schemaID, schema))

val credDefId = credential.credentialDefinitionID.replace("host.docker.internal", "192.168.68.113")
val credDefId = credential.credentialDefinitionID
// When testing using a local instance of an agent, we need to replace the host.docker.internal with the local IP
// .replace("host.docker.internal", "192.168.68.114")
val credentialDefinition = getCredentialDefinition(credDefId)
Expand Down

0 comments on commit 7ea8380

Please sign in to comment.