From 94a25a9cddef4ba0dd7fd5a4203cfc8b6814c1b1 Mon Sep 17 00:00:00 2001 From: Shishir <75600200+shishir-intelli@users.noreply.github.com> Date: Wed, 15 Nov 2023 19:34:44 +0530 Subject: [PATCH] Skipping Functional and FunctionalJavascript test for Hybrid Org (#980) --- tests/src/Functional/ApigeeEdgeFunctionalTestBase.php | 6 ++++++ .../ApigeeEdgeFunctionalJavascriptTestBase.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/src/Functional/ApigeeEdgeFunctionalTestBase.php b/tests/src/Functional/ApigeeEdgeFunctionalTestBase.php index 08f32c1e..7beee478 100644 --- a/tests/src/Functional/ApigeeEdgeFunctionalTestBase.php +++ b/tests/src/Functional/ApigeeEdgeFunctionalTestBase.php @@ -19,6 +19,7 @@ namespace Drupal\Tests\apigee_edge\Functional; +use Drupal\apigee_edge\Plugin\EdgeKeyTypeInterface; use Drupal\Tests\apigee_edge\Traits\ApigeeEdgeFunctionalTestTrait; use Drupal\Tests\BrowserTestBase; @@ -40,6 +41,11 @@ abstract class ApigeeEdgeFunctionalTestBase extends BrowserTestBase { * {@inheritdoc} */ protected function setUp(): void { + // Skipping the test if instance type is Public. + $instance_type = getenv('APIGEE_EDGE_INSTANCE_TYPE'); + if (!empty($instance_type) && $instance_type === EdgeKeyTypeInterface::INSTANCE_TYPE_HYBRID) { + $this->markTestSkipped('This test suite is expecting a PUBLIC instance type.'); + } parent::setUp(); $this->initTestEnv(); } diff --git a/tests/src/FunctionalJavascript/ApigeeEdgeFunctionalJavascriptTestBase.php b/tests/src/FunctionalJavascript/ApigeeEdgeFunctionalJavascriptTestBase.php index 1a968659..0107ce16 100644 --- a/tests/src/FunctionalJavascript/ApigeeEdgeFunctionalJavascriptTestBase.php +++ b/tests/src/FunctionalJavascript/ApigeeEdgeFunctionalJavascriptTestBase.php @@ -19,6 +19,7 @@ namespace Drupal\Tests\apigee_edge\FunctionalJavascript; +use Drupal\apigee_edge\Plugin\EdgeKeyTypeInterface; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\apigee_edge\Traits\ApigeeEdgeFunctionalTestTrait; @@ -40,6 +41,11 @@ abstract class ApigeeEdgeFunctionalJavascriptTestBase extends WebDriverTestBase * {@inheritdoc} */ protected function setUp(): void { + // Skipping the test if instance type is Public. + $instance_type = getenv('APIGEE_EDGE_INSTANCE_TYPE'); + if (!empty($instance_type) && $instance_type === EdgeKeyTypeInterface::INSTANCE_TYPE_HYBRID) { + $this->markTestSkipped('This test suite is expecting a PUBLIC instance type.'); + } parent::setUp(); $this->initTestEnv(); }