You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/11/14 15:28:53 UTC

[GitHub] [beam] damccorm commented on a diff in pull request #24118: [Tour Of Beam] verify that unit exists when saving progress

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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org