getsops / getsops/sops

make fails in test TestLoadConfigFileWithVaultDestinationRules

Open
#620 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

Tried make with master (83a354e92fd5d0be1d5bdcfe7cf0b7f68f954ed9) and v3.5.0

$ make
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	1.037s	coverage: 50.0% of statements
ok  	go.mozilla.org/sops/v3/aes	1.263s	coverage: 76.9% of statements
?   	go.mozilla.org/sops/v3/audit	[no test files]
ok  	go.mozilla.org/sops/v3/azkv	1.008s	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	1.006s	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]
--- FAIL: TestLoadConfigFileWithVaultDestinationRules (0.00s)
    config_test.go:326: 
        	Error Trace:	config_test.go:326
        	Error:      	Not equal: 
        	            	expected: "http://127.0.0.1:8200/v1/secret/data/foobar/barfoo"
        	            	actual  : "https://127.0.0.1:8200/v1/secret/data/foobar/barfoo"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-http://127.0.0.1:8200/v1/secret/data/foobar/barfoo
        	            	+https://127.0.0.1:8200/v1/secret/data/foobar/barfoo
        	Test:       	TestLoadConfigFileWithVaultDestinationRules
    config_test.go:330: 
        	Error Trace:	config_test.go:330
        	Error:      	Not equal: 
        	            	expected: "http://127.0.0.1:8200/v1/kv/barfoo/barfoo"
        	            	actual  : "https://127.0.0.1:8200/v1/kv/barfoo/barfoo"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-http://127.0.0.1:8200/v1/kv/barfoo/barfoo
        	            	+https://127.0.0.1:8200/v1/kv/barfoo/barfoo
        	Test:       	TestLoadConfigFileWithVaultDestinationRules
FAIL
coverage: 77.2% of statements
FAIL	go.mozilla.org/sops/v3/config	0.024s
FAIL
make: *** [Makefile:30: test] Error 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run make and inspect the test target at Makefile:30, then read config_test.go around TestLoadConfigFileWithVaultDestinationRules. Trace how the Vault destination URLs are loaded and compare the expected HTTP URLs with the actual HTTPS values. Done means the config package test passes and make completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.