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 case for s3/option.go #640

Merged
merged 7 commits into from
Aug 26, 2020

Conversation

hlts2
Copy link
Collaborator

@hlts2 hlts2 commented Aug 25, 2020

Signed-off-by: hlts2 [email protected]

Description:

I added test cases and refactored the WithReaderBackoffOpts of option.go.

Refactor Content

  • when opts equals nil, I fixed not to set nil. related
  • Add empty checking of FOP

=> author review required

Related Ticket:

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.14.4
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.0

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.

@pull-assistant
Copy link

pull-assistant bot commented Aug 25, 2020

Score: 0.99

Best reviewed: commit by commit


Optimal code review plan

     feat: add test case for option

     Update internal/db/storage/blob/s3/option_test.go

     Update internal/db/storage/blob/s3/option_test.go

     Update internal/db/storage/blob/s3/option_test.go

     fix: apply suggestion

     fix: refactor and test

     feat: add comment

Powered by Pull Assistant. Last update 827bbca ... fbf5ab6. Read the comment docs.

@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

@codecov
Copy link

codecov bot commented Aug 25, 2020

Codecov Report

Merging #640 into master will increase coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #640      +/-   ##
==========================================
+ Coverage   14.78%   14.97%   +0.18%     
==========================================
  Files         411      411              
  Lines       21532    21536       +4     
==========================================
+ Hits         3183     3224      +41     
+ Misses      18087    18050      -37     
  Partials      262      262              
Impacted Files Coverage Δ
internal/db/storage/blob/s3/option.go 100.00% <100.00%> (+97.50%) ⬆️
internal/worker/queue.go 98.55% <0.00%> (-1.45%) ⬇️
internal/worker/worker.go 84.54% <0.00%> (-0.91%) ⬇️

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 1d02c4e...fbf5ab6. Read the comment docs.

@hlts2 hlts2 marked this pull request as ready for review August 25, 2020 05:10
@hlts2 hlts2 requested a review from kevindiu August 25, 2020 05:10
@hlts2 hlts2 changed the title [WIP] Add test case for s3/option.go Add test case for s3/option.go Aug 25, 2020
kevindiu
kevindiu previously approved these changes Aug 25, 2020
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 requested a review from vankichi August 25, 2020 08:54
internal/db/storage/blob/s3/option_test.go Show resolved Hide resolved
internal/db/storage/blob/s3/option_test.go Outdated Show resolved Hide resolved
internal/db/storage/blob/s3/option_test.go Outdated Show resolved Hide resolved
internal/db/storage/blob/s3/option_test.go Show resolved Hide resolved
internal/db/storage/blob/s3/option_test.go Outdated Show resolved Hide resolved
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

Copy link
Contributor

@vankichi vankichi 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 requested review from a team and removed request for a team August 26, 2020 08:10
@vankichi vankichi requested review from kmrmt, kpango and rinx August 26, 2020 08:10
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

@kpango kpango merged commit c589e7e into master Aug 26, 2020
@kpango kpango deleted the test/internal/db_storage_blob_s3_session_option branch August 26, 2020 09:09
@vdaas-ci vdaas-ci mentioned this pull request Sep 2, 2020
18 tasks
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.

5 participants