Documentation ¶
Index ¶
- func MakeFakeLogr() *fakelogr.FakeLogger
- func MakeJWToken(t *testing.T, key *rsa.PrivateKey, email string) string
- func MakeKeysetServer(t *testing.T, key *rsa.PrivateKey) *httptest.Server
- func MakeRSAPrivateKey(t *testing.T) *rsa.PrivateKey
- func Setenv(k, v string) func()
- func SetupFlux() (flux.Flux, string, error)
- type DummyPullRequest
- type K8sTestEnv
- type LocalFluxRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeFakeLogr ¶ added in v0.3.0
func MakeFakeLogr() *fakelogr.FakeLogger
MakeFakeLogr returns an API compliant logr object that can be used for unit testing. Without these stubs filled in, a nil pointer exception will be thrown on log.V().
func MakeJWToken ¶ added in v0.6.1
MakeJWToken creates and signs a token with the provided key.
func MakeKeysetServer ¶ added in v0.6.1
MakeKeysetServer starts an HTTP server that can serve JSONWebKey sets.
func MakeRSAPrivateKey ¶ added in v0.6.1
func MakeRSAPrivateKey(t *testing.T) *rsa.PrivateKey
MakeRSAPrivateKey generates and returns an RSA Private Key.
Types ¶
type DummyPullRequest ¶ added in v0.3.1
type DummyPullRequest struct { }
func (DummyPullRequest) APIObject ¶ added in v0.3.1
func (d DummyPullRequest) APIObject() interface{}
func (DummyPullRequest) Get ¶ added in v0.3.1
func (d DummyPullRequest) Get() gitprovider.PullRequestInfo
type K8sTestEnv ¶
type K8sTestEnv struct { Client client.Client DynClient dynamic.Interface RestMapper *restmapper.DeferredDiscoveryRESTMapper Rest *rest.Config Stop func() }
func StartK8sTestEnvironment ¶
func StartK8sTestEnvironment(crdPaths []string) (*K8sTestEnv, error)
Note that crdPaths are relative to the path of the test file, NOT the current working directory or path that the tests were started from.
Click to show internal directories.
Click to hide internal directories.