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 UTs for runtime handler #125

Merged

Conversation

saintube
Copy link
Member

@saintube saintube commented May 6, 2022

Signed-off-by: saintube saintube@foxmail.com

Ⅰ. Describe what this PR does

add unit tests for package pkg/runtime

Ⅱ. Does this pull request fix one issue?

fixes #69

Ⅲ. Describe how to verify it

run UTs and see the rise of code coverage

Ⅳ. Special notes for reviews

none

@saintube saintube force-pushed the add-UTs-for-runtime-handler branch 2 times, most recently from f727f42 to 7e25404 Compare May 6, 2022 12:42
Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

nice work, only few suggestions.

pkg/runtime/handler/docker_runtime.go Outdated Show resolved Hide resolved
pkg/runtime/handler/docker_runtime.go Outdated Show resolved Hide resolved
pkg/runtime/handler/docker_runtime.go Outdated Show resolved Hide resolved
pkg/runtime/handler/docker_runtime.go Outdated Show resolved Hide resolved
pkg/runtime/handler/docker_runtime.go Outdated Show resolved Hide resolved
pkg/runtime/handler/docker_runtime.go Outdated Show resolved Hide resolved
Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the add-UTs-for-runtime-handler branch from 7e25404 to 078ba0c Compare May 7, 2022 00:50
@codecov-commenter
Copy link

codecov-commenter commented May 7, 2022

Codecov Report

Merging #125 (078ba0c) into main (ee19dce) will increase coverage by 2.10%.
The diff coverage is 92.85%.

@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
+ Coverage   54.29%   56.39%   +2.10%     
==========================================
  Files          78       78              
  Lines        7347     7364      +17     
==========================================
+ Hits         3989     4153     +164     
+ Misses       3001     2838     -163     
- Partials      357      373      +16     
Flag Coverage Δ
unittests 56.39% <92.85%> (+2.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/runtime/handler/containerd_runtime.go 61.11% <25.00%> (+61.11%) ⬆️
pkg/runtime/handler/docker_runtime.go 90.47% <100.00%> (+90.47%) ⬆️
pkg/runtime/runtime.go 76.47% <100.00%> (+76.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee19dce...078ba0c. Read the comment docs.

@saintube saintube requested a review from jasonliu747 May 7, 2022 00:52
Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

/lgtm
other PTAL

@hormes
Copy link
Member

hormes commented May 7, 2022

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit 23b491b into koordinator-sh:main May 7, 2022
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.

[BUG] lack of unit, integration and functional test
4 participants