Documentation ¶
Index ¶
- Constants
- Variables
- func B(b bool) *bool
- func I(i int64) *int64
- func IsURI(rawurl string) bool
- func NewRegistry() strfmt.Registry
- func NewVersionProviderTest() versions.VersionProvider
- func S(s string) *string
- func ST(t time.Time) *strfmt.DateTime
- func T(t time.Time) *time.Time
- func ToPtr[T any](in T) *T
- type Config
- type FabricTestContext
- func (ctx *FabricTestContext) NewControlChannelListener() channel.UnderlayListener
- func (ctx *FabricTestContext) NewHttpClient(transport *http.Transport) *http.Client
- func (ctx *FabricTestContext) NewRestClient(i id.Identity) *resty.Client
- func (ctx *FabricTestContext) NewRestClientWithDefaults() *resty.Client
- func (ctx *FabricTestContext) NewTransport(i id.Identity) *http.Transport
- func (ctx *FabricTestContext) StartServer()
- func (ctx *FabricTestContext) StartServerFor(test string, clean bool)
- func (ctx *FabricTestContext) T() *testing.T
- func (ctx *FabricTestContext) Teardown()
- type JsonMarshallable
- type RestClient
- type SessionRequest
- type TestConn
- type TestContext
- func (ctx *TestContext) CreateEnrollAndStartEdgeRouter(roleAttributes ...string)
- func (ctx *TestContext) CreateEnrollAndStartTunnelerEdgeRouter(roleAttributes ...string)
- func (ctx *TestContext) DefaultClientApiClient() *resty.Client
- func (ctx *TestContext) DefaultManagementApiClient() *resty.Client
- func (ctx *TestContext) EnrollIdentity(identityId string) *ziti.Config
- func (ctx *TestContext) NewClientComponents(apiPath string) (*resty.Client, *http.Client, *http.Transport)
- func (ctx *TestContext) NewClientComponentsWithClientCert(cert *x509.Certificate, privateKey crypto.PrivateKey) (*resty.Client, *http.Client, *http.Transport)
- func (ctx *TestContext) NewHttpClient(transport *http.Transport) *http.Client
- func (ctx *TestContext) NewRestClient(i idlib.Identity) *resty.Client
- func (ctx *TestContext) NewRestClientWithDefaults() *resty.Client
- func (ctx *TestContext) NewTransport() *http.Transport
- func (ctx *TestContext) NewTransportWithClientCert(cert *x509.Certificate, privateKey crypto.PrivateKey) *http.Transport
- func (ctx *TestContext) NewTransportWithIdentity(i idlib.Identity) *http.Transport
- func (ctx *TestContext) NewWsMgmtChannel(bindHandler channel.BindHandler) (channel.Channel, error)
- func (ctx *TestContext) RequireAdminClientApiLogin()
- func (ctx *TestContext) RequireAdminManagementApiLogin()
- func (ctx *TestContext) RequireChildWith(container *gabs.Container, attribute string, value interface{}) *gabs.Container
- func (ctx *TestContext) RequireGetNonNilPathValue(container *gabs.Container, searchPath ...string) *gabs.Container
- func (ctx *TestContext) RequireNoChildWith(container *gabs.Container, attribute string, value interface{}) *gabs.Container
- func (ctx *TestContext) RequireNotFoundError(httpStatus int, body []byte) *gabs.Container
- func (ctx *TestContext) RequirePathExists(container *gabs.Container, searchPath ...string)
- func (ctx *TestContext) StartServer()
- func (ctx *TestContext) StartServerFor(testDb string, clean bool)
- func (ctx *TestContext) T() *testing.T
- func (ctx *TestContext) Teardown()
- func (ctx *TestContext) WrapConn(conn edge.Conn, err error) *TestConn
- func (ctx *TestContext) WrapNetConn(conn edge.Conn, err error) *TestConn
- type VersionProviderTest
- func (v VersionProviderTest) AsVersionInfo() *versions.VersionInfo
- func (v VersionProviderTest) Branch() string
- func (v VersionProviderTest) BuildDate() string
- func (v VersionProviderTest) EncoderDecoder() versions.VersionEncDec
- func (v VersionProviderTest) Revision() string
- func (v VersionProviderTest) Version() string
Constants ¶
View Source
const ( EdgeClientApiPath = "/edge/client/v1" EdgeManagementApiPath = "/edge/management/v1" )
View Source
const ( ControllerConfFile = "ats-ctrl.yml" EdgeRouterConfFile = "ats-edge.router.yml" TunnelerEdgeRouterConfFile = "ats-edge-tunneler.router.yml" TransitRouterConfFile = "ats-transit.router.yml" )
View Source
const ( FabricControllerConfFile = "./testdata/config/ctrl.yml" FabricRouterConfFile = "./testdata/config/router-%v.yml" )
Variables ¶
View Source
var DefaultFormats strfmt.Registry = NewRegistry()
Functions ¶
func NewRegistry ¶
func NewVersionProviderTest ¶
func NewVersionProviderTest() versions.VersionProvider
Types ¶
type FabricTestContext ¶
type FabricTestContext struct { Req *require.Assertions LogLevel string ControllerConfig *config.Config // contains filtered or unexported fields }
func NewFabricTestContext ¶
func NewFabricTestContext(t *testing.T) *FabricTestContext
func (*FabricTestContext) NewControlChannelListener ¶
func (ctx *FabricTestContext) NewControlChannelListener() channel.UnderlayListener
func (*FabricTestContext) NewHttpClient ¶
func (ctx *FabricTestContext) NewHttpClient(transport *http.Transport) *http.Client
func (*FabricTestContext) NewRestClient ¶
func (ctx *FabricTestContext) NewRestClient(i id.Identity) *resty.Client
func (*FabricTestContext) NewRestClientWithDefaults ¶
func (ctx *FabricTestContext) NewRestClientWithDefaults() *resty.Client
func (*FabricTestContext) NewTransport ¶
func (ctx *FabricTestContext) NewTransport(i id.Identity) *http.Transport
func (*FabricTestContext) StartServer ¶
func (ctx *FabricTestContext) StartServer()
func (*FabricTestContext) StartServerFor ¶
func (ctx *FabricTestContext) StartServerFor(test string, clean bool)
func (*FabricTestContext) T ¶
func (ctx *FabricTestContext) T() *testing.T
func (*FabricTestContext) Teardown ¶
func (ctx *FabricTestContext) Teardown()
type JsonMarshallable ¶
type RestClient ¶
type RestClient struct { *FabricTestContext // contains filtered or unexported fields }
func (*RestClient) EnrollRouter ¶
func (self *RestClient) EnrollRouter(id string, name string, certFile string)
type SessionRequest ¶
type SessionRequest struct {
ServiceId string `json:"serviceId"`
}
type TestConn ¶
func (*TestConn) ReadExpected ¶
func (*TestConn) ReadString ¶
func (*TestConn) RequireClose ¶
func (conn *TestConn) RequireClose()
type TestContext ¶
type TestContext struct { *require.Assertions ApiHost string AdminAuthenticator *updbAuthenticator AdminManagementSession *session AdminClientSession *session EdgeController *server.Controller Req *require.Assertions LogLevel string ControllerConfig *config.Config // contains filtered or unexported fields }
func GetTestContext ¶
func GetTestContext() *TestContext
func NewTestContext ¶
func NewTestContext(t *testing.T) *TestContext
func (*TestContext) CreateEnrollAndStartEdgeRouter ¶
func (ctx *TestContext) CreateEnrollAndStartEdgeRouter(roleAttributes ...string)
func (*TestContext) CreateEnrollAndStartTunnelerEdgeRouter ¶
func (ctx *TestContext) CreateEnrollAndStartTunnelerEdgeRouter(roleAttributes ...string)
func (*TestContext) DefaultClientApiClient ¶
func (ctx *TestContext) DefaultClientApiClient() *resty.Client
func (*TestContext) DefaultManagementApiClient ¶
func (ctx *TestContext) DefaultManagementApiClient() *resty.Client
func (*TestContext) EnrollIdentity ¶
func (ctx *TestContext) EnrollIdentity(identityId string) *ziti.Config
func (*TestContext) NewClientComponents ¶
func (*TestContext) NewClientComponentsWithClientCert ¶
func (ctx *TestContext) NewClientComponentsWithClientCert(cert *x509.Certificate, privateKey crypto.PrivateKey) (*resty.Client, *http.Client, *http.Transport)
func (*TestContext) NewHttpClient ¶
func (ctx *TestContext) NewHttpClient(transport *http.Transport) *http.Client
func (*TestContext) NewRestClient ¶
func (ctx *TestContext) NewRestClient(i idlib.Identity) *resty.Client
func (*TestContext) NewRestClientWithDefaults ¶
func (ctx *TestContext) NewRestClientWithDefaults() *resty.Client
func (*TestContext) NewTransport ¶
func (ctx *TestContext) NewTransport() *http.Transport
func (*TestContext) NewTransportWithClientCert ¶
func (ctx *TestContext) NewTransportWithClientCert(cert *x509.Certificate, privateKey crypto.PrivateKey) *http.Transport
func (*TestContext) NewTransportWithIdentity ¶
func (ctx *TestContext) NewTransportWithIdentity(i idlib.Identity) *http.Transport
func (*TestContext) NewWsMgmtChannel ¶ added in v0.31.1
func (ctx *TestContext) NewWsMgmtChannel(bindHandler channel.BindHandler) (channel.Channel, error)
func (*TestContext) RequireAdminClientApiLogin ¶
func (ctx *TestContext) RequireAdminClientApiLogin()
func (*TestContext) RequireAdminManagementApiLogin ¶
func (ctx *TestContext) RequireAdminManagementApiLogin()
func (*TestContext) RequireChildWith ¶
func (*TestContext) RequireGetNonNilPathValue ¶
func (*TestContext) RequireNoChildWith ¶
func (*TestContext) RequireNotFoundError ¶
func (ctx *TestContext) RequireNotFoundError(httpStatus int, body []byte) *gabs.Container
func (*TestContext) RequirePathExists ¶
func (ctx *TestContext) RequirePathExists(container *gabs.Container, searchPath ...string)
func (*TestContext) StartServer ¶
func (ctx *TestContext) StartServer()
func (*TestContext) StartServerFor ¶
func (ctx *TestContext) StartServerFor(testDb string, clean bool)
func (*TestContext) T ¶
func (ctx *TestContext) T() *testing.T
func (*TestContext) Teardown ¶
func (ctx *TestContext) Teardown()
func (*TestContext) WrapConn ¶
func (ctx *TestContext) WrapConn(conn edge.Conn, err error) *TestConn
func (*TestContext) WrapNetConn ¶
func (ctx *TestContext) WrapNetConn(conn edge.Conn, err error) *TestConn
type VersionProviderTest ¶
type VersionProviderTest struct { }
func (VersionProviderTest) AsVersionInfo ¶
func (v VersionProviderTest) AsVersionInfo() *versions.VersionInfo
func (VersionProviderTest) Branch ¶
func (v VersionProviderTest) Branch() string
func (VersionProviderTest) BuildDate ¶
func (v VersionProviderTest) BuildDate() string
func (VersionProviderTest) EncoderDecoder ¶
func (v VersionProviderTest) EncoderDecoder() versions.VersionEncDec
func (VersionProviderTest) Revision ¶
func (v VersionProviderTest) Revision() string
func (VersionProviderTest) Version ¶
func (v VersionProviderTest) Version() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.