Remove no longer needed methods
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
dead90f1cf
commit
8170b99561
|
@ -191,18 +191,6 @@ class NextcloudTestServerDockerHelper {
|
|||
$this->executeDockerCommand("rm --volumes --force " . $this->containerName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the container name.
|
||||
*
|
||||
* If the container has not been created yet the container name will be
|
||||
* null.
|
||||
*
|
||||
* @return string the container name.
|
||||
*/
|
||||
public function getContainerName() {
|
||||
return $this->containerName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the base URL of the Nextcloud test server.
|
||||
*
|
||||
|
@ -226,22 +214,6 @@ class NextcloudTestServerDockerHelper {
|
|||
return $this->executeDockerCommand("port " . $this->containerName . " 80");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the container is running or not.
|
||||
*
|
||||
* @return boolean true if the container is running, false otherwise.
|
||||
* @throws \Exception if the Docker command failed to execute.
|
||||
*/
|
||||
public function isContainerRunning() {
|
||||
// By default, "docker ps" only shows running containers, and the
|
||||
// "--quiet" option only shows the ID of the matching containers,
|
||||
// without table headers. Therefore, if the container is not running the
|
||||
// output will be empty (not even a new line, as the last line of output
|
||||
// returned by "executeDockerCommand" does not include a trailing new
|
||||
// line character).
|
||||
return $this->executeDockerCommand("ps --quiet --filter 'name=" . $this->containerName . "'") !== "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the container exists (no matter its state) or not.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue