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 cache test #576

Merged
merged 3 commits into from
Jul 15, 2020
Merged

add cache test #576

merged 3 commits into from
Jul 15, 2020

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Jul 13, 2020

Description:

This PR implements internal/cache test case.

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 Jul 13, 2020

Score: 0.94

Best reviewed: commit by commit


Optimal code review plan

     add cache test

     Update internal/cache/cache_test.go

     fix

Powered by Pull Assistant. Last update f27f280 ... c991bea. 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

@kevindiu
Copy link
Contributor Author

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by kevindiu for branch: test/internal/cache

@codecov
Copy link

codecov bot commented Jul 13, 2020

Codecov Report

Merging #576 into master will increase coverage by 0.10%.
The diff coverage is 54.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #576      +/-   ##
==========================================
+ Coverage   10.86%   10.97%   +0.10%     
==========================================
  Files         403      403              
  Lines       20939    20930       -9     
==========================================
+ Hits         2275     2297      +22     
+ Misses      18396    18364      -32     
- Partials      268      269       +1     
Impacted Files Coverage Δ
internal/cache/option.go 52.00% <50.00%> (+42.62%) ⬆️
internal/cache/cache.go 100.00% <100.00%> (+100.00%) ⬆️
internal/errgroup/group.go 93.42% <0.00%> (-1.32%) ⬇️
internal/file/watch/watch.go 92.03% <0.00%> (+0.88%) ⬆️

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 78db9e2...c991bea. Read the comment docs.

@@ -26,6 +26,13 @@ import (
"go.uber.org/goleak"
)

var (
// Goroutine leak is detected by `fastime`, but it should be ignored in the test because it is an external package.
goleakIgnoreOptions = []goleak.Option{
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 🐶
goleakIgnoreOptions is a global variable (gochecknoglobals)

@kevindiu kevindiu requested a review from hlts2 July 13, 2020 06:09
hlts2
hlts2 previously approved these changes Jul 13, 2020
Copy link
Contributor

@hlts2 hlts2 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
Copy link
Contributor

@kevindiu please confirm description and others required.

@kevindiu kevindiu marked this pull request as ready for review July 13, 2020 08:16
@vankichi
Copy link
Contributor

Could you add new case related this?

@vankichi
Copy link
Contributor

@kevindiu did you use old template?
I think we should use the latest template. @hlts2 how do you think about it ?

@kevindiu
Copy link
Contributor Author

Could you add new case related this?

I think it is untestable as the default options contains gache type and the WithType() blocks unknown type...

@kevindiu
Copy link
Contributor Author

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by kevindiu for branch: test/internal/cache

@kevindiu
Copy link
Contributor Author

@kevindiu did you use old template?
I think we should use the latest template. @hlts2 how do you think about it ?

yes I didn't re-generate the test code so i think it is using the old one.

@kevindiu
Copy link
Contributor Author

I will regenerate the test code later

@github-actions github-actions bot added size/L and removed size/M labels Jul 14, 2020
@vankichi
Copy link
Contributor

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/cache

kevindiu and others added 3 commits July 15, 2020 01:40
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

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

LGTM

@kevindiu kevindiu requested a review from vankichi July 15, 2020 05:38
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
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/cache

@vdaas-ci
Copy link
Collaborator

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

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 vankichi.

@vankichi vankichi merged commit 380c99e into master Jul 15, 2020
@vankichi vankichi deleted the test/internal/cache branch July 15, 2020 06:58
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