diff options
| author | Russ Cox <rsc@golang.org> | 2021-11-22 12:07:44 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2021-11-22 17:23:25 +0000 |
| commit | 8405e23b053d77edf795d2fb18950bcbb9bc9d07 (patch) | |
| tree | bcf03099bde30edb16afbe2f78a66320a7ab2d81 /cmd | |
| parent | bfee50665c18f4a18c3788de664c1594cb5634d2 (diff) | |
| download | go-x-website-8405e23b053d77edf795d2fb18950bcbb9bc9d07.tar.xz | |
cmd/golangorg: fix testdata/live.txt for golang.org → go.dev redirect
Change-Id: I7c16ab5add6c801d1e71564be56bbab670ab39b0
Reviewed-on: https://go-review.googlesource.com/c/website/+/366175
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Website-Publish: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/golangorg/testdata/live.txt | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/cmd/golangorg/testdata/live.txt b/cmd/golangorg/testdata/live.txt index b78cfaf4..ba30bc9e 100644 --- a/cmd/golangorg/testdata/live.txt +++ b/cmd/golangorg/testdata/live.txt @@ -1,29 +1,58 @@ # Tests that can only run against the live server, # because they depend on production resources. -GET https://golang.org/s/go2design +GET https://go.dev/s/go2design code == 302 body ~ proposal.*Found body !contains UA- +GET https://golang.org/s/go2design +code == 301 +redirect == https://go.dev/s/go2design + +# playground API endpoints do not redirect from golang.org, +# in case there are clients that can't handle the redirects. + POST https://golang.org/compile postquery body=package main; func main() { print(6*7); } body == {"compile_errors":"","output":"42"} +POST https://go.dev/_/compile +postquery + body=package main; func main() { print(6*7); } +body == {"compile_errors":"","output":"42"} + POST https://golang.org/compile postquery body=//empty body contains expected 'package', found 'EOF' body !contains UA- +POST https://go.dev/_/compile +postquery + body=//empty +body contains expected 'package', found 'EOF' +body !contains UA- + POST https://golang.org/compile postquery version=2 body=package main; import ("fmt"; "time"); func main() {fmt.Print("A"); time.Sleep(time.Second); fmt.Print("B")} body == {"Errors":"","Events":[{"Message":"A","Kind":"stdout","Delay":0},{"Message":"B","Kind":"stdout","Delay":1000000000}]} +POST https://go.dev/_/compile +postquery + version=2 + body=package main; import ("fmt"; "time"); func main() {fmt.Print("A"); time.Sleep(time.Second); fmt.Print("B")} +body == {"Errors":"","Events":[{"Message":"A","Kind":"stdout","Delay":0},{"Message":"B","Kind":"stdout","Delay":1000000000}]} + POST https://golang.org/share postbody package main body !contains UA- + +POST https://go.dev/_/share +postbody + package main +body !contains UA- |
