(t *testing.T)
| 1000 | } |
| 1001 | |
| 1002 | func TestComputeGitHubRateLimitDiff_Run1Nil(t *testing.T) { |
| 1003 | rl2 := &GitHubRateLimitUsage{ |
| 1004 | TotalRequestsMade: 30, |
| 1005 | CoreConsumed: 30, |
| 1006 | CoreRemaining: 4970, |
| 1007 | CoreLimit: 5000, |
| 1008 | } |
| 1009 | |
| 1010 | diff := computeGitHubRateLimitDiff(nil, rl2) |
| 1011 | require.NotNil(t, diff, "diff should not be nil when run2 has data") |
| 1012 | assert.Equal(t, 0, diff.Run1TotalAPICalls, "Run1 total API calls should be 0") |
| 1013 | assert.Equal(t, 30, diff.Run2TotalAPICalls, "Run2 total API calls should be 30") |
| 1014 | } |
| 1015 | |
| 1016 | func TestComputeRunMetricsDiff_WithRateLimitData(t *testing.T) { |
| 1017 | summary1 := &RunSummary{ |
nothing calls this directly
no test coverage detected