-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove most of old test (we still need to migrate some assertions)
- Loading branch information
Showing
5 changed files
with
0 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,61 +4,11 @@ | |
|
||
namespace Setono\Deployer\DotEnv\recipe; | ||
|
||
use Deployer\Console\Application; | ||
use Deployer\Deployer; | ||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Tester\ApplicationTester; | ||
|
||
final class DeployTest extends TestCase | ||
{ | ||
private ApplicationTester $tester; | ||
|
||
private Deployer $deployer; | ||
|
||
public static function setUpBeforeClass(): void | ||
{ | ||
set_include_path(get_include_path() . \PATH_SEPARATOR . __DIR__ . '/../../vendor/deployer/deployer'); | ||
|
||
// init repository | ||
$repository = __DIR__ . '/repository'; | ||
|
||
exec("cd $repository && git init"); | ||
exec("cd $repository && git add ."); | ||
exec("cd $repository && git config user.name 'Joachim Løvgaard'"); | ||
exec("cd $repository && git config user.email '[email protected]'"); | ||
exec("cd $repository && git commit -m 'first commit'"); | ||
} | ||
|
||
protected function setUp(): void | ||
{ | ||
// init deployer and application tester0 | ||
$console = new Application(); | ||
$console->setAutoExit(false); | ||
$this->tester = new ApplicationTester($console); | ||
|
||
$this->deployer = new Deployer($console); | ||
Deployer::loadRecipe(__DIR__ . '/deploy.php'); | ||
$this->deployer->init(); | ||
} | ||
|
||
protected function tearDown(): void | ||
{ | ||
foreach ($this->deployer->hosts as $host) { | ||
$deployPath = $host->get('deploy_path'); | ||
exec("rm -rf $deployPath"); | ||
} | ||
} | ||
|
||
public static function tearDownAfterClass(): void | ||
{ | ||
$git = __DIR__ . '/repository/.git'; | ||
exec("rm -rf $git"); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_deploys(): void | ||
{ | ||
$this->tester->run([ | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.