MCPcopy Create free account
hub / github.com/github/gh-aw / TestComputeGitHubRateLimitDiff_Run1Nil

Function TestComputeGitHubRateLimitDiff_Run1Nil

pkg/cli/audit_diff_test.go:1002–1014  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1000}
1001
1002func 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
1016func TestComputeRunMetricsDiff_WithRateLimitData(t *testing.T) {
1017 summary1 := &RunSummary{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected