Skip to content

Commit

Permalink
fix: change to functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
murali-shris committed Dec 5, 2024
1 parent 3dec0cb commit 78d342b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/at_functional_test/test/enroll_verb_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,26 @@ void main() {
String selfKeyGetResponse = await socketConnection2
.sendRequestToServer('keys:get:keyName:$selfKey');
print('selfKeyGetResponse: $selfKeyGetResponse');
selfKeyGetResponse = selfKeyGetResponse.replaceFirst('data:', '');
var selfKeyResponseJson = jsonDecode(selfKeyGetResponse);
expect(selfKeyResponseJson['value'],
apkamEncryptedKeysMap['encryptedSelfEncKey']);
expect(selfKeyResponseJson['iv'], selfEncryptionKeyIV);

// keys:get:private should return private encryption key
var privateKey =
'$secondEnrollId.default_enc_private_key.__manage$firstAtSign';
String privateKeyResponse =
await socketConnection2.sendRequestToServer('keys:get:private');
expect(privateKeyResponse.contains(privateKey), true);
String privateKeyGetResponse = await socketConnection2
.sendRequestToServer('keys:get:keyName:$privateKey');
print('**privateKeyGetResponse: $privateKeyGetResponse');
privateKeyGetResponse = privateKeyGetResponse.replaceFirst('data:', '');
var privateKeyResponseJson = jsonDecode(privateKeyGetResponse);
expect(privateKeyResponseJson['value'],
apkamEncryptedKeysMap['encryptedDefaultEncPrivateKey']);
expect(privateKeyResponseJson['iv'], encryptionPrivateKeyIV);
});

test(
Expand Down

0 comments on commit 78d342b

Please sign in to comment.