merge and fix tests
Some checks failed
Rhai Tests / Run Rhai Tests (push) Has been cancelled

This commit is contained in:
timurgordon
2025-05-23 21:46:11 +03:00
parent fedf957079
commit c0e11c6510
8 changed files with 106 additions and 26 deletions

View File

@@ -25,7 +25,7 @@ if create_key_space(space_name1, password) {
print("Testing creating keypairs in current space...");
let keypair1_name = "session_keypair1";
if create_keypair(keypair1_name, password) {
if create_keypair(keypair1_name) {
print(`✓ Keypair "${keypair1_name}" created successfully in space "${space_name1}"`);
} else {
print(`✗ Failed to create keypair "${keypair1_name}" in space "${space_name1}"`);
@@ -60,7 +60,7 @@ if create_key_space(space_name1, password) {
// Create a keypair in the second space
let keypair2_name = "session_keypair2";
if create_keypair(keypair2_name, password) {
if create_keypair(keypair2_name) {
print(`✓ Keypair "${keypair2_name}" created successfully in space "${space_name2}"`);
} else {
print(`✗ Failed to create keypair "${keypair2_name}" in space "${space_name2}"`);
@@ -109,7 +109,7 @@ if create_key_space(space_name1, password) {
// Attempt to create a keypair
let create_success = false;
try {
create_success = create_keypair("no_space_keypair", password);
create_success = create_keypair("test_keypair_2");
} catch(err) {
print(`✓ Caught expected error for creating keypair without active space: ${err}`);
}

View File

@@ -22,7 +22,7 @@ if create_key_space(space_name, password) {
print(`✓ Key space "${space_name}" created successfully`);
// Create sender keypair
if create_keypair(sender_name, password) {
if create_keypair(sender_name) {
print(`✓ Sender keypair "${sender_name}" created successfully`);
} else {
print(`✗ Failed to create sender keypair "${sender_name}"`);
@@ -30,7 +30,7 @@ if create_key_space(space_name, password) {
}
// Create recipient keypair
if create_keypair(recipient_name, password) {
if create_keypair(recipient_name) {
print(`✓ Recipient keypair "${recipient_name}" created successfully`);
} else {
print(`✗ Failed to create recipient keypair "${recipient_name}"`);

View File

@@ -28,7 +28,7 @@ try {
if create_key_space("test_space", "password") {
print("✓ Key space created successfully");
if create_keypair(keypair_name, "password") {
if create_keypair(keypair_name) {
print("✓ Keypair created successfully");
// Test getting the public key
@@ -82,11 +82,11 @@ try {
let keypair1_name = "keypair1";
let keypair2_name = "keypair2";
if create_keypair(keypair1_name, password) {
if create_keypair(keypair1_name) {
print(`✓ Keypair "${keypair1_name}" created successfully`);
}
if create_keypair(keypair2_name, password) {
if create_keypair(keypair2_name) {
print(`✓ Keypair "${keypair2_name}" created successfully`);
}
@@ -128,7 +128,7 @@ try {
print("Testing creating keypairs in current space...");
let keypair1_name = "session_keypair1";
if create_keypair(keypair1_name, password) {
if create_keypair(keypair1_name) {
print(`✓ Keypair "${keypair1_name}" created successfully in space "${space_name1}"`);
}
@@ -165,12 +165,12 @@ try {
print(`✓ Key space "${space_name}" created successfully`);
// Create sender keypair
if create_keypair(sender_name, password) {
if create_keypair(sender_name) {
print(`✓ Sender keypair "${sender_name}" created successfully`);
}
// Create recipient keypair
if create_keypair(recipient_name, password) {
if create_keypair(recipient_name) {
print(`✓ Recipient keypair "${recipient_name}" created successfully`);
}

View File

@@ -7,7 +7,7 @@
BASE_DIR="."
# Path to herodo executable (assuming debug build)
HERODO_CMD="../target/debug/herodo"
HERODO_CMD="$HOME/hero/bin/herodo"
# Define colors for output
GREEN='\033[0;32m'