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 pkg/agent/core/ngt/service/vqueue/option #1233

Merged

Conversation

hlts2
Copy link
Contributor

@hlts2 hlts2 commented May 17, 2021

Signed-off-by: hlts2 hiroto.funakoshi.hiroto@gmail.com

Description:

I added test code for pkg/agent/core/ngt/serice/vqueue/option.go and godoc comment.
And I refactored based on a document of option error handling and fixed ci fails error.

gramer check passed

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.16
  • 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.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /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

@codecov
Copy link

codecov bot commented May 17, 2021

Codecov Report

Merging #1233 (59c8071) into master (b18982b) will increase coverage by 0.06%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1233      +/-   ##
==========================================
+ Coverage   17.47%   17.53%   +0.06%     
==========================================
  Files         498      498              
  Lines       30835    30845      +10     
==========================================
+ Hits         5387     5409      +22     
+ Misses      25164    25157       -7     
+ Partials      284      279       -5     
Impacted Files Coverage Δ
pkg/agent/core/ngt/service/vqueue/queue.go 0.00% <0.00%> (ø)
pkg/agent/core/ngt/service/vqueue/option.go 100.00% <100.00%> (+100.00%) ⬆️
internal/worker/queue.go 95.00% <0.00%> (-3.34%) ⬇️
internal/worker/worker.go 83.33% <0.00%> (-1.05%) ⬇️

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 b18982b...59c8071. Read the comment docs.

pkg/agent/core/ngt/service/vqueue/option.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/service/vqueue/option.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/service/vqueue/option.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/service/vqueue/option.go Outdated Show resolved Hide resolved
@hlts2 hlts2 self-assigned this May 17, 2021
@hlts2 hlts2 changed the title Add test for pkg/agent/core/ngt/service/option Add test for pkg/agent/core/ngt/service/vqueue/option May 17, 2021
@hlts2 hlts2 requested review from kevindiu and vankichi May 17, 2021 02:59
pkg/agent/core/ngt/service/vqueue/option_test.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/service/vqueue/option_test.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/service/vqueue/option_test.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/service/vqueue/option_test.go Outdated Show resolved Hide resolved
@kevindiu
Copy link
Contributor

Please also refactor https://github.com/vdaas/vald/blob/master/pkg/agent/core/ngt/service/vqueue/queue.go#L85 to handle option error, otherwise if the option is invalid, the ngt may not work due to your changes.

@github-actions github-actions bot added size/XXL and removed size/XL labels May 19, 2021
kevindiu
kevindiu previously approved these changes May 19, 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

vankichi
vankichi previously approved these changes May 19, 2021
@kevindiu
Copy link
Contributor

/rebase
/format

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by kevindiu for branch: test/pkg/add-agent-core-ngt-service-vqueue-option-test

hlts2 added 6 commits May 24, 2021 01:15
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@vdaas-ci vdaas-ci dismissed stale reviews from vankichi and kevindiu via 59c8071 May 24, 2021 01:15
@vdaas-ci vdaas-ci force-pushed the test/pkg/add-agent-core-ngt-service-vqueue-option-test branch from 1fb52d4 to 59c8071 Compare May 24, 2021 01:15
@vdaas-ci
Copy link
Collaborator

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

@kevindiu
Copy link
Contributor

/approve

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.

@kevindiu kevindiu merged commit 4b9130d into master May 24, 2021
@kevindiu kevindiu deleted the test/pkg/add-agent-core-ngt-service-vqueue-option-test branch May 24, 2021 01:43
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