Skip to content

Commit

Permalink
GL-2039: Updated testcases and alternate logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
akashkska committed Feb 27, 2024
1 parent 3f0507d commit 828996e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/Command/CodeStudio/CodeStudioWizardCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$projectAccessTokenName = 'acquia-codestudio';
$projectAccessToken = $this->createProjectAccessToken($project, $projectAccessTokenName);
$this->updateGitLabProject($project);
if ($projectSelected == 'Drupal_project') {
$this->setGitLabCiCdVariablesForPhpProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $phpVersion);
}
elseif ($projectSelected == 'Node_project') {
$this->setGitLabCiCdVariablesForNodeProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $nodeVersion);
switch ($projectSelected) {
case "Drupal_project":
$this->setGitLabCiCdVariablesForPhpProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $phpVersion);
break;
case "Node_project":
$this->setGitLabCiCdVariablesForNodeProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $nodeVersion);
break;
}
$this->createScheduledPipeline($project);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public function providerTestCommand(): array {
[
// 'Would you like to create a new Code Studio project?
'y',
// Select a project type Drupal_project
'0',
// Select PHP version 8.1
'0',
// Do you want to continue?
Expand All @@ -115,6 +117,8 @@ public function providerTestCommand(): array {
[
// 'Would you like to create a new Code Studio project?
'y',
// Select a project type Drupal_project
'0',
// Select PHP version 8.2
'1',
// Do you want to continue?
Expand All @@ -128,6 +132,50 @@ public function providerTestCommand(): array {
'--secret' => $this->secret,
],
],
[
// No projects.
[],
// Inputs.
[
// 'Would you like to create a new Code Studio project?
'y',
// Select a project type Node_project
'1',
// Select NODE version 18.17.1
'0',
// Do you want to continue?
'y',
// Would you like to perform a one time push of code from Acquia Cloud to Code Studio now? (yes/no) [yes]:
'y',
],
// Args.
[
'--key' => $this->key,
'--secret' => $this->secret,
],
],
[
// No projects.
[],
// Inputs.
[
// 'Would you like to create a new Code Studio project?
'y',
// Select a project type Node_project
'1',
// Select NODE version 20.5.1
'1',
// Do you want to continue?
'y',
// Would you like to perform a one time push of code from Acquia Cloud to Code Studio now? (yes/no) [yes]:
'y',
],
// Args.
[
'--key' => $this->key,
'--secret' => $this->secret,
],
],
[
// No projects.
[],
Expand Down Expand Up @@ -180,7 +228,7 @@ public function providerTestCommand(): array {
$this->secret,
// Select a project type Node_project
'1',
// Select PHP version 8.1
// Select NODE version 18.17.1
'0',
// Do you want to continue?
'y',
Expand Down Expand Up @@ -222,7 +270,7 @@ public function providerTestCommand(): array {
$this->secret,
// Select a project type Node_project
'1',
// Select PHP version 8.2
// Select NODE version 20.5.1
'1',
// Do you want to continue?
'y',
Expand Down

0 comments on commit 828996e

Please sign in to comment.