Errors with make test
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
Hi, when I run make test some of the tests are failing because of an issue with the PGP key, and if I comment that out I get a different error, for another test.
Any idea why this is happening?
The Go version I use is go version go1.15.5 darwin/amd64
$ make test
GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go mod tidy
GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go mod vendor
gpg --import pgp/sops_functional_tests_key.asc 2>&1 1>/dev/null || exit 0
gpg: key 3D16CEE4A27381B4: "SOPS Functional Tests Key 1 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key 3D16CEE4A27381B4: secret key imported
gpg: key D8720D957C3D3074: "SOPS Functional Tests Key 2 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key D8720D957C3D3074: secret key imported
gpg: key 3D16CEE4A27381B4: "SOPS Functional Tests Key 1 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key D8720D957C3D3074: "SOPS Functional Tests Key 2 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key 19F9B5DAEA91FF86: "SOPS Functional Tests Key 3 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: Total number processed: 5
gpg: unchanged: 5
gpg: secret keys read: 2
gpg: secret keys unchanged: 2
./test.sh
ok go.mozilla.org/sops/v3 0.372s coverage: 51.7% of statements
ok go.mozilla.org/sops/v3/aes 0.390s coverage: 76.9% of statements
? go.mozilla.org/sops/v3/audit [no test files]
ok go.mozilla.org/sops/v3/azkv 0.171s coverage: 25.5% of statements
? go.mozilla.org/sops/v3/cmd/sops [no test files]
? go.mozilla.org/sops/v3/cmd/sops/codes [no test files]
? go.mozilla.org/sops/v3/cmd/sops/common [no test files]
ok go.mozilla.org/sops/v3/cmd/sops/formats 0.186s coverage: 100.0% of statements
? go.mozilla.org/sops/v3/cmd/sops/subcommand/exec [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/groups [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/keyservice [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/publish [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/updatekeys [no test files]
ok go.mozilla.org/sops/v3/config 0.433s coverage: 77.8% of statements
ok go.mozilla.org/sops/v3/decrypt 0.316s coverage: 0.0% of statements [no tests to run]
ok go.mozilla.org/sops/v3/gcpkms 0.225s coverage: 25.4% of statements
ok go.mozilla.org/sops/v3/hcvault 6.153s coverage: 59.4% of statements
? go.mozilla.org/sops/v3/keys [no test files]
ok go.mozilla.org/sops/v3/keyservice 0.230s coverage: 5.0% of statements
ok go.mozilla.org/sops/v3/kms 0.241s coverage: 57.0% of statements
? go.mozilla.org/sops/v3/kms/mocks [no test files]
? go.mozilla.org/sops/v3/logging [no test files]
[PGP] time="2020-11-24T17:01:04Z" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver witihin sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
--- FAIL: TestRetrievePGPKey (0.32s)
keysource_test.go:49:
Error Trace: keysource_test.go:49
Error: Received unexpected error:
could not read entities: openpgp: invalid data: entity without any identities
Test: TestRetrievePGPKey
FAIL
coverage: 51.1% of statements
FAIL go.mozilla.org/sops/v3/pgp 32.192s
FAIL
make: *** [test] Error 1
When I configure to skip that test (with t.Skip), I get a different error in another test:
$ make test
GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go mod tidy
GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go mod vendor
gpg --import pgp/sops_functional_tests_key.asc 2>&1 1>/dev/null || exit 0
gpg: key 3D16CEE4A27381B4: "SOPS Functional Tests Key 1 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key 3D16CEE4A27381B4: secret key imported
gpg: key D8720D957C3D3074: "SOPS Functional Tests Key 2 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key D8720D957C3D3074: secret key imported
gpg: key 3D16CEE4A27381B4: "SOPS Functional Tests Key 1 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key D8720D957C3D3074: "SOPS Functional Tests Key 2 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: key 19F9B5DAEA91FF86: "SOPS Functional Tests Key 3 (https://github.com/mozilla/sops/) <secops@mozilla.com>" not changed
gpg: Total number processed: 5
gpg: unchanged: 5
gpg: secret keys read: 2
gpg: secret keys unchanged: 2
./test.sh
ok go.mozilla.org/sops/v3 0.481s coverage: 51.7% of statements
ok go.mozilla.org/sops/v3/aes 0.459s coverage: 76.9% of statements
? go.mozilla.org/sops/v3/audit [no test files]
ok go.mozilla.org/sops/v3/azkv 0.219s coverage: 25.5% of statements
? go.mozilla.org/sops/v3/cmd/sops [no test files]
? go.mozilla.org/sops/v3/cmd/sops/codes [no test files]
? go.mozilla.org/sops/v3/cmd/sops/common [no test files]
ok go.mozilla.org/sops/v3/cmd/sops/formats 0.230s coverage: 100.0% of statements
? go.mozilla.org/sops/v3/cmd/sops/subcommand/exec [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/groups [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/keyservice [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/publish [no test files]
? go.mozilla.org/sops/v3/cmd/sops/subcommand/updatekeys [no test files]
ok go.mozilla.org/sops/v3/config 0.348s coverage: 77.8% of statements
ok go.mozilla.org/sops/v3/decrypt 0.337s coverage: 0.0% of statements [no tests to run]
ok go.mozilla.org/sops/v3/gcpkms 0.243s coverage: 25.4% of statements
ok go.mozilla.org/sops/v3/hcvault 8.183s coverage: 59.4% of statements
? go.mozilla.org/sops/v3/keys [no test files]
ok go.mozilla.org/sops/v3/keyservice 0.278s coverage: 5.0% of statements
ok go.mozilla.org/sops/v3/kms 0.278s coverage: 57.0% of statements
? go.mozilla.org/sops/v3/kms/mocks [no test files]
? go.mozilla.org/sops/v3/logging [no test files]
ok go.mozilla.org/sops/v3/pgp 32.935s coverage: 46.0% of statements
? go.mozilla.org/sops/v3/publish [no test files]
ok go.mozilla.org/sops/v3/shamir 0.222s coverage: 96.2% of statements
ok go.mozilla.org/sops/v3/stores 0.366s coverage: 38.7% of statements
ok go.mozilla.org/sops/v3/stores/dotenv 0.282s coverage: 31.4% of statements
# go.mozilla.org/sops/v3/stores/ini
stores/ini/store.go:292: conversion from int64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
FAIL go.mozilla.org/sops/v3/stores/ini [build failed]
FAIL
make: *** [test] Error 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing make test with the Go version and environment details provided. Inspect keysource_test.go:49 and stores/ini/store.go:292, then review test.sh and the PGP test-key setup. Done means the reported test failures are explained and the full test command completes without skipping tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, security, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100