(t *testing.T)
| 21 | ) |
| 22 | |
| 23 | func TestCreateHTTPTask(t *testing.T) { |
| 24 | tc := testutil.SystemTest(t) |
| 25 | locationID := "us-central1" |
| 26 | queueID := "my-queue" |
| 27 | url := "https://example.com/task_handler" |
| 28 | |
| 29 | tests := []struct { |
| 30 | name string |
| 31 | message string |
| 32 | }{ |
| 33 | { |
| 34 | name: "Message", |
| 35 | message: "task details for handler processing", |
| 36 | }, |
| 37 | { |
| 38 | name: "No Message", |
| 39 | message: "", |
| 40 | }, |
| 41 | } |
| 42 | |
| 43 | for _, test := range tests { |
| 44 | _, err := createHTTPTask(tc.ProjectID, locationID, queueID, url, test.message) |
| 45 | if err != nil { |
| 46 | t.Errorf("CreateTask(%s): %v", test.name, err) |
| 47 | } |
| 48 | } |
| 49 | } |
nothing calls this directly
no test coverage detected