Documentation ¶
Overview ¶
package suite contains a ops service acceptance test suite that is backend implementation independent, used both for services and clients
Index ¶
- Variables
- func SetUpTestPackage(c *C, apps app.Applications, packages pack.PackageService) loc.Locator
- type OpsSuite
- type TestOpsProxy
- type TestProxy
- func (t *TestProxy) CertAuthorities(withPrivateKey bool) ([]services.CertAuthority, error)
- func (t *TestProxy) DeleteAuthority(domainName string) error
- func (t *TestProxy) DeleteRemoteCluster(clusterName string) error
- func (t *TestProxy) ExecuteCommand(ctx context.Context, domainName, nodeAddr, command string, ...) error
- func (t *TestProxy) GenerateUserCert(pub []byte, user string, ttl time.Duration) ([]byte, error)
- func (t *TestProxy) GetCertAuthorities(caType services.CertAuthType) ([]services.CertAuthority, error)
- func (t *TestProxy) GetCertAuthority(id services.CertAuthID, withPrivateKeys bool) (*authority.TLSKeyPair, error)
- func (t *TestProxy) GetClient() teleauth.ClientI
- func (t *TestProxy) GetLocalAuthorityDomain() string
- func (t *TestProxy) GetPlanetLeaderIP() string
- func (t *TestProxy) GetProxyClient(ctx context.Context, siteName string, labels map[string]string) (*teleclient.ProxyClient, error)
- func (t *TestProxy) GetServerCount(ctx context.Context, domainName string) (int, error)
- func (t *TestProxy) GetServers(ctx context.Context, domainName string, labels map[string]string) ([]services.Server, error)
- func (t *TestProxy) ReverseTunnelAddr() string
- func (t *TestProxy) TrustCertAuthority(services.CertAuthority) error
- func (t *TestProxy) UpsertUser(username, password string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var PrivKey = []byte(`-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvJGHcmQNWUjY2eKasmw171qZR0B5FOnzy/nAGB1JAE+QokFe
Bjo8Gkk3L2TSuVNn0NI5uo5Jwp7GYtbfSbowo11E922Bwp0sFoVzeeUMyLud9EPz
Hl8+VvE8WEa1lC4D4aqravAfTeeePrONIYoBttX5oYXQ7aZkM8N7yS7KWNOZpy9f
n1vkSCpDOK29edLHWVyiDcXzULxEbXhPFl9Ly9shuEbqic2LRgg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KD4xl0T3V928VA8zLGEyD22WGY5Zj93PtylJ4r3uEw8cuLm0M
LdSp0EPWZQ6sMmAOCbpwBjNj2fonL7C5bMF2bnpJzCJPW9w7NZcfivr68qnp8yzy
fE2RAoGBALWvlHVH/29KOVmM52sOk49tcyc3czjs/YANvbokiItxOB8VPY6QQQnS
/CBsCZxUuWegYmkUnstHDmY1LYqjxW4goOqizIksaReivPmsTuQ1qd+aqXTfg2pt
uy6c6X17xkP5q2Lq4i90ikyWm3Oc25aUEw48pRyK/6rABRUzpDLB
-----END RSA PRIVATE KEY-----`)
PrivKey is the test private key
var PubKey = []byte(`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8kYdyZA1ZSNjZ4pqybDXvWplHQHkU6fPL+cAYHUkAT5CiQV4GOjwaSTcvZNK5U2fQ0jm6jknCnsZi1t9JujCjXUT3bYHCnSwWhXN55QzIu530Q/MeXz5W8TxYRrWULgPhqqtq8B9N554+s40higG21fmhhdDtpmQzw3vJLspY05mnL1+fW+RIKkM4rb150sdZXKINxfNQvERteE8WX0vL2yG4RuqJzYtGCDEGeHd+HLne7xfmqPxun7bUYaxAlplhm1z2J41hqaj8pBwDSEV9SBOZXvh6FjS9nvJCT7Z1bbZwWrAO/7E2ac0eV+5iEc0J+TyufO3F9uod+J+AICtB`)
PubKey is the test public key
var TestAuthorities = []services.CertAuthority{ TestUserAuthority, }
TestAuthorities is a list of test CAs
var TestUserAuthority = services.NewCertAuthority(services.UserCA, "example.com", [][]byte{PubKey}, nil, nil)
TestUserAuthority is a test CA
Functions ¶
func SetUpTestPackage ¶
func SetUpTestPackage(c *C, apps app.Applications, packages pack.PackageService) loc.Locator
Types ¶
type OpsSuite ¶
type OpsSuite struct { O ops.Operator U users.Users C *timetools.FreezedTime // contains filtered or unexported fields }
func (*OpsSuite) AccountsCRUD ¶
func (s *OpsSuite) AccountsCRUD(c *C)
func (*OpsSuite) InstallInstructions ¶
func (s *OpsSuite) InstallInstructions(c *C)
func (*OpsSuite) SetUpTestPackage ¶
func (s *OpsSuite) SetUpTestPackage(apps app.Applications, packages pack.PackageService, c *C) (*loc.Locator, error)
type TestOpsProxy ¶
func (*TestOpsProxy) GetService ¶
func (p *TestOpsProxy) GetService(link storage.OpsCenterLink) (ops.Operator, error)
type TestProxy ¶
type TestProxy struct { }
func (*TestProxy) CertAuthorities ¶
func (t *TestProxy) CertAuthorities(withPrivateKey bool) ([]services.CertAuthority, error)
CertAuthorities returns a list of certificate authorities proxy wants remote teleport sites to trust
func (*TestProxy) DeleteAuthority ¶
DeleteAuthority deletes teleport authorities for the provided domain name
func (*TestProxy) DeleteRemoteCluster ¶
DeleteRemoteCluster deletes remote cluster resource
func (*TestProxy) ExecuteCommand ¶
func (t *TestProxy) ExecuteCommand(ctx context.Context, domainName, nodeAddr, command string, stdout, stderr io.Writer) error
ExecuteCommand executes a command on a remote node addrress for a given site domain
func (*TestProxy) GenerateUserCert ¶
GenerateUserCert is a no-op
func (*TestProxy) GetCertAuthorities ¶
func (t *TestProxy) GetCertAuthorities(caType services.CertAuthType) ([]services.CertAuthority, error)
GetCertAuthorities is a no-op
func (*TestProxy) GetCertAuthority ¶
func (t *TestProxy) GetCertAuthority(id services.CertAuthID, withPrivateKeys bool) (*authority.TLSKeyPair, error)
GetCertAuthority is a no-op
func (*TestProxy) GetLocalAuthorityDomain ¶
GetLocalAuthorityDomain is a no-op
func (*TestProxy) GetPlanetLeaderIP ¶
GetPlanetLeaderIP is a no-op
func (*TestProxy) GetProxyClient ¶
func (t *TestProxy) GetProxyClient(ctx context.Context, siteName string, labels map[string]string) (*teleclient.ProxyClient, error)
GetProxyClient is a no-op
func (*TestProxy) GetServerCount ¶
GetServerCount returns a number of servers belonging to a particular site
func (*TestProxy) GetServers ¶
func (t *TestProxy) GetServers(ctx context.Context, domainName string, labels map[string]string) ([]services.Server, error)
GetServers returns a list of servers matching particular label key value pair expression and returns a list of servers domainName is a site domain name
func (*TestProxy) ReverseTunnelAddr ¶
func (*TestProxy) TrustCertAuthority ¶
func (t *TestProxy) TrustCertAuthority(services.CertAuthority) error
TrustCertAuthority sets up trust for certificate authority