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 internal/file #550

Merged
merged 5 commits into from
Jul 7, 2020
Merged

Add test case for internal/file #550

merged 5 commits into from
Jul 7, 2020

Conversation

hlts2
Copy link
Contributor

@hlts2 hlts2 commented Jul 6, 2020

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

Description:

I added test case for internal/file.

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.14.3
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.11.5

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 6, 2020

Score: 0.98

Best reviewed: commit by commit


Optimal code review plan

     feat: test case

     fix: permission

     fix: apply suggestion

     fix: add comment

     fix: apply suggestion

Powered by Pull Assistant. Last update d4159ee ... 81d16f2. Read the comment docs.

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jul 6, 2020

[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 Jul 6, 2020

Codecov Report

Merging #550 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #550      +/-   ##
=========================================
+ Coverage    9.65%   9.70%   +0.05%     
=========================================
  Files         402     402              
  Lines       20859   20859              
=========================================
+ Hits         2013    2025      +12     
+ Misses      18593   18577      -16     
- Partials      253     257       +4     
Impacted Files Coverage Δ
internal/file/file.go 60.00% <ø> (+60.00%) ⬆️

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 c36a548...81d16f2. Read the comment docs.

@kevindiu
Copy link
Contributor

kevindiu commented Jul 6, 2020

the test is fail..

% go test ./...
--- FAIL: TestOpen (0.00s)
    --- FAIL: TestOpen/returns_*os.File_when_path_is_`test/data` (0.00s)
        file_test.go:125: error = open test/data: permission denied
FAIL
FAIL	github.com/vdaas/vald/internal/file	2.045s
ok  	github.com/vdaas/vald/internal/file/watch	1.746s
FAIL

@kevindiu
Copy link
Contributor

kevindiu commented Jul 6, 2020

Please add comment to the Open() function

@hlts2
Copy link
Contributor Author

hlts2 commented Jul 6, 2020

/rebase

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jul 6, 2020

[REBASE] Rebase triggered by hlts2 for branch: test/internal/file

kevindiu
kevindiu previously approved these changes Jul 7, 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 July 7, 2020 06:13
@vankichi
Copy link
Contributor

vankichi commented Jul 7, 2020

@hlts2 Could you please add comment of Open()?
https://github.com/vdaas/vald/blob/master/internal/file/file.go#L25

internal/file/file.go Outdated Show resolved Hide resolved
kevindiu
kevindiu previously approved these changes Jul 7, 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

vankichi
vankichi previously approved these changes Jul 7, 2020
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

vankichi commented Jul 7, 2020

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jul 7, 2020

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

hlts2 added 3 commits July 7, 2020 08:24
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>
hlts2 added 2 commits July 7, 2020 08:24
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jul 7, 2020

[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 94e4c6f into master Jul 7, 2020
@vankichi vankichi deleted the test/internal/file branch July 7, 2020 08:33
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