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

Tests: test fails with go1.15 #2646

Closed
arl opened this issue Sep 19, 2020 · 1 comment · Fixed by #2647
Closed

Tests: test fails with go1.15 #2646

arl opened this issue Sep 19, 2020 · 1 comment · Fixed by #2647

Comments

@arl
Copy link
Contributor

arl commented Sep 19, 2020

Describe the bug

Since go1.15, there's a new vet check for code such as string(x) where x has an integer type other than rune.
This vet check is enabled by default on go test. https://golang.org/doc/go1.15#vet

To Reproduce

Steps to reproduce the behavior:

  1. use go v1.15
  2. go test ./pkg/chunkenc/

Expected behavior
tests pass

Environment:

  • go v1.15
  • linux

Screenshots, Promtail config, or terminal output

 aurelien-> go test ./pkg/chunkenc/
# github.com/grafana/loki/pkg/chunkenc
pkg/chunkenc/memchunk_test.go:258:59: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
pkg/chunkenc/memchunk_test.go:274:22: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
FAIL    github.com/grafana/loki/pkg/chunkenc [build failed]
FAIL
@arl
Copy link
Contributor Author

arl commented Sep 19, 2020

I'm about to send a PR to fix that

arl added a commit to arl/loki that referenced this issue Sep 19, 2020
Since go1.15, there's a new vet check for code such as string(x) where x
has an integer type other than rune.  This vet check is enabled by
default on go test.

TestSerialization failed because of that, this commit replaces `string()`
conversions with `strconv.Itoa` calls

Fixes grafana#2646
owen-d pushed a commit that referenced this issue Sep 21, 2020
Since go1.15, there's a new vet check for code such as string(x) where x
has an integer type other than rune.  This vet check is enabled by
default on go test.

TestSerialization failed because of that, this commit replaces `string()`
conversions with `strconv.Itoa` calls

Fixes #2646
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant