From 439e75e43a983c19425ce0ea800adef248bf69e6 Mon Sep 17 00:00:00 2001 From: Shishir Suvarna Date: Wed, 15 Nov 2023 18:25:29 +0530 Subject: [PATCH] Skipping Functional and FunctionalJavascript test for Hybrid Org --- 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(); }