| 24 | } |
| 25 | |
| 26 | func TestGetJobRequiresRepoAndJobID(t *testing.T) { |
| 27 | client := &CAPIClient{} |
| 28 | _, err := client.GetJob(context.Background(), "", "", "only-job-id") |
| 29 | assert.EqualError(t, err, "owner, repo, and jobID are required") |
| 30 | _, err = client.GetJob(context.Background(), "", "only-repo", "") |
| 31 | assert.EqualError(t, err, "owner, repo, and jobID are required") |
| 32 | _, err = client.GetJob(context.Background(), "only-owner", "", "") |
| 33 | assert.EqualError(t, err, "owner, repo, and jobID are required") |
| 34 | _, err = client.GetJob(context.Background(), "", "", "") |
| 35 | assert.EqualError(t, err, "owner, repo, and jobID are required") |
| 36 | } |
| 37 | |
| 38 | func TestGetJob(t *testing.T) { |
| 39 | sampleDateString := "2025-08-29T00:00:00Z" |