Documentation
¶
Index ¶
- func CleanApplicationContainers(appDir, composeProjectName string, logger *util.Logger) error
- func CleanServiceTestContainers(appDir, composeProjectName string, logger *util.Logger) error
- func TestApp(appContext types.AppContext, logger *util.Logger, ...) (bool, error)
- func TestService(serviceContext types.ServiceContext, logger *util.Logger, ...) (bool, error)
- type Runner
- type ServiceTester
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanApplicationContainers ¶
CleanApplicationContainers cleans all Docker containers started by the docker-compose.yml file under appDir/tmp/
func CleanServiceTestContainers ¶
CleanServiceTestContainers cleans all Docker containers started by the docker-compose.yml files under appDir/serviceLocation/tests/tmp/
func TestApp ¶ added in v0.27.0
func TestApp(appContext types.AppContext, logger *util.Logger, mode composebuilder.BuildMode) (bool, error)
TestApp runs the tests for the entire application and return true if the tests passed and an error if any
func TestService ¶ added in v0.27.0
func TestService(serviceContext types.ServiceContext, logger *util.Logger, mode composebuilder.BuildMode) (bool, error)
TestService runs the tests for the service and return true if the tests passed and an error if any
Types ¶
type Runner ¶
type Runner struct {
AppConfig types.AppConfig
AppDir string
HomeDir string
ServiceConfigs map[string]types.ServiceConfig
BuiltDependencies map[string]config.AppDevelopmentDependency
DockerComposeDir string
DockerComposeProjectName string
BuildMode composebuilder.BuildMode
// contains filtered or unexported fields
}
Runner runs the overall application
type ServiceTester ¶
type ServiceTester struct {
AppConfig types.AppConfig
HomeDir string
DirName string
ServiceConfig types.ServiceConfig
BuiltDependencies map[string]config.AppDevelopmentDependency
AppDir string
ServiceLocation string
BuildMode composebuilder.BuildMode
DockerComposeProjectName string
Logger *util.Logger
RunOptions composerunner.RunOptions
}
ServiceTester runs the tests for the given service
func NewServiceTester ¶
func NewServiceTester(serviceContext types.ServiceContext, logger *util.Logger, mode composebuilder.BuildMode) (*ServiceTester, error)
NewServiceTester is ServiceTester's constructor
func (*ServiceTester) Run ¶
func (s *ServiceTester) Run() (int, error)
Run runs the tests for the service and return true if the tests passed and an error if any
func (*ServiceTester) Shutdown ¶ added in v0.27.0
func (s *ServiceTester) Shutdown() error
Shutdown shuts down the tests