-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
* 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>
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'));" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 @@ | |||
--- |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
includes additional changes: