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

Tweak integration tests #10

Merged

Conversation

Anviking
Copy link
Owner

@Anviking Anviking commented Nov 12, 2024

  • Use random TCP ports
  • Use random output files
  • Use goldenfile (has the practical UPDATE_GOLDENFILES=1 flag)

Have put the first commit in a separate PR to oura txpipe#829

Targets #8

Example failure output with goldenfile

(the differing 11 and 12 are underscored)

Skärmavbild 2024-11-12 kl  11 26 15

@Anviking Anviking self-assigned this Nov 12, 2024
- Use random TCP ports
- Use random output files
- Use goldenfile (has the practical UPDATE_GOLDENFILES=1 flag)
@Anviking Anviking force-pushed the anviking/integration-test-tweaks branch from 348186c to f32dded Compare November 12, 2024 10:16
@Anviking Anviking marked this pull request as ready for review November 12, 2024 10:16
@Anviking Anviking mentioned this pull request Nov 12, 2024
let rt = Runtime::new().unwrap();
let _ = rt.block_on(async move {
let addr = "127.0.0.1:4001".to_string();
let port: u16 = random_free_port().unwrap();
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -85,4 +85,6 @@ futures-util = "0.3"
bytes = "1.7.2"

[dev-dependencies]
assert_cmd = "2"
goldenfile = "1.7.3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

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

nice move with daemon separation! Also very good refactorings and usage of goldenfile plus using random port. Big kudos for the adopted simplifications 👏

@paweljakubas paweljakubas merged commit ca0cf6f into paweljakubas/integration-tests Nov 12, 2024
@paweljakubas paweljakubas deleted the anviking/integration-test-tweaks branch November 12, 2024 10:55
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.

2 participants