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

Implement zstd test #676

Merged
merged 3 commits into from
Sep 10, 2020
Merged

Implement zstd test #676

merged 3 commits into from
Sep 10, 2020

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Sep 7, 2020

Description:

This PR includes the implementation of compress/zstd.go test cases.
It also include the changes to use the aliased object instead of the zstd package one, for example:

NewWriter(w io.Writer, opts ...zstd.EOption) (Encoder, error)
                            |
                            v
NewWriter(w io.Writer, opts ...EOption) (Encoder, error)

Related Issue:

How Has This Been Tested?:

Environment:

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

@kevindiu kevindiu requested a review from hlts2 September 7, 2020 07:19
@kevindiu
Copy link
Contributor Author

kevindiu commented Sep 7, 2020

/rebase

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 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

@pull-assistant
Copy link

pull-assistant bot commented Sep 7, 2020

Score: 0.97

Best reviewed: commit by commit


Optimal code review plan

     implement zstd test

     add comment

     remove unused code and fix e2e test

Powered by Pull Assistant. Last update 415726b ... 2f7a48b. Read the comment docs.

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 7, 2020

[REBASE] Rebase triggered by kevindiu for branch: test/internal/compress/zstd.go

@vdaas-ci vdaas-ci force-pushed the test/internal/compress/zstd.go branch from 479dcef to 3900e7a Compare September 7, 2020 07:20
@codecov
Copy link

codecov bot commented Sep 7, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #676      +/-   ##
==========================================
+ Coverage   15.36%   15.55%   +0.19%     
==========================================
  Files         412      412              
  Lines       21626    21626              
==========================================
+ Hits         3322     3365      +43     
+ Misses      18056    18021      -35     
+ Partials      248      240       -8     
Impacted Files Coverage Δ
internal/compress/zstd.go 100.00% <ø> (+69.35%) ⬆️

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 dc3563d...2f7a48b. Read the comment docs.

@hlts2
Copy link
Collaborator

hlts2 commented Sep 7, 2020

@kevindiu

thank you for your pr.
could you please fix e2e test to match the test template?

@kevindiu
Copy link
Contributor Author

kevindiu commented Sep 7, 2020

/format

@kevindiu kevindiu requested a review from hlts2 September 7, 2020 09:30
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 7, 2020

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

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Sep 7, 2020

[FORMAT] Failed to format.

hlts2
hlts2 previously approved these changes Sep 7, 2020
Copy link
Collaborator

@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
vankichi previously approved these changes Sep 10, 2020
@vankichi
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/compress/zstd.go

@vdaas-ci
Copy link
Collaborator

[REBASE] Failed to rebase.

if tc.vector[i] != decompressed[i] {
t.Fatalf("Invalid convert: origin %+v, compressed -> decompressed %+v", tc.vector, decompressed)
var (
zstdCompressorComparatorOptions = []comparator.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 🐶
zstdCompressorComparatorOptions is a global variable (gochecknoglobals)

@vankichi
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/compress/zstd.go

@vdaas-ci
Copy link
Collaborator

[REBASE] Failed to rebase.

@kevindiu kevindiu dismissed stale reviews from vankichi and hlts2 via 2f7a48b September 10, 2020 04:54
@kevindiu kevindiu force-pushed the test/internal/compress/zstd.go branch from b313b72 to 2f7a48b Compare September 10, 2020 04:54
@vankichi
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/compress/zstd.go

@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 b7bc99a into master Sep 10, 2020
@vankichi vankichi deleted the test/internal/compress/zstd.go branch September 10, 2020 09:21
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