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 test for internal/errors/runner #1007

Merged
merged 2 commits into from
Feb 18, 2021

Conversation

vankichi
Copy link
Contributor

@vankichi vankichi commented Feb 16, 2021

Signed-off-by: vankichi kyukawa315@gmail.com

Description:

I added the unit tests for internal/errors/runner.go
Also, add a comment for each function of internal/errors/runner.go
grammar check has passed.

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.15.8
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.3

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@vankichi vankichi self-assigned this Feb 16, 2021
@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

tests := []test{
func() test {
err := New("runner Start error")
name := "gateway"
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string gateway has 6 occurrences, make it a constant (goconst)

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #1007 (3997c5d) into master (9394142) will increase coverage by 0.18%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1007      +/-   ##
==========================================
+ Coverage   14.48%   14.67%   +0.18%     
==========================================
  Files         494      495       +1     
  Lines       28300    28363      +63     
==========================================
+ Hits         4098     4161      +63     
+ Misses      23956    23953       -3     
- Partials      246      249       +3     
Impacted Files Coverage Δ
internal/errors/runner.go 100.00% <ø> (+100.00%) ⬆️
internal/net/net.go 74.60% <0.00%> (ø)
internal/worker/worker.go 83.33% <0.00%> (+1.04%) ⬆️
internal/errgroup/group.go 93.93% <0.00%> (+1.51%) ⬆️

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 15f5c99...69da5a9. Read the comment docs.

@vankichi vankichi changed the title [WIP] add test for internal/errors/runner add test for internal/errors/runner Feb 16, 2021
@vankichi vankichi marked this pull request as ready for review February 16, 2021 06:14
kevindiu
kevindiu previously approved these changes Feb 18, 2021
Copy link
Contributor

@kevindiu kevindiu left a comment

Choose a reason for hiding this comment

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

LGTM

hlts2
hlts2 previously approved these changes Feb 18, 2021
@kevindiu
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by kevindiu for branch: test/internal/add-errors-runner-unit-test

Signed-off-by: vankichi <kyukawa315@gmail.com>
@vdaas-ci vdaas-ci dismissed stale reviews from hlts2 and kevindiu via 6ba08aa February 18, 2021 08:16
@vdaas-ci vdaas-ci force-pushed the test/internal/add-errors-runner-unit-test branch from b9606b8 to 6ba08aa Compare February 18, 2021 08:16
@vdaas-ci
Copy link
Collaborator

[FORMAT] Updating license headers and formatting go codes triggered by kevindiu.

Copy link
Collaborator

@vdaas-ci vdaas-ci left a comment

Choose a reason for hiding this comment

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

[APPROVED] This PR is approved by kevindiu.

tests := []test{
func() test {
err := New("runner Start error")
name := "gateway"
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string gateway has 6 occurrences, make it a constant (goconst)

@kevindiu kevindiu merged commit d113363 into master Feb 18, 2021
@kevindiu kevindiu deleted the test/internal/add-errors-runner-unit-test branch February 18, 2021 08:26
@vdaas-ci vdaas-ci mentioned this pull request Feb 19, 2021
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.

4 participants