Documentation ¶
Overview ¶
Package common contains basic test operation for agent-platform tests
Index ¶
- func CheckAgentBehaviour(t *testing.T, client *TestClient)
- func CheckAgentPython(t *testing.T, client *TestClient, version string)
- func CheckAgentRestarts(t *testing.T, client *TestClient)
- func CheckAgentStops(t *testing.T, client *TestClient)
- func CheckApmDisabled(t *testing.T, client *TestClient)
- func CheckApmEnabled(t *testing.T, client *TestClient)
- func CheckCWSBehaviour(t *testing.T, client *TestClient)
- func CheckInstallation(t *testing.T, client *TestClient)
- func CheckInstallationInstallScript(t *testing.T, client *TestClient)
- func CheckIntegrationInstall(t *testing.T, client *TestClient)
- func CheckUninstallation(t *testing.T, client *TestClient)
- type FileManager
- type Helper
- type PackageManager
- type ServiceManager
- type TestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAgentBehaviour ¶
func CheckAgentBehaviour(t *testing.T, client *TestClient)
CheckAgentBehaviour runs test to check the agent is behaving as expected
func CheckAgentPython ¶
func CheckAgentPython(t *testing.T, client *TestClient, version string)
CheckAgentPython runs tests to check the agent use the correct python version
func CheckAgentRestarts ¶
func CheckAgentRestarts(t *testing.T, client *TestClient)
CheckAgentRestarts runs tests to check the agent can restart properly
func CheckAgentStops ¶
func CheckAgentStops(t *testing.T, client *TestClient)
CheckAgentStops runs tests to check the agent can stop properly
func CheckApmDisabled ¶
func CheckApmDisabled(t *testing.T, client *TestClient)
CheckApmDisabled runs tests to check the agent behave properly when APM is disabled
func CheckApmEnabled ¶
func CheckApmEnabled(t *testing.T, client *TestClient)
CheckApmEnabled runs tests to check the agent behave properly with APM enabled
func CheckCWSBehaviour ¶
func CheckCWSBehaviour(t *testing.T, client *TestClient)
CheckCWSBehaviour runs tests to check the agent behave correctly when CWS is enabled
func CheckInstallation ¶
func CheckInstallation(t *testing.T, client *TestClient)
CheckInstallation run tests to check the installation of the agent
func CheckInstallationInstallScript ¶
func CheckInstallationInstallScript(t *testing.T, client *TestClient)
CheckInstallationInstallScript run tests to check the installation of the agent with the install script
func CheckIntegrationInstall ¶
func CheckIntegrationInstall(t *testing.T, client *TestClient)
CheckIntegrationInstall run test to test installation of integrations
func CheckUninstallation ¶
func CheckUninstallation(t *testing.T, client *TestClient)
CheckUninstallation runs check to see if the agent uninstall properly
Types ¶
type FileManager ¶
type FileManager interface { ReadFile(path string) (string, error) FileExists(path string) (string, error) FindFileInFolder(path string) (string, error) WriteFile(path string, content string) (string, error) }
FileManager generic interface
type PackageManager ¶
PackageManager generic interface
type ServiceManager ¶
type ServiceManager interface { Status(service string) (string, error) Start(service string) (string, error) Stop(service string) (string, error) Restart(service string) (string, error) }
ServiceManager generic interface
type TestClient ¶
type TestClient struct { VMClient e2eClient.VM AgentClient e2eClient.Agent Helper Helper FileManager FileManager SvcManager ServiceManager PkgManager PackageManager }
TestClient contain the Agent Env and SvcManager and PkgManager for tests
func NewTestClient ¶
func NewTestClient(vmClient e2eClient.VM, agentClient e2eClient.Agent, fileManager FileManager, helper Helper) *TestClient
NewTestClient create a an ExtendedClient from VMClient and AgentCommandRunner, includes svcManager and pkgManager to write agent-platform tests
func (*TestClient) CheckPortBound ¶
func (c *TestClient) CheckPortBound(port int) error
CheckPortBound check if the port is currently bound, use netstat or ss
func (*TestClient) ExecuteWithRetry ¶
func (c *TestClient) ExecuteWithRetry(cmd string) (string, error)
ExecuteWithRetry execute the command with retry
func (*TestClient) GetPythonVersion ¶
func (c *TestClient) GetPythonVersion() (string, error)
GetPythonVersion returns python version from the Agent status
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package filemanager implement interfaces to run install-script tests
|
Package filemanager implement interfaces to run install-script tests |
Package helper implement interfaces to get some information that can be OS specific
|
Package helper implement interfaces to get some information that can be OS specific |
Package pkgmanager contains pkgmanager implementations
|
Package pkgmanager contains pkgmanager implementations |
Package svcmanager contains svcmanager implementations
|
Package svcmanager contains svcmanager implementations |