Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3942547
DevCentralDockerTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
DevCentralDockerTest.php
View Options
<?php
require_once
'utils/DockerContainer.php'
;
class
DevCentralDockerTest
extends
PHPUnit_Framework_TestCase
{
private
$container
;
const
DOCKER_CONTAINER
=
'devcentral'
;
protected
function
setUp
()
{
if
(!
getenv
(
'DOCKER_ACCESS'
))
{
$this
->
markTestSkipped
(
"No access to Docker engine."
);
}
$this
->
container
=
new
DockerContainer
(
getenv
(
'DOCKER_HOST'
),
self
::
DOCKER_CONTAINER
);
}
public
function
testInitialized
()
{
$file
=
$this
->
container
->
exec
(
"ls /opt/phabricator/.initialized"
);
$this
->
assertSame
(
"/opt/phabricator/.initialized"
,
$file
,
".initialized file is missing: that could mean the whole /usr/local/bin/setup-phabricator didn't run."
);
}
public
function
testProcesses
()
{
$processes
=
$this
->
container
->
exec
(
"ps auxw"
);
$expectedProcesses
=
[
'nginx: master process'
,
'nginx: worker process'
,
'php-fpm: master process'
,
'PhabricatorTaskmasterDaemon'
,
'PhabricatorBot'
,
];
foreach
(
$expectedProcesses
as
$expectedProcess
)
{
$this
->
assertContains
(
$expectedProcess
,
$processes
,
"The process $expectedProcess isn't currently launched."
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Dec 26, 16:28 (20 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2315257
Default Alt Text
DevCentralDockerTest.php (1 KB)
Attached To
Mode
rTESTSPRODENV Test suite for operations: prod-environment-behaves-correctly
Attached
Detach File
Event Timeline
Log In to Comment