Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions github/actions_hosted_runners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func TestActionsService_GetHostedRunnerLimits(t *testing.T) {
ctx := t.Context()
publicIPLimits, _, err := client.Actions.GetHostedRunnerLimits(ctx, "o")
if err != nil {
t.Errorf("Actions.GetPartnerImages returned error: %v", err)
t.Errorf("Actions.GetHostedRunnerLimits returned error: %v", err)
}

want := &HostedRunnerPublicIPLimits{
Expand Down Expand Up @@ -808,7 +808,7 @@ func TestActionsService_DeleteHostedRunner(t *testing.T) {
ctx := t.Context()
hostedRunner, _, err := client.Actions.DeleteHostedRunner(ctx, "o", 23)
if err != nil {
t.Errorf("Actions.GetHostedRunner returned error: %v", err)
t.Errorf("Actions.DeleteHostedRunner returned error: %v", err)
}

lastActiveOn := Timestamp{time.Date(2023, 4, 26, 15, 23, 37, 0, time.UTC)}
Expand Down
4 changes: 2 additions & 2 deletions github/actions_oidc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestActionsService_GetRepoOIDCSubjectClaimCustomTemplate(t *testing.T) {

want := &OIDCSubjectClaimCustomTemplate{UseDefault: Ptr(false), IncludeClaimKeys: []string{"repo", "context"}}
if !cmp.Equal(template, want) {
t.Errorf("Actions.GetOrgOIDCSubjectClaimCustomTemplate returned %+v, want %+v", template, want)
t.Errorf("Actions.GetRepoOIDCSubjectClaimCustomTemplate returned %+v, want %+v", template, want)
}

const methodName = "GetRepoOIDCSubjectClaimCustomTemplate"
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestActionsService_SetRepoOIDCSubjectClaimCustomTemplate(t *testing.T) {
})
}

func TestActionService_SetRepoOIDCSubjectClaimCustomTemplateToDefault(t *testing.T) {
func TestActionsService_SetRepoOIDCSubjectClaimCustomTemplateToDefault(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand Down
6 changes: 3 additions & 3 deletions github/actions_permissions_orgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ func TestActionsService_ListEnabledReposInOrg(t *testing.T) {
}
got, _, err := client.Actions.ListEnabledReposInOrg(ctx, "o", opt)
if err != nil {
t.Errorf("Actions.ListEnabledRepos returned error: %v", err)
t.Errorf("Actions.ListEnabledReposInOrg returned error: %v", err)
}

want := &ActionsEnabledOnOrgRepos{TotalCount: int(2), Repositories: []*Repository{
{ID: Ptr(int64(2))},
{ID: Ptr(int64(3))},
}}
if !cmp.Equal(got, want) {
t.Errorf("Actions.ListEnabledRepos returned %+v, want %+v", got, want)
t.Errorf("Actions.ListEnabledReposInOrg returned %+v, want %+v", got, want)
}

const methodName = "ListEnabledRepos"
Expand Down Expand Up @@ -149,7 +149,7 @@ func TestActionsService_SetEnabledReposInOrg(t *testing.T) {
ctx := t.Context()
_, err := client.Actions.SetEnabledReposInOrg(ctx, "o", input)
if err != nil {
t.Errorf("Actions.SetEnabledRepos returned error: %v", err)
t.Errorf("Actions.SetEnabledReposInOrg returned error: %v", err)
}

const methodName = "SetEnabledRepos"
Expand Down
2 changes: 1 addition & 1 deletion github/actions_runner_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestActionsService_GetOrganizationRunnerGroup(t *testing.T) {
ctx := t.Context()
group, _, err := client.Actions.GetOrganizationRunnerGroup(ctx, "o", 2)
if err != nil {
t.Errorf("Actions.ListOrganizationRunnerGroups returned error: %v", err)
t.Errorf("Actions.GetOrganizationRunnerGroup returned error: %v", err)
}

want := &RunnerGroup{
Expand Down
18 changes: 9 additions & 9 deletions github/actions_runners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func TestActionsService_ListOrganizationRunnerApplicationDownloads(t *testing.T)
ctx := t.Context()
downloads, _, err := client.Actions.ListOrganizationRunnerApplicationDownloads(ctx, "o")
if err != nil {
t.Errorf("Actions.ListRunnerApplicationDownloads returned error: %v", err)
t.Errorf("Actions.ListOrganizationRunnerApplicationDownloads returned error: %v", err)
}

want := []*RunnerApplicationDownload{
Expand Down Expand Up @@ -368,7 +368,7 @@ func TestActionsService_CreateOrganizationRegistrationToken(t *testing.T) {
ctx := t.Context()
token, _, err := client.Actions.CreateOrganizationRegistrationToken(ctx, "o")
if err != nil {
t.Errorf("Actions.CreateRegistrationToken returned error: %v", err)
t.Errorf("Actions.CreateOrganizationRegistrationToken returned error: %v", err)
}

want := &RegistrationToken{
Expand All @@ -377,7 +377,7 @@ func TestActionsService_CreateOrganizationRegistrationToken(t *testing.T) {
123000000, time.UTC)},
}
if !cmp.Equal(token, want) {
t.Errorf("Actions.CreateRegistrationToken returned %+v, want %+v", token, want)
t.Errorf("Actions.CreateOrganizationRegistrationToken returned %+v, want %+v", token, want)
}

const methodName = "CreateOrganizationRegistrationToken"
Expand Down Expand Up @@ -411,7 +411,7 @@ func TestActionsService_ListOrganizationRunners(t *testing.T) {
ctx := t.Context()
runners, _, err := client.Actions.ListOrganizationRunners(ctx, "o", opts)
if err != nil {
t.Errorf("Actions.ListRunners returned error: %v", err)
t.Errorf("Actions.ListOrganizationRunners returned error: %v", err)
}

want := &Runners{
Expand All @@ -422,7 +422,7 @@ func TestActionsService_ListOrganizationRunners(t *testing.T) {
},
}
if !cmp.Equal(runners, want) {
t.Errorf("Actions.ListRunners returned %+v, want %+v", runners, want)
t.Errorf("Actions.ListOrganizationRunners returned %+v, want %+v", runners, want)
}

const methodName = "ListOrganizationRunners"
Expand Down Expand Up @@ -452,7 +452,7 @@ func TestActionsService_GetOrganizationRunner(t *testing.T) {
ctx := t.Context()
runner, _, err := client.Actions.GetOrganizationRunner(ctx, "o", 23)
if err != nil {
t.Errorf("Actions.GetRunner returned error: %v", err)
t.Errorf("Actions.GetOrganizationRunner returned error: %v", err)
}

want := &Runner{
Expand All @@ -462,7 +462,7 @@ func TestActionsService_GetOrganizationRunner(t *testing.T) {
Status: Ptr("online"),
}
if !cmp.Equal(runner, want) {
t.Errorf("Actions.GetRunner returned %+v, want %+v", runner, want)
t.Errorf("Actions.GetOrganizationRunner returned %+v, want %+v", runner, want)
}

const methodName = "GetOrganizationRunner"
Expand Down Expand Up @@ -492,12 +492,12 @@ func TestActionsService_CreateOrganizationRemoveToken(t *testing.T) {
ctx := t.Context()
token, _, err := client.Actions.CreateOrganizationRemoveToken(ctx, "o")
if err != nil {
t.Errorf("Actions.CreateRemoveToken returned error: %v", err)
t.Errorf("Actions.CreateOrganizationRemoveToken returned error: %v", err)
}

want := &RemoveToken{Token: Ptr("AABF3JGZDX3P5PMEXLND6TS6FCWO6"), ExpiresAt: &Timestamp{time.Date(2020, time.January, 29, 12, 13, 35, 123000000, time.UTC)}}
if !cmp.Equal(token, want) {
t.Errorf("Actions.CreateRemoveToken returned %+v, want %+v", token, want)
t.Errorf("Actions.CreateOrganizationRemoveToken returned %+v, want %+v", token, want)
}

const methodName = "CreateOrganizationRemoveToken"
Expand Down
10 changes: 5 additions & 5 deletions github/actions_variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func TestActionsService_DeleteRepoVariable(t *testing.T) {
ctx := t.Context()
_, err := client.Actions.DeleteRepoVariable(ctx, "o", "r", "NAME")
if err != nil {
t.Errorf("Actions.( returned error: %v", err)
t.Errorf("Actions.DeleteRepoVariable returned error: %v", err)
}

const methodName = "DeleteRepoVariable"
Expand Down Expand Up @@ -408,7 +408,7 @@ func TestActionsService_ListSelectedReposForOrgVariable(t *testing.T) {
ctx := t.Context()
repos, _, err := client.Actions.ListSelectedReposForOrgVariable(ctx, "o", "NAME", opts)
if err != nil {
t.Errorf("Actions.( returned error: %v", err)
t.Errorf("Actions.ListSelectedReposForOrgVariable returned error: %v", err)
}

want := &SelectedReposList{
Expand All @@ -418,7 +418,7 @@ func TestActionsService_ListSelectedReposForOrgVariable(t *testing.T) {
},
}
if !cmp.Equal(repos, want) {
t.Errorf("Actions.( returned %+v, want %+v", repos, want)
t.Errorf("Actions.ListSelectedReposForOrgVariable returned %+v, want %+v", repos, want)
}

const methodName = "ListSelectedReposForOrgVariable"
Expand All @@ -436,7 +436,7 @@ func TestActionsService_ListSelectedReposForOrgVariable(t *testing.T) {
})
}

func TestActionsService_SetSelectedReposForOrgSVariable(t *testing.T) {
func TestActionsService_SetSelectedReposForOrgVariable(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand All @@ -455,7 +455,7 @@ func TestActionsService_SetSelectedReposForOrgSVariable(t *testing.T) {
ctx := t.Context()
_, err := client.Actions.SetSelectedReposForOrgVariable(ctx, "o", "NAME", input)
if err != nil {
t.Errorf("Actions.( returned error: %v", err)
t.Errorf("Actions.SetSelectedReposForOrgVariable returned error: %v", err)
}

const methodName = "SetSelectedReposForOrgVariable"
Expand Down
26 changes: 13 additions & 13 deletions github/actions_workflow_runs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestActionsService_ListWorkflowRunsByID(t *testing.T) {
ctx := t.Context()
runs, _, err := client.Actions.ListWorkflowRunsByID(ctx, "o", "r", 29679449, opts)
if err != nil {
t.Errorf("Actions.ListWorkFlowRunsByID returned error: %v", err)
t.Errorf("Actions.ListWorkflowRunsByID returned error: %v", err)
}

want := &WorkflowRuns{
Expand Down Expand Up @@ -74,7 +74,7 @@ func TestActionsService_ListWorkflowRunsFileName(t *testing.T) {
ctx := t.Context()
runs, _, err := client.Actions.ListWorkflowRunsByFileName(ctx, "o", "r", "29679449", opts)
if err != nil {
t.Errorf("Actions.ListWorkFlowRunsByFileName returned error: %v", err)
t.Errorf("Actions.ListWorkflowRunsByFileName returned error: %v", err)
}

want := &WorkflowRuns{
Expand Down Expand Up @@ -383,7 +383,7 @@ func TestActionsService_GetWorkflowRunAttemptLogs_unexpectedCode(t *testing.T) {
}
}

func TestActionsService_RerunWorkflowRunByID(t *testing.T) {
func TestActionsService_RerunWorkflowByID(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand All @@ -398,7 +398,7 @@ func TestActionsService_RerunWorkflowRunByID(t *testing.T) {
t.Errorf("Actions.RerunWorkflowByID returned error: %v", err)
}
if resp.StatusCode != http.StatusCreated {
t.Errorf("Actions.RerunWorkflowRunByID returned status: %v, want %v", resp.StatusCode, http.StatusCreated)
t.Errorf("Actions.RerunWorkflowByID returned status: %v, want %v", resp.StatusCode, http.StatusCreated)
}

const methodName = "RerunWorkflowByID"
Expand Down Expand Up @@ -578,7 +578,7 @@ func TestActionsService_GetWorkflowRunLogs_StatusMovedPermanently_dontFollowRedi
ctx := t.Context()
_, resp, _ := client.Actions.GetWorkflowRunLogs(ctx, "o", "r", 399444496, 0)
if resp.StatusCode != http.StatusMovedPermanently {
t.Errorf("Actions.GetWorkflowJobLogs returned status: %v, want %v", resp.StatusCode, http.StatusMovedPermanently)
t.Errorf("Actions.GetWorkflowRunLogs returned status: %v, want %v", resp.StatusCode, http.StatusMovedPermanently)
}
})
}
Expand Down Expand Up @@ -621,16 +621,16 @@ func TestActionsService_GetWorkflowRunLogs_StatusMovedPermanently_followRedirect
ctx := t.Context()
url, resp, err := client.Actions.GetWorkflowRunLogs(ctx, "o", "r", 399444496, 1)
if err != nil {
t.Errorf("Actions.GetWorkflowJobLogs returned error: %v", err)
t.Errorf("Actions.GetWorkflowRunLogs returned error: %v", err)
}

if resp.StatusCode != http.StatusFound {
t.Errorf("Actions.GetWorkflowJobLogs returned status: %v, want %v", resp.StatusCode, http.StatusFound)
t.Errorf("Actions.GetWorkflowRunLogs returned status: %v, want %v", resp.StatusCode, http.StatusFound)
}

want := "https://github.com/a"
if url.String() != want {
t.Errorf("Actions.GetWorkflowJobLogs returned %+v, want %+v", url, want)
t.Errorf("Actions.GetWorkflowRunLogs returned %+v, want %+v", url, want)
}

const methodName = "GetWorkflowRunLogs"
Expand Down Expand Up @@ -694,7 +694,7 @@ func TestActionsService_GetWorkflowRunLogs_unexpectedCode(t *testing.T) {
}
}

func TestActionService_ListRepositoryWorkflowRuns(t *testing.T) {
func TestActionsService_ListRepositoryWorkflowRuns(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand Down Expand Up @@ -743,7 +743,7 @@ func TestActionService_ListRepositoryWorkflowRuns(t *testing.T) {
})
}

func TestActionService_DeleteWorkflowRun(t *testing.T) {
func TestActionsService_DeleteWorkflowRun(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand All @@ -769,7 +769,7 @@ func TestActionService_DeleteWorkflowRun(t *testing.T) {
})
}

func TestActionService_DeleteWorkflowRunLogs(t *testing.T) {
func TestActionsService_DeleteWorkflowRunLogs(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand Down Expand Up @@ -895,7 +895,7 @@ func TestActionsService_GetWorkflowRunUsageByID(t *testing.T) {
})
}

func TestActionService_PendingDeployments(t *testing.T) {
func TestActionsService_PendingDeployments(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand Down Expand Up @@ -933,7 +933,7 @@ func TestActionService_PendingDeployments(t *testing.T) {
})
}

func TestActionService_GetPendingDeployments(t *testing.T) {
func TestActionsService_GetPendingDeployments(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand Down
6 changes: 3 additions & 3 deletions github/actions_workflows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func TestActionsService_EnableWorkflowByID(t *testing.T) {
})
}

func TestActionsService_EnableWorkflowByFilename(t *testing.T) {
func TestActionsService_EnableWorkflowByFileName(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

Expand All @@ -442,14 +442,14 @@ func TestActionsService_EnableWorkflowByFilename(t *testing.T) {
ctx := t.Context()
_, err := client.Actions.EnableWorkflowByFileName(ctx, "o", "r", "main.yml")
if err != nil {
t.Errorf("Actions.EnableWorkflowByFilename returned error: %v", err)
t.Errorf("Actions.EnableWorkflowByFileName returned error: %v", err)
}

// Test s.client.NewRequest failure
client.baseURL.Path = ""
_, err = client.Actions.EnableWorkflowByFileName(ctx, "o", "r", "main.yml")
if err == nil {
t.Error("client.BaseURL.Path='' EnableWorkflowByFilename err = nil, want error")
t.Error("client.BaseURL.Path='' EnableWorkflowByFileName err = nil, want error")
}

const methodName = "EnableWorkflowByFileName"
Expand Down
Loading
Loading