test

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTestingRootCmd added in v1.8.1

func DefaultTestingRootCmd() *cobra.Command

DefaultTestingRootCmd returns the DefaultRootCmd with server API mocked to return current version. Useful for tests which don't actually require the server but need to avoid extraneous warnings.

func GetMockNewAPIServerClient added in v1.8.1

func GetMockNewAPIServerClient() func(util_http.Client) kumactl_resources.ApiServerClient

Types

type CheckedHttpServer

type CheckedHttpServer interface {
	Server() *httptest.Server
	Ready() error
}

func NewHttpServer

func NewHttpServer(handler http.Handler) CheckedHttpServer

type MockAPIServerClient added in v1.8.1

type MockAPIServerClient struct {
	Version types.IndexResponse
}

func (*MockAPIServerClient) GetVersion added in v1.8.1

Jump to

Keyboard shortcuts

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