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/compressor.go #870

Merged
merged 10 commits into from
Dec 18, 2020

Conversation

hlts2
Copy link
Collaborator

@hlts2 hlts2 commented Dec 7, 2020

Description:

I added test case for internal/errors/compressor.go.
And I refactored internal/errors/compressor.go.

grammar check passed

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.15.2
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.1

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.

@hlts2 hlts2 self-assigned this Dec 7, 2020
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Dec 7, 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

ErrDecompressFailed = New("decompress failed")

// ErrCompressorRegistererIsNotRunning represents a function to generate an error of compressor registerers not running.
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 🐶
line is 121 characters (lll)

}

// ErrCompressorRegistererChannelIsFull represents a function to generate an error that compressor registerer channel is full.
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 🐶
line is 127 characters (lll)

@@ -0,0 +1,221 @@
package errors
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 🐶
package should be errors_test instead of errors (testpackage)

@codecov
Copy link

codecov bot commented Dec 7, 2020

Codecov Report

Merging #870 (67d38f2) into master (8d62c74) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #870      +/-   ##
==========================================
+ Coverage   18.73%   18.84%   +0.11%     
==========================================
  Files         422      423       +1     
  Lines       19546    19600      +54     
==========================================
+ Hits         3662     3694      +32     
- Misses      15674    15688      +14     
- Partials      210      218       +8     
Impacted Files Coverage Δ
internal/errors/compressor.go 100.00% <100.00%> (+100.00%) ⬆️
internal/db/storage/blob/s3/reader/reader.go 65.51% <0.00%> (-32.19%) ⬇️
internal/worker/worker.go 81.25% <0.00%> (-1.05%) ⬇️
internal/net/net.go 85.18% <0.00%> (ø)
internal/errors/errors.go 15.78% <0.00%> (+12.28%) ⬆️

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 43caa54...9aa3013. Read the comment docs.

@hlts2 hlts2 requested a review from kevindiu December 7, 2020 06:02
kevindiu
kevindiu previously approved these changes Dec 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 December 7, 2020 09:43
internal/errors/compressor.go Outdated Show resolved Hide resolved
internal/errors/compressor.go Outdated Show resolved Hide resolved
internal/errors/compressor.go Outdated Show resolved Hide resolved
internal/errors/compressor_test.go Outdated Show resolved Hide resolved
internal/errors/compressor_test.go Show resolved Hide resolved
ErrDecompressFailed = New("decompress failed")

// ErrCompressorRegistererIsNotRunning represents a function to generate an error of compressor registerers not running.
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 🐶
line is 121 characters (lll)

ErrDecompressFailed = New("decompress failed")

// ErrCompressorRegistererIsNotRunning represents a function to generate an error of compressor registerers is not running.
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 🐶
line is 124 characters (lll)

kevindiu
kevindiu previously approved these changes Dec 17, 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 changed the title Add test for internal/errors/compressor.go Add test for internal/errors/compressor.go Dec 17, 2020
vankichi
vankichi previously approved these changes Dec 18, 2020
@vankichi
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/errors-compressor

@github-actions github-actions bot dismissed stale reviews from vankichi and kevindiu via c057c09 December 18, 2020 01:43
@github-actions github-actions bot force-pushed the test/internal/errors-compressor branch from 67d38f2 to c057c09 Compare December 18, 2020 01:43
@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 f8d5097 into master Dec 18, 2020
@vankichi vankichi deleted the test/internal/errors-compressor branch December 18, 2020 03:13
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