Documentation
¶
Index ¶
- Variables
- func CleanDB(t *testing.T) error
- func EnsureConfig(expectedConfig *model.TestingConfig) error
- func GenerateCertificate(bits int) (publicKey string, privateKey string, err error)
- func GetPersister(t *testing.T) (persistence.Persister, error)
- func JSONSubset(o1, o2 interface{}) error
- func SkipTestIfEnterpriseTesting(t *testing.T, skip bool)
- func WaitFor(t *testing.T, port int, method, path, component string, wantHTTPCode int) error
- func WaitForAdminAPI(t *testing.T) error
- func WaitForKong(t *testing.T) error
- func WaitForKongAdminAPI(t *testing.T) error
- func WaitForKongPort(t *testing.T, port int) error
- func WaitFunc(t *testing.T, fn func() error)
- type KongConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var BasedKongAdminAPIAddr = kong.String("http://localhost:8001")
View Source
var ( // TestBackoff retries every second for 30 seconds and then gives up. TestBackoff backoff.BackOff )
Functions ¶
func EnsureConfig ¶
func EnsureConfig(expectedConfig *model.TestingConfig) error
func GenerateCertificate ¶
GenerateCertificate creates a random certificate with the given amount of bits, and returns the PEM encoded public & private keys.
func GetPersister ¶
func GetPersister(t *testing.T) (persistence.Persister, error)
func JSONSubset ¶
func JSONSubset(o1, o2 interface{}) error
func SkipTestIfEnterpriseTesting ¶
SkipTestIfEnterpriseTesting skips OSS test when skip is true and KOKO_TEST_ENTERPRISE_TESTING environment variable is set to true.
func WaitForAdminAPI ¶
func WaitForKong ¶
func WaitForKongAdminAPI ¶
Types ¶
type KongConfig ¶
type KongConfig struct {
Services []*kong.Service `json:"services,omitempty"`
Routes []*kong.Route `json:"routes,omitempty"`
Plugins []*kong.Plugin `json:"plugins,omitempty"`
Upstreams []*kong.Upstream `json:"upstreams,omitempty"`
Targets []*kong.Target `json:"targets,omitempty"`
Consumers []*kong.Consumer `json:"consumers,omitempty"`
Certificates []*kong.Certificate `json:"certificates,omitempty"`
CACertificates []*kong.CACertificate `json:"ca_certificates,omitempty"`
SNIs []*kong.SNI `json:"snis,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.