-
Notifications
You must be signed in to change notification settings - Fork 146
Tests Creation and Exection
In the past arcticdb project has not used custom pytest marks to help processes of filtering tests for execution, traceability etc. With more than 1400 pytests currently and havins support for many kind of storages there is need of ability to select and edit or execute only tests that are needed. To help do step-by=step approach to their introduction will be started with several new marks that would help reduce ammounts of tests being executed, and help their maintenance also.
First important mark is the 'storage' mark. Its is introduced to help select only tests that have fixtures real storages (aws s2 and gcp). This mark is currently placed on all tests that have such fixtures, but in future it must also be placed on new tests that have such fixtures. This mark help us select for execution only tests having it or the opposite all tests that do not have it (pytest -m storage, pytest -m 'not storage')
As the tests belonging to that group/category can be executed agains variety of storage types, not only real storages but also simulated and local storages, several new environment variables have been introduced to limit the options of execution when needed:
LOCAL_STORAGE_TESTS_ENABLED=(0|1) default is 1 if missing STORAGE_AWS_S3=(0|1) default is 1 if missing STORAGE_GCP=(0|1) not enabled by default
NOTE: currently all local and simulated s3, gcp etc storages, as well as mongo are in the LOCAL_STORAGE_TESTS_ENABLED category. This is done on purpose for backwards compatibility. All other default values are also considered for backwards compatibility
With those enhancements we have fine control over unatended execution (GitHub) and so the workflow for test execution is now not a checkbox but drop down of 3 possibilities:
- local only
- real aws s3
- real gcpxml
ArcticDB Wiki