We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/artur/.cache/go-build" GOENV="/home/artur/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/artur/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/artur/www/ocis-hello/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build158496793=/tmp/go-build -gno-record-gcc-switches"
when ProviderBaseURL does not contain a port, don't add : in the HTTP request
ProviderBaseURL
:
when ProviderBaseURL does not contain a port, : are added in the Host field of the HTTP request
Host
GET /owncloud-core/ocs/v1.php/cloud/user HTTP/1.1 Host: localhost: User-Agent: Pact Go Authorization: Basic YWRtaW46YWRtaW4= Cookie: Origin: http://localhost:9876 X-Forwarded-For: 127.0.0.1, 127.0.0.1 Accept-Encoding: gzip
example code:
package pact import ( "crypto/tls" "fmt" "github.com/pact-foundation/pact-go/types" "log" "github.com/pact-foundation/pact-go/dsl" "path/filepath" "testing" ) func TestProviderContract(t *testing.T) { // Create Pact connecting to local Daemon pact := &dsl.Pact{ LogLevel: "DEBUG", Provider: "oc-server", } pactDir := "/home/artur/www/owncloud-sdk/tests/pact" // Verify the Provider using the locally saved Pact Files _, err := pact.VerifyProvider(t, types.VerifyRequest{ ProviderBaseURL: "http://localhost/owncloud-core/", PactURLs: []string{filepath.ToSlash(fmt.Sprintf("%s/owncloud-sdk-oc-server.json", pactDir))}, FailIfNoPactsFound: true, CustomTLSConfig: &tls.Config{InsecureSkipVerify: true}, }) if err != nil { log.Fatalf("%v", err) } }
Please ensure you set logging to DEBUG and attach any relevant log files here (or link from a gist).
DEBUG
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected behaviour
when
ProviderBaseURL
does not contain a port, don't add:
in the HTTP requestActual behaviour
when
ProviderBaseURL
does not contain a port,:
are added in theHost
field of the HTTP requestSteps to reproduce
ProviderBaseURL
example code:
Relevent log files
Please ensure you set logging to
DEBUG
and attach any relevant log files here (or link from a gist).The text was updated successfully, but these errors were encountered: