test: Always create test config for package testing (#12390)
This commit is contained in:
parent
9f55bc605e
commit
0fadaec30c
|
|
@ -95,9 +95,7 @@ func (c *Container) Install(packageName ...string) error {
|
|||
}
|
||||
|
||||
func (c *Container) CheckStatus(serviceName string) error {
|
||||
// the RPM does not start automatically service on install
|
||||
// write valid, but simple config file and start
|
||||
if c.packageManager != "apt" {
|
||||
// push a valid config first, then start the service
|
||||
err := c.client.Exec(
|
||||
c.Name,
|
||||
"bash",
|
||||
|
|
@ -116,9 +114,8 @@ func (c *Container) CheckStatus(serviceName string) error {
|
|||
_ = c.client.Exec(c.Name, "journalctl", "--no-pager", "--unit", serviceName)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err := c.client.Exec(c.Name, "systemctl", "status", serviceName)
|
||||
err = c.client.Exec(c.Name, "systemctl", "status", serviceName)
|
||||
if err != nil {
|
||||
_ = c.client.Exec(c.Name, "journalctl", "--no-pager", "--unit", serviceName)
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in New Issue