- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for wantBody (0.17 sec)
-
pilot/pkg/request/command_test.go
wantMethod string wantPath string wantBody []byte StatusCode int Response string } func (p *pilotStubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { p.Lock() if r.Method == p.States[0].wantMethod { if r.URL.Path == p.States[0].wantPath { defer r.Body.Close() body, _ := io.ReadAll(r.Body) if err := util.Compare(body, p.States[0].wantBody); err == nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Dec 11 19:11:01 UTC 2023 - 4.1K bytes - Viewed (0) -
src/net/http/httptest/httptest_test.go
slurp, err := io.ReadAll(got.Body) if err != nil { t.Errorf("ReadAll: %v", err) } if string(slurp) != tt.wantBody { t.Errorf("Body = %q; want %q", slurp, tt.wantBody) } tt.want = tt.want.WithContext(context.Background()) got.Body = nil // before DeepEqual if !reflect.DeepEqual(got.URL, tt.want.URL) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 18:09:14 UTC 2024 - 4.6K bytes - Viewed (0) -
pilot/pkg/xds/debug_test.go
tests := []struct { name string wantCode int proxyID string }{ { name: "dumps most recent proxy with 200", proxyID: "test.default", wantCode: 200, }, { name: "returns 404 if proxy not found", proxyID: "not-found", wantCode: 404, }, { name: "returns 400 if no proxyID", proxyID: "", wantCode: 400, }, }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 12 18:20:36 UTC 2024 - 7.8K bytes - Viewed (0) -
istioctl/cmd/sysexits_test.go
analyze.AnalyzerFoundIssuesError{}: ExitAnalyzerFoundIssues, } func TestKnownExitStrings(t *testing.T) { for err, wantCode := range KnownErrorCode { if code := GetExitCode(err); code != wantCode { t.Errorf("For %v want %v, but is %v", err, wantCode, code) } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 15 15:02:17 UTC 2023 - 1.3K bytes - Viewed (0) -
src/io/fs/readdir_test.go
Data: nil, Mode: os.ModeDir, ModTime: time.Now(), Sys: &sysValue, }, } tests := []struct { path string wantMode FileMode wantDir bool }{ {path: "notadir.txt", wantMode: 0, wantDir: false}, {path: "adir", wantMode: os.ModeDir, wantDir: true}, } for _, test := range tests { test := test t.Run(test.path, func(t *testing.T) { fi, err := Stat(testFs, test.path)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 27 16:25:41 UTC 2023 - 2.6K bytes - Viewed (0) -
src/net/http/httptest/recorder_test.go
type checkFunc func(*ResponseRecorder) error check := func(fns ...checkFunc) []checkFunc { return fns } hasStatus := func(wantCode int) checkFunc { return func(rec *ResponseRecorder) error { if rec.Code != wantCode { return fmt.Errorf("Status = %d; want %d", rec.Code, wantCode) } return nil } } hasResultStatus := func(want string) checkFunc { return func(rec *ResponseRecorder) error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 23:17:38 UTC 2022 - 9.7K bytes - Viewed (0) -
src/cmd/go/internal/load/pkg_test.go
pkg.ImportPath = tt.in pkg.GoFiles = tt.files pkg.Internal.CmdlineFiles = len(tt.files) > 0 gotMod := pkg.DefaultExecName() if gotMod != tt.wantMod { t.Errorf("pkg.DefaultExecName with ImportPath = %q in module mode = %v; want %v", tt.in, gotMod, tt.wantMod) } } { cfg.ModulesEnabled = false pkg := new(Package) pkg.ImportPath = tt.in pkg.GoFiles = tt.files
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 14:05:53 UTC 2022 - 2.4K bytes - Viewed (0)