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 kairos server test hook #49

Merged
merged 8 commits into from
Apr 18, 2024
Merged

Add kairos server test hook #49

merged 8 commits into from
Apr 18, 2024

Conversation

marijanp
Copy link
Contributor

No description provided.

@marijanp marijanp self-assigned this Mar 22, 2024
@marijanp marijanp changed the base branch from add-kairos-test-utils to main March 22, 2024 22:04
@marijanp marijanp changed the base branch from main to add-kairos-test-utils March 22, 2024 22:05
@marijanp marijanp changed the base branch from add-kairos-test-utils to main March 25, 2024 14:43
flake.nix Outdated Show resolved Hide resolved
flake.nix Outdated Show resolved Hide resolved

impl Drop for Kairos {
fn drop(&mut self) {
let _ = self.process_handle.kill();
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment: This is not a graceful shutdown, but for testing it seems to be okay.

.spawn()
.expect("Failed to start the kairos-server");

wait_for_port(url.socket_addrs(|| Option::None).unwrap().first().unwrap())
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment: In the future we should introduce healtcheck mechanism - for example /health endpoint - because open port does not mean that server is ready to process requests.

Copy link
Contributor

@koxu1996 koxu1996 left a comment

Choose a reason for hiding this comment

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

Please go back to stable Rust, then I have no other concerns about this PR.

@marijanp marijanp marked this pull request as draft April 3, 2024 18:20
Copy link

github-actions bot commented Apr 15, 2024

File Coverage
All files 65%
kairos-tx/src/asn.rs 77%
kairos-tx/src/error.rs 0%
kairos-server/src/config.rs 0%
kairos-server/src/errors.rs 16%
kairos-server/src/utils.rs 22%
kairos-server/src/routes/deposit.rs 86%
kairos-server/src/routes/transfer.rs 73%
kairos-server/src/routes/withdraw.rs 91%
kairos-crypto/src/implementations/casper.rs 3%
kairos-test-utils/src/cctl/parsers.rs 66%
kairos-test-utils/src/cctl.rs 92%
kairos-test-utils/src/kairos.rs 95%
kairos-server/tests/transactions.rs 83%

Minimum allowed coverage is 60%

Generated by 🐒 cobertura-action against 6ffd7a9

@marijanp marijanp marked this pull request as ready for review April 15, 2024 14:31
@marijanp marijanp merged commit 0e409e3 into main Apr 18, 2024
7 checks passed
@marijanp marijanp deleted the add-kairos-server-test-hook branch April 18, 2024 16:17
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.

4 participants