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
lab.go:
lab.go
package golab45 import ( "net/http" "github.com/Kong/go-pdk" ) type ( Config struct { } ) func (c *Config) Access(kong *pdk.PDK) { kong.Response.ExitStatus(http.StatusBadRequest) }
lab_test.go:
lab_test.go
package golab45_test import ( "golab45" "net/http" "testing" "github.com/Kong/go-pdk/test" ) func Test(t *testing.T) { env, _ := test.New(t, test.Request{Method: http.MethodGet, Url: "http://example.com"}) env.DoHttp(&golab45.Config{}) if env.ClientRes.Status != http.StatusBadRequest { t.Errorf("expected %d got %d", http.StatusBadRequest, env.ClientRes.Status) } }
test output:
test output
Running tool: /usr/local/go/bin/go test -timeout 30s -run ^Test$ golab45 --- FAIL: Test (0.00s) ./test.go:579: Access ./lab_test.go:15: expected 400 got 200 FAIL FAIL golab45 0.003s FAIL
The text was updated successfully, but these errors were encountered:
Possibly related to #119
Sorry, something went wrong.
Thank you for the repro sample.
Internally tracked: KAG-3813 I agree it should be related to #119
This issue is fixed as of version v0.10.2; please give it a try! Closing the issue for now. Thank you for taking the time to report!
v0.10.2
Successfully merging a pull request may close this issue.
Steps to reproduce:
lab.go
:lab_test.go
:test output
:The text was updated successfully, but these errors were encountered: