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 end-to-end testing for the dump command #646

Merged
merged 18 commits into from
Dec 22, 2023

Conversation

attilakreiner
Copy link
Contributor

Description

This commit adds end-to-end testing to the dump command that includes the builders, the pcap generation, runs tshark in docker with the lua dissector and the captures the output.

jfallows
jfallows previously approved these changes Dec 19, 2023
@attilakreiner attilakreiner marked this pull request as ready for review December 20, 2023 18:39
@@ -5,7 +5,7 @@ The `dump` command creates a `pcap` file that can be opened by Wireshark using t
This is the command to build a multi-arch `tshark` image and push it to a docker repository:

```bash
cd <zilla-source>/incubator/command-dump/src/test/resources/io/aklivity/zilla/runtime/command/dump/internal
cd <zilla-source>/incubator/command-dump/src/test/resources/io/aklivity/zilla/runtime/command/dump/internal/airline
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to have the Dockerfile in the test jar?
If not we can move this to src/test/docker instead so the instructions are a bit simpler.

Copy link
Contributor Author

@attilakreiner attilakreiner Dec 21, 2023

Choose a reason for hiding this comment

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

Yes, we need it. The setUp method here is implemented the way that it tries to find/pull the image first and if doesn't find it, then builds it on-the-fly.

ImageFromDockerfile image = new ImageFromDockerfile().withDockerfile(resourceToPath("Dockerfile"));

Comment on lines 106 to 107
<exclude>src/test/resources/io/aklivity/zilla/runtime/command/dump/internal/airline/*</exclude>
<exclude>src/test/resources/io/aklivity/zilla/runtime/command/dump/internal/airline/engine/*</exclude>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we scope the files a little more tightly so that new resources get caught automatically?
For example src/test/resources/**/*.pcap etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, pls chk

@jfallows jfallows merged commit 5faf7be into aklivity:develop Dec 22, 2023
5 checks passed
@attilakreiner attilakreiner deleted the dump-3 branch December 22, 2023 14:07
@jfallows jfallows added the enhancement New feature or request label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants