damccorm commented on code in PR #24118:
URL: https://github.com/apache/beam/pull/24118#discussion_r1021680956
##########
learning/tour-of-beam/backend/integration_tests/auth_test.go:
##########
@@ -36,76 +37,100 @@ func TestMain(m *testing.M) {
os.Exit(m.Run())
}
+func makeUserCodeRequest() UserCodeRequest {
+ return UserCodeRequest{
+ Files: []UserCodeFile{
+ {Name: "main.py", Content: "import sys; sys.exit(0)",
IsMain: true},
+ },
+ PipelineOptions: "some opts",
+ }
+}
+
+func checkBadHttpCode(t *testing.T, err error, code int) {
+ if err == nil {
+ t.Fatal("error expected")
+ }
+ if err, ok := err.(*ErrBadResponse); ok {
+ if err.Code == code {
+ return
+ }
+ }
+ t.Fatal(err)
Review Comment:
```suggestion
t.Fatal("Expected ErrBadResponse with code %v, got %v", code, err)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]