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

nydusify: add some unit tests and add test coverage output #1246

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

adamqqqplay
Copy link
Member

  1. nydusify: add some unit test for pkg/utils and cmd/nydusify
  2. nydusify: add unit test coverage output
    Introduce make coverage to print coverage in console.

@adamqqqplay adamqqqplay requested a review from a team as a code owner April 23, 2023 08:33
@adamqqqplay adamqqqplay requested review from liubogithub and removed request for a team April 23, 2023 08:33
@anolis-bot
Copy link
Collaborator

@adamqqqplay , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/69614

@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Merging #1246 (05eb795) into master (f11391d) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1246      +/-   ##
==========================================
- Coverage   45.06%   45.05%   -0.01%     
==========================================
  Files         126      126              
  Lines       37395    37395              
  Branches    37395    37395              
==========================================
- Hits        16851    16850       -1     
- Misses      19656    19657       +1     
  Partials      888      888              

see 1 file with indirect coverage changes

@anolis-bot
Copy link
Collaborator

@adamqqqplay , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/69618

@anolis-bot
Copy link
Collaborator

@adamqqqplay , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@adamqqqplay , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@adamqqqplay , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/69769

@anolis-bot
Copy link
Collaborator

@adamqqqplay , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@cr-gpt
Copy link

cr-gpt bot commented Apr 25, 2023

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables for this repo. you could follow readme for more information

@anolis-bot
Copy link
Collaborator

@jiangliu , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/69953

@anolis-bot
Copy link
Collaborator

@jiangliu , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

"strings"
"testing"

"github.com/stretchr/testify/assert"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe use github.com/stretchr/testify/require to stop the test once the error happens.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, your suggestion is very useful.

contrib/nydusify/cmd/nydusify_test.go Outdated Show resolved Hide resolved
contrib/nydusify/cmd/nydusify_test.go Outdated Show resolved Hide resolved
contrib/nydusify/pkg/utils/utils_test.go Outdated Show resolved Hide resolved
1. Introduce `make coverage` to print coverage in console.

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>
Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>
@anolis-bot
Copy link
Collaborator

@adamqqqplay , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/70270

@anolis-bot
Copy link
Collaborator

@adamqqqplay , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@adamqqqplay adamqqqplay requested a review from imeoer April 28, 2023 01:50
@imeoer imeoer merged commit 35aa3a2 into dragonflyoss:master Apr 28, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants