-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNOW-1728000 Create abstractions for e2e tests p.2
- Loading branch information
1 parent
d96603a
commit d99d44b
Showing
3 changed files
with
45 additions
and
63 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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from test_suites import create_end_to_end_test_suites | ||
import test_suit | ||
|
||
# TestSelector is responsible for selecting a subset of tests to be run | ||
# It is meant to filter tests by platform, cloud vendor or any other predicate needed | ||
class TestSelector: | ||
|
||
def selectTestsToBeRun(self, driver, nameSalt, schemaRegistryAddress, testPlatform, allowedTestsCsv): | ||
test_suites = create_end_to_end_test_suites(driver, nameSalt, schemaRegistryAddress, testPlatform, allowedTestsCsv) | ||
|
||
if testPlatform == "apache": | ||
return [single_end_to_end_test.test_instance for single_end_to_end_test in test_suites.values() if single_end_to_end_test.run_in_apache == True] | ||
elif testPlatform == "confluent": | ||
return [single_end_to_end_test.test_instance for single_end_to_end_test in test_suites.values() if single_end_to_end_test.run_in_confluent == True] | ||
elif testPlatform == "clean": | ||
return [single_end_to_end_test.test_instance for single_end_to_end_test in test_suites.values()] | ||
else: | ||
raise test_suit.test_utils.NonRetryableError("unknown testPlatform={}".format(testPlatform)) |
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