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

test: add e2e test for json format #116

Merged
merged 6 commits into from
Jan 17, 2024

Conversation

rst0git
Copy link
Member

@rst0git rst0git commented Jan 10, 2024

This pull request adds a test case that verifies the output JSON format for checkpointctl.

@rst0git
Copy link
Member Author

rst0git commented Jan 10, 2024

cc: @Parthiba-Hazra

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (2f15c0b) 62.96% compared to head (436b6ef) 78.72%.

Files Patch % Lines
json.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #116       +/-   ##
===========================================
+ Coverage   62.96%   78.72%   +15.76%     
===========================================
  Files           7        7               
  Lines        1161     1161               
===========================================
+ Hits          731      914      +183     
+ Misses        388      185      -203     
- Partials       42       62       +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jan 10, 2024

Test Results

49 tests  +1   49 ✅ +1   1s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 436b6ef. ± Comparison against base commit 2f15c0b.

♻️ This comment has been updated with latest results.

@rst0git rst0git force-pushed the json-test branch 2 times, most recently from be1844e to 3e517e2 Compare January 10, 2024 20:29
@adrianreber
Copy link
Member

I see a coverage of 20% of json.go. Would a higher coverage require a more complex test process?

@rst0git
Copy link
Member Author

rst0git commented Jan 11, 2024

Would a higher coverage require a more complex test process?

Not necessarily. I will update the patch to extend the test coverage.

@rst0git rst0git force-pushed the json-test branch 5 times, most recently from f5feb90 to fc0687e Compare January 11, 2024 11:33
@rst0git
Copy link
Member Author

rst0git commented Jan 11, 2024

@adrianreber I've updated the pull request to increase test coverage.

test/piggie/piggie.c Outdated Show resolved Hide resolved
Environment variables with empty values (e.g., "FOO=") are valid.

Signed-off-by: Radostin Stoyanov <[email protected]>
Add support for command-line options to the piggie process.
This would allow us to extend the functionality with additional
options (e.g., tcp-socket).

Signed-off-by: Radostin Stoyanov <[email protected]>
This patch extends the 'piggie' test process with TCP client/server
that allows to improve the test coverage of checkpointctl inspect.

The iptables and iproute packages are needed for network locking and
to configure network namespace.

Signed-off-by: Radostin Stoyanov <[email protected]>
Add e2e tests to verify the JSON output of `checkpointctl inspect`.

Signed-off-by: Radostin Stoyanov <[email protected]>
Signed-off-by: Radostin Stoyanov <[email protected]>
@rst0git rst0git merged commit 311918e into checkpoint-restore:main Jan 17, 2024
10 checks passed
@rst0git rst0git deleted the json-test branch January 17, 2024 16:43
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