testserver

package
v0.27.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultActionsToken

func DefaultActionsToken(t ginkgo.GinkgoTInterface) string

func New

func New(t ginkgo.GinkgoTInterface, handler http.Handler, options ...actionsServerOption) *actionsServer

New returns a new httptest.Server that handles the authentication requests neeeded to create a new client. Any requests not made to the /actions/runners/registration-token or /actions/runner-registration endpoints will be handled by the provided handler. The returned server is started and will be automatically closed when the test ends.

TODO: this uses ginkgo interface _only_ to support our current controller tests

func NewUnstarted

func NewUnstarted(t ginkgo.GinkgoTInterface, handler http.Handler, options ...actionsServerOption) *actionsServer

TODO: this uses ginkgo interface _only_ to support our current controller tests

func WithActionsRegistrationTokenHandler added in v0.27.5

func WithActionsRegistrationTokenHandler(h http.HandlerFunc) actionsServerOption

func WithActionsToken

func WithActionsToken(token string) actionsServerOption

func WithRunnerRegistrationTokenHandler added in v0.27.5

func WithRunnerRegistrationTokenHandler(h http.HandlerFunc) actionsServerOption

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL