INNER CODE UNIT · Go

func

evryfs/github-actions-runner-operator · controllers/githubactionrunner_controller_test.go:24

func (r *mockAPI) GetRunners(ctx context.Context, organization string, repository string, token string) ([]*github.Runner, error) {
	args := r.Called(organization, repository, token)
	return args.Get(0).([]*github.Runner), args.Error(1)
}

func (r *mockAPI) UnregisterRunner(ctx context.Context, organization string, repository string, token string, runnerID int64) error {
	return nil
}

func (r *mockAPI) CreateRegistrationToken(ctx context.Context, organization string, repository string, token string) (*github.RegistrationToken, error) {
	return &github.RegistrationToken{
		Token:     github.String("sometoken"),
		ExpiresAt: &github.Timestamp{},
	}, nil
}

type mockAPI struct {
	mock.Mock

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…