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

Generate empty test using /gen-test ChatOpts command #2005

Merged
merged 14 commits into from
Apr 13, 2023
Merged

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Apr 11, 2023

Description:

This PR generate test files using ChatOpts command /gen-test.
This PR also removes the failed test implementation due to unsupported generic test function by gotests.
These tests will be implemented in the next PR.

I also tested to regenerate unimplemented test is working in this PR, to simulate the test template changes which affect all unimplemented test.

It is performed by the following steps.

  1. Use ChatOpts command /gen-test to generate empty test file
  2. Modify 1 unimplemented test
  3. Generate test file by using /gen-test command again to re-generate test
  4. Verify the last commit wether if it includes the modified changes

Related Issue:

Versions:

  • Go Version: 1.20.3
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 2.0.9

Checklist:

Special notes for your reviewer:

Please mainly review this commit:
e4970bd

All other commits are generated by ChatOpts.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@kevindiu
Copy link
Contributor Author

/gen-test

@vdaas-ci
Copy link
Collaborator

[GEN TEST] Generating missing test files triggered by kevindiu.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 11, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 339cea4
Status: ✅  Deploy successful!
Preview URL: https://d035465c.vald.pages.dev
Branch Preview URL: https://test-gen-empty-test.vald.pages.dev

View logs

dns string
opts []grpc.Option
port int
addrs atomic.Pointer[[]string]
Copy link

Choose a reason for hiding this comment

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

20% of developers fix this issue

typecheck: undefined: atomic.Pointer

❗❗ 8 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
internal/client/v1/client/discoverer/discover_test.go 296
internal/log/log_test.go 28
internal/log/log_test.go 27
internal/net/grpc/stream_test.go 35
internal/net/grpc/pool/pool_test.go 121
internal/slices/slices_test.go 13
internal/slices/slices_test.go 93
internal/slices/slices_test.go 94

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

return nil
}
tests := []test{
// TODO test cases
Copy link

Choose a reason for hiding this comment

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

godox: cmd/tools/cli/vdctl/main_test.go:40: Line contains TODO/BUG/FIXME: "TODO test cases"

❗❗ 33 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
cmd/tools/cli/vdctl/main_test.go 55
internal/errors/blob_test.go 607
internal/errors/blob_test.go 625
internal/errors/blob_test.go 695
internal/errors/blob_test.go 713
internal/errors/circuitbreaker_test.go 47
internal/errors/circuitbreaker_test.go 65
internal/errors/circuitbreaker_test.go 132
internal/errors/circuitbreaker_test.go 150
internal/errors/circuitbreaker_test.go 220

Showing 10 of 33 findings. Visit the Lift Web Console to see all.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

afterFunc func(*testing.T)
}
defaultCheckFunc := func(w want, got []error) error {
if !reflect.DeepEqual(got, w.want) {
Copy link

Choose a reason for hiding this comment

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

govet: deepequalerrors: avoid using reflect.DeepEqual with errors

❗❗ 6 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
cmd/tools/cli/vdctl/main_test.go 29
internal/errors/circuitbreaker_test.go 103
internal/errors/circuitbreaker_test.go 279
internal/errors/circuitbreaker_test.go 364
internal/errors/circuitbreaker_test.go 540
internal/errors/errors_test.go 1666

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]


for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
Copy link

Choose a reason for hiding this comment

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

varnamelen: parameter name 'tt' is too short for the scope of its usage


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@kevindiu
Copy link
Contributor Author

test message

@kevindiu
Copy link
Contributor Author

/gen-test

@vdaas-ci
Copy link
Collaborator

[GEN TEST] Generating missing test files triggered by kevindiu.

@kevindiu kevindiu changed the title [WIP] Generate empty test using ChatOpts [WIP] Generate empty test using /gen-test ChatOpts command Apr 11, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

golangci

internal/errors/errors_test.go|1713| internal/errors/errors_test.go:1713: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/errors_test.go|1780| internal/errors/errors_test.go:1780: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/errors_test.go|1798| internal/errors/errors_test.go:1798: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/errors_test.go|1868| internal/errors/errors_test.go:1868: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/errors_test.go|1886| internal/errors/errors_test.go:1886: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/file_test.go|273| internal/errors/file_test.go:273: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/file_test.go|292| internal/errors/file_test.go:292: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/ngt_test.go|1452| internal/errors/ngt_test.go:1452: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/ngt_test.go|1470| internal/errors/ngt_test.go:1470: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/ngt_test.go|1537| internal/errors/ngt_test.go:1537: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/ngt_test.go|1555| internal/errors/ngt_test.go:1555: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/redis_test.go|967| internal/errors/redis_test.go:967: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/errors/redis_test.go|985| internal/errors/redis_test.go:985: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|862| internal/log/mock/logger_test.go:862: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|893| internal/log/mock/logger_test.go:893: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|994| internal/log/mock/logger_test.go:994: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1025| internal/log/mock/logger_test.go:1025: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1126| internal/log/mock/logger_test.go:1126: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1157| internal/log/mock/logger_test.go:1157: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1258| internal/log/mock/logger_test.go:1258: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1289| internal/log/mock/logger_test.go:1289: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1390| internal/log/mock/logger_test.go:1390: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1421| internal/log/mock/logger_test.go:1421: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1522| internal/log/mock/logger_test.go:1522: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/log/mock/logger_test.go|1549| internal/log/mock/logger_test.go:1549: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/observability/attribute/attribute_test.go|49| internal/observability/attribute/attribute_test.go:49: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/observability/attribute/attribute_test.go|68| internal/observability/attribute/attribute_test.go:68: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/io/io_test.go|885 col 3| field e is unused (unused)
internal/db/storage/blob/s3/reader/io/io_test.go|115 col 3| field c is unused (unused)
internal/db/storage/blob/s3/reader/io/io_test.go|209 col 3| field c is unused (unused)
internal/observability/metrics/runtime/cgo/cgo_test.go|109 col 3| field c is unused (unused)
internal/observability/metrics/grpc/grpc_test.go|109 col 3| field g is unused (unused)
internal/observability/metrics/grpc/grpc_test.go|193 col 3| field g is unused (unused)
internal/observability/metrics/mem/index/index_test.go|109 col 3| field m is unused (unused)
internal/observability/metrics/mem/index/index_test.go|193 col 3| field m is unused (unused)
internal/observability/metrics/runtime/goroutine/goroutine_test.go|109 col 3| field g is unused (unused)
internal/observability/trace/trace_test.go|226 col 3| field tr is unused (unused)
internal/backoff/backoff_test.go|607 col 3| found a struct that contains a context.Context field (containedctx)
internal/backoff/context_test.go|16 col 3| found a struct that contains a context.Context field (containedctx)
cmd/agent/core/ngt/main_test.go|30 col 12| fieldalignment: struct with 40 pointer bytes could be 32 (govet)
cmd/agent/sidecar/main_test.go|30 col 12| fieldalignment: struct with 40 pointer bytes could be 32 (govet)
hack/helm/schema/crd/main_test.go|107 col 12| fieldalignment: struct with 80 pointer bytes could be 64 (govet)
hack/helm/schema/crd/main_test.go|195 col 12| fieldalignment: struct with 88 pointer bytes could be 72 (govet)
hack/helm/schema/crd/main_test.go|284 col 12| fieldalignment: struct with 88 pointer bytes could be 72 (govet)
hack/helm/schema/crd/main_test.go|372 col 12| fieldalignment: struct with 56 pointer bytes could be 48 (govet)
hack/helm/schema/crd/main_test.go|458 col 12| fieldalignment: struct with 80 pointer bytes could be 64 (govet)
hack/helm/schema/gen/main_test.go|106 col 12| fieldalignment: struct with 72 pointer bytes could be 64 (govet)
hack/helm/schema/gen/main_test.go|193 col 12| fieldalignment: struct with 112 pointer bytes could be 96 (govet)
internal/client/v1/client/discoverer/discover_test.go|1396 col 22| Info_Nodes contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/discoverer/discover_test.go|1404 col 34| Info_Nodes contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/discoverer/discover_test.go|1408 col 53| Info_Nodes contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/filter/egress/client_test.go|535 col 17| Object_Distance contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/filter/egress/client_test.go|543 col 20| Object_Distance contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/filter/egress/client_test.go|871 col 17| Object_Vector contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/filter/egress/client_test.go|879 col 20| Object_Vector contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/filter/ingress/client_test.go|535 col 17| Object_Blob contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/filter/ingress/client_test.go|759 col 17| Object_Blob contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/filter/ingress/client_test.go|983 col 17| Object_Blob contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|511 col 17| Object_ID contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|519 col 20| Object_ID contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|623 col 17| Search_Request contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|631 col 20| Search_Response contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|639 col 34| Search_Response contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|735 col 17| Search_IDRequest contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|854 col 16| Search_StreamSearchClient contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
internal/client/v1/client/vald/vald_test.go|862 col 30| Search_StreamSearchClient contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
cmd/agent/core/ngt/main_test.go|76 col 25| parameter name 'tt' is too short for the scope of its usage (varnamelen)
cmd/agent/sidecar/main_test.go|76 col 25| parameter name 'tt' is too short for the scope of its usage (varnamelen)
cmd/discoverer/k8s/main_test.go|76 col 25| parameter name 'tt' is too short for the scope of its usage (varnamelen)
internal/circuitbreaker/breaker_test.go|682 col 4| variable name 'b' is too short for the scope of its usage (varnamelen)

internal/log/log_test.go Show resolved Hide resolved
internal/log/log_test.go Show resolved Hide resolved
internal/net/grpc/stream_test.go Outdated Show resolved Hide resolved
internal/net/grpc/stream_test.go Outdated Show resolved Hide resolved
internal/slices/slices_test.go Outdated Show resolved Hide resolved
return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/errors/circuitbreaker_test.go:481: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/errors/circuitbreaker_test.go:499: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/errors/errors_test.go:1610: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/errors/errors_test.go:1628: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/errors/errors_test.go:1695: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02 ⚠️

Comparison is base (6a1fd87) 29.39% compared to head (339cea4) 29.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2005      +/-   ##
==========================================
- Coverage   29.39%   29.37%   -0.02%     
==========================================
  Files         365      366       +1     
  Lines       34517    34527      +10     
==========================================
- Hits        10145    10143       -2     
- Misses      23954    23965      +11     
- Partials      418      419       +1     
Impacted Files Coverage Δ
pkg/agent/core/ngt/service/ngt.go 18.84% <ø> (-0.11%) ⬇️

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kevindiu
Copy link
Contributor Author

/gen-test

kevindiu and others added 6 commits April 13, 2023 15:49
Signed-off-by: kevindiu <kevin_diu@yahoo.com.hk>
Signed-off-by: Vdaas CI <vald@vdaas.org>
Signed-off-by: kpango <kpango@vdaas.org>
Signed-off-by: Vdaas CI <vald@vdaas.org>
Signed-off-by: vankichi <kyukawa315@gmail.com>
datelier
datelier previously approved these changes Apr 13, 2023
kevindiu and others added 3 commits April 13, 2023 15:53
Signed-off-by: kevindiu <kevin_diu@yahoo.com.hk>
Signed-off-by: kevindiu <kevin_diu@yahoo.com.hk>
@kevindiu
Copy link
Contributor Author

/format

@vdaas-ci
Copy link
Collaborator

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

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/errors/errors_test.go:1868: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/errors/errors_test.go:1886: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/errors/file_test.go:273: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/errors/file_test.go:292: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:735: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

UnimplementedValdServer: test.fields.UnimplementedValdServer,
}

gotId, err := s.Exists(test.args.ctx, test.args.meta)
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 🐶
ST1003: var gotId should be gotID (stylecheck)


for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
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 🐶
parameter name 'tt' is too short for the scope of its usage (varnamelen)


for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
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 🐶
parameter name 'tt' is too short for the scope of its usage (varnamelen)


for _, tc := range tests {
test := tc
t.Run(test.name, func(tt *testing.T) {
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 🐶
parameter name 'tt' is too short for the scope of its usage (varnamelen)

if test.checkFunc == nil {
checkFunc = defaultCheckFunc
}
b := &breaker{
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 🐶
variable name 'b' is too short for the scope of its usage (varnamelen)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:913: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:932: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:1001: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:1020: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:1090: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:1180: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:1199: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

return nil
}
tests := []test{
// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:1268: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

},
*/

// TODO test cases
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 🐶
internal/test/data/vector/gen_test.go:1287: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)

if test.checkFunc == nil {
checkFunc = defaultCheckFunc
}
b := &breaker{
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 🐶
variable name 'b' is too short for the scope of its usage (varnamelen)

UnimplementedValdServer: test.fields.UnimplementedValdServer,
}

gotId, err := s.exists(test.args.ctx, test.args.uuid)
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 🐶
ST1003: var gotId should be gotID (stylecheck)

UnimplementedValdServer: test.fields.UnimplementedValdServer,
}

gotId, err := s.Exists(test.args.ctx, test.args.meta)
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 🐶
ST1003: var gotId should be gotID (stylecheck)

if test.checkFunc == nil {
checkFunc = defaultCheckFunc
}
b := &breaker{
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 🐶
variable name 'b' is too short for the scope of its usage (varnamelen)

@vankichi vankichi merged commit e86bd80 into main Apr 13, 2023
@vankichi vankichi deleted the test/gen-empty-test branch April 13, 2023 08:17
@ykadowak ykadowak mentioned this pull request Apr 24, 2023
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