Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Conversation

@abhide
Copy link
Contributor

@abhide abhide commented Jul 30, 2019

No description provided.

Why is new version required?
Pick up fixes to specify custom ResponseDecoder
@abhide abhide requested a review from michaelw July 30, 2019 21:48

body := strings.NewReader(fmt.Sprintf("value=%s", value))
resp, err := p.client.New().Post(
fmt.Sprintf("properties/%s/%s/%s", file, stanza, key)).Body(body).ResponseDecoder(stringResponseDecoder{}).Receive(nil, apiError)
Copy link
Contributor

Choose a reason for hiding this comment

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

do the interpolated values need some kind of escaping?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

apiError := &APIError{}
output := &Entry{}
resp, err := p.client.New().Get(
fmt.Sprintf("properties/%s/%s/%s", file, stanza, key)).ResponseDecoder(stringResponseDecoder{}).Receive(output, apiError)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto, see above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

output := &Entry{}
resp, err := p.client.New().Get(
fmt.Sprintf("properties/%s/%s/%s", file, stanza, key)).ResponseDecoder(stringResponseDecoder{}).Receive(output, apiError)
if err != nil || !apiError.Empty() {
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, maybe we should make it such that we can check for exactly one condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will address these in a cleanup/refactor separate PR.

Amey Bhide added 3 commits August 5, 2019 22:01
CI would fail with

make test TESTREPORT=test-results/go/results.xml
sed -e 's;@@gobin@@;/go/bin;g' < vault.hcl.in > vault.hcl
mkdir -p test-results/go/
go clean -testcache
go clean -testcache: open /tmp/go/cache/testexpire.txt: no such file or directory
make: *** [Makefile:29: test] Error 1
@test -n "$$SPLUNK_ADDR" || { echo 'warning: SPLUNK_ADDR not set, creating new Splunk instances. This will be slow.'; }
mkdir -p $(dir $(TESTREPORT))
gotestsum --junitfile $(TESTREPORT) -- -cover -v ./...
go clean -testcache || true
Copy link
Contributor

Choose a reason for hiding this comment

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

env GOCACHE=off gotestsum...

Copy link
Contributor Author

@abhide abhide Aug 6, 2019

Choose a reason for hiding this comment

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

mkdir -p ./
env GOCACHE=off gotestsum --junitfile test-results.xml --format standard-verbose -- -cover -v ./...
build cache is disabled by GOCACHE=off, but required as of Go 1.12

=== Errors
build cache is disabled by GOCACHE=off, but required as of Go 1.12

DONE 0 tests, 1 error in 0.015s
make: *** [test] Error 1```

@michaelw michaelw merged commit 4070ed3 into master Aug 7, 2019
@abhide abhide deleted the fixes branch August 7, 2019 17:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants