Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add automated tests for presearch and algorand #3030

Merged

Conversation

A-Harby
Copy link
Contributor

@A-Harby A-Harby commented Jun 25, 2024

Description

Add the automated tests for algorand and presearch application, (following same code struture as #2890).

The tests are different in that they ssh to the deployed VM and assert that the application is running with the correct version and network.

Copy link
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried running Algorand test and it failed w this err. Is this normal? Same with Presearch.

image

@A-Harby
Copy link
Contributor Author

A-Harby commented Jun 27, 2024

I tried running Algorand test and it failed w this err. Is this normal? Same with Presearch.

image

Did you use the correct SSH key type? You should use the ssh-ed25519 not the normal one.
And mention it in the docs here.

Copy link
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test would fail if SSH key needs permission.

image

Copy link
Contributor

@0oM4R 0oM4R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

this package may help

Copy link
Contributor

@0oM4R 0oM4R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and please notice that the current logic overwrite the provided config if one of the mnemonic, network, or ssh_key are not provided in env.

we may change that logic to get the missing only form config.json or make sure to provide all configs in one place

also if we keep this logic, we have to export all config if we want to read the ssh_key from .ssh dir

if (!network || !mnemonic || !ssh_key) {
console.log("Credentials not all found in env variables. Loading all credentials from default config.json...");
config = JSON.parse(fs.readFileSync(path.join(__dirname, "./config.json"), "utf-8"));
} else {
console.log("Credentials loaded from env variables...");
config = {
network: network,
mnemonic: mnemonic,
storeSecret: storeSecret,
ssh_key: ssh_key,
};
}

… only get non null values, and added the timeout duration
@A-Harby A-Harby requested a review from 0oM4R July 2, 2024 15:17
Copy link
Contributor

@0oM4R 0oM4R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

presearch failed

@A-Harby A-Harby requested a review from 0oM4R July 15, 2024 10:10
@0oM4R
Copy link
Contributor

0oM4R commented Jul 23, 2024

can you please validate if the machine that runs these tests has ygg installed and configured,
I forgot to install ygg and got some connection errors, It was unclear if it came from the deployment or from my side

@A-Harby
Copy link
Contributor Author

A-Harby commented Jul 23, 2024

can you please validate if the machine that runs these tests has ygg installed and configured, I forgot to install ygg and got some connection errors, It was unclear if it came from the deployment or from my side

As we discussed, I'm going to mention that on the Readme to make sure that ygg is needed to be installed with all of the other needed packages.

Also, I added a few tries in the trim of the Docker hash: a3b4659.

And I have added the required notes here: e8e35cb.

@A-Harby A-Harby requested a review from zaelgohary July 29, 2024 11:40
Copy link
Contributor

@zaelgohary zaelgohary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! @A-Harby

@A-Harby A-Harby merged commit 7f73cac into development Jul 29, 2024
9 checks passed
@A-Harby A-Harby deleted the development_add_algorand_presearch_automated_test branch July 29, 2024 12:16
@xmonader xmonader added this to the 2.6.0 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants