Skip to content

Commit

Permalink
feat: FTL-18486 run integration tests before release (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
maindotdev authored Dec 19, 2024
1 parent f59edf4 commit 494653e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/Clients/IotaClient/lib/Model/FetchIOTAVPResponseOK.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'correlation_id' => 'correlationId',
'presentation_submission' => 'presentation_submission',
'vp_token' => 'vp_token'
'presentation_submission' => 'presentationSubmission',
'vp_token' => 'vpToken'
];

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/Helpers/TestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ function getConfiguration()
'vpToken' => $_ENV['VP_TOKEN'],
'vc' => $_ENV['VERIFIABLE_CREDENTIAL'],
'vcInvalid' => $_ENV['VERIFIABLE_CREDENTIAL_INVALID'],
'expiredJwt' => $_ENV['EXPIRED_JWT'],
'invalidJwt' => $_ENV['INVALID_JWT'],
'issuanceData' => $_ENV['CREDENTIAL_ISSUANCE_DATA']
];
}
Expand Down
19 changes: 6 additions & 13 deletions tests/Integration/IotaClientIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,14 @@ public function testRedirectFlow()

$this->assertNotEmpty($resultJson);

// TODO: uncomment the below, once iota-service is fixed and clients are regenerated:
// FetchIOTAVPResponseOK Model should have vpToken and presentationSubmission instead of vp_token and presentation_submission

// // Assert that 'vpToken' key exists
// $this->assertArrayHasKey('vpToken', $resultJson, 'The response does not contain a "vpToken" key.');

// $vp = $resultJson['vpToken'];
// $vpJson = json_decode($vp, true);
$this->assertArrayHasKey('vpToken', $resultJson, 'The response does not contain a "vpToken" key.');

// // Assert that the count of credentials is greater than 0
// $credentialsCount = count($vpJson['verifiableCredential']);
// $this->assertGreaterThan(0, $credentialsCount, 'No VCs were returned in the response.');
$vp = $resultJson['vpToken'];
$vpJson = json_decode($vp, true);

// // NOTE: for debugging, no need printing email
// $email = $vpJson['verifiableCredential'][0]['credentialSubject']['email'];
// echo $email;
// Assert that the count of credentials is greater than 0
$credentialsCount = count($vpJson['verifiableCredential']);
$this->assertGreaterThan(0, $credentialsCount, 'No VCs were returned in the response.');
}
}

0 comments on commit 494653e

Please sign in to comment.