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

testing / Gateway e2e test #75

Merged
70 commits merged into from
Sep 22, 2023
Merged

testing / Gateway e2e test #75

70 commits merged into from
Sep 22, 2023

Conversation

ghost
Copy link

@ghost ghost commented Sep 20, 2023

includes additional changes:

  • update command babylonnode docker stop to not depend on the config.yaml but only on the specified docker-compose.yaml. Avoiding situations where you could not stop the docker-compose using the cli when the config.yaml has been changed.
  • removal of unused question DockerSetup.get_existing_compose_file(docker_config) in DETAILED mode. File was asked and loaded but no information was stored or transformed.
  • removal of forced platform: linux/amd64 in docker-compose template
  • Local unit test for PROMPT_FEEDER for quicker feedback than CI tests.
  • Extracting e2e tests for systemd and gateway setup into bash scripts for manual execution on fresh nodes
  • Adding of PROMPT_FEED for migration_release
  • Fix: respecting user input over defaults (was not the case when asking keystore directory or data directory)
  • Fix: actually error out when scripts fail. run_shell_command was previously just printing to exit but never actually exited.
  • Use common dependency function for docker dependencies and systemd dependencies to avoid installation of different docker runtime environments or forgetting ansible installation

@github-actions
Copy link

github-actions bot commented Sep 20, 2023

Test Results

45 tests  +1   39 ✔️ +1   18s ⏱️ -5s
  1 suites ±0     6 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit 00d2679. ± Comparison against base commit 913fed9.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Sep 20, 2023

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3637 2361 65% 0% 🟢

New Files

File Coverage Status
node-runner-cli/tests/unit/test_prompt_feeder_local.py 95% 🟢
TOTAL 95% 🟢

Modified Files

File Coverage Status
node-runner-cli/commands/dockercommand.py 48% 🟢
node-runner-cli/commands/monitoring.py 29% 🟢
node-runner-cli/commands/othercommands.py 86% 🟢
node-runner-cli/commands/systemdcommand.py 51% 🟢
node-runner-cli/setup/BaseSetup.py 53% 🟢
node-runner-cli/setup/DockerSetup.py 49% 🟢
node-runner-cli/setup/GatewaySetup.py 95% 🟢
node-runner-cli/tests/unit/test_docker.py 95% 🟢
node-runner-cli/utils/PromptFeeder.py 97% 🟢
node-runner-cli/utils/Prompts.py 67% 🟢
node-runner-cli/utils/utils.py 55% 🟢
TOTAL 66% 🟢

updated for commit: 00d2679 by action🐍

@github-actions github-actions bot removed the ansible label Sep 20, 2023
Kim Fehrs and others added 3 commits September 20, 2023 17:44
* fix docker installation when systemd

* running systemd dependencies command as part of the tests

* avois rootless

---------

Co-authored-by: Santiago Baldassin <santiago.baldassin@rdx.works>
@ghost ghost marked this pull request as ready for review September 22, 2023 12:10
docker system df
PGPASSWORD=$POSTGRES_PASSWORD psql -h localhost -U postgres -d radixdlt_ledger -P pager=off -c "\l+"
PGPASSWORD=$POSTGRES_PASSWORD psql -h localhost -U postgres -d radixdlt_ledger -P pager=off -c "select pg_size_pretty(pg_database_size('radixdlt_ledger'));"
PGPASSWORD=$POSTGRES_PASSWORD psql -h localhost -U postgres -d radixdlt_ledger -P pager=off -c "select pg_size_pretty(pg_database_size('radixdlt_ledger'));"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we running same query twice?

Copy link
Author

Choose a reason for hiding this comment

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

good point, that was supposed to be a different query

echo "Testing gateway endpoints available"

echo "Gateway endpoint"
curl -k -u "gateway:${NGINX_GATEWAY_PASSWORD}" https://localhost/gateway | jq
Copy link
Contributor

Choose a reason for hiding this comment

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

Does Jq fail with exit status that makes job fail?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why running this curl commands instead of cli commands?

Copy link
Author

Choose a reason for hiding this comment

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

Those commands do not have a cli version yet since they target the gateway. Good ticket for the future actually. Adding the gateway api commands to cli.

Copy link
Author

Choose a reason for hiding this comment

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

And yes, the jq will fail if the response is not a valid json. Which is the case if the endpoint is not available, authentication failed or similar.

It wont fail if the gateway returns a valid json that states something like this {status:"not ok"}.
I dont know how that response looks like yet.

@@ -0,0 +1,25 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

How are we running remote postgres?

Copy link
Author

Choose a reason for hiding this comment

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

currently not. I tried with the docker container. But with no success. I did not want to delete the prompts nor the bash script yet though, because they are still useful for testing manually or using external services.

@@ -109,7 +108,6 @@ services:
depends_on:
- database_migrations
image: {{gateway.data_aggregator.repo}}:{{gateway.data_aggregator.release}}
platform: linux/amd64
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why we had this ? Now we have arm images, hence we removing this line?

Copy link
Author

Choose a reason for hiding this comment

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

Yes exactly. I think I added it back in February because I was running the resulting docker-compose locally and there was no arm images available, resulting in "cant find the image"-error.

@ghost ghost merged commit 73b45f0 into main Sep 22, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant