clr_test no longer relying on external ddl.sql
This commit is contained in:
parent
95b27f3bd4
commit
99c21919bb
5 changed files with 9 additions and 18003 deletions
|
|
@ -17,7 +17,7 @@ preflight:
|
|||
stage: preflight
|
||||
script:
|
||||
- pwd
|
||||
- git clone -b successful_set "http://gitlab-ci-token:$ACCESS_TOKEN@git.mfd.msk/mfd/clearing_test.git"
|
||||
- git clone -b without_db_update "http://gitlab-ci-token:$ACCESS_TOKEN@git.mfd.msk/mfd/clearing_test.git"
|
||||
artifacts:
|
||||
name: "$CI_COMMIT_REF_NAME"
|
||||
expire_in: 1 day
|
||||
|
|
|
|||
5101
clr_test/db/DDL.sql
5101
clr_test/db/DDL.sql
File diff suppressed because it is too large
Load diff
12889
clr_test/db/export.sql
12889
clr_test/db/export.sql
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +0,0 @@
|
|||
INSERT INTO public.s_trades (id,created_at,updated_at,trade_num,operation,class_code,trade_date,sec_code,accruedint,accruedint2,lower_discount,order_num,price,price2,repo_rate,repo_value,repo2_value,start_discount,ts_commission,upper_discount,value,yield,qty,qty_pcs,trade_date_time,repo_term,clearing_commission,exchange_commission,tech_center_commission,account,broker_ref,client_code,settle_code,user_id,exchange_code,firm_id,firm_name,cp_firm_id,cp_firm_name,class_name,sec_name,settle_date,settle_currency,trade_currency,trade_time_ms,bank_acc_id,"section") VALUES
|
||||
(5557910001,'2024-04-16 11:13:30.198','2024-04-16 11:13:30.198',1347782,'S','UVAV','2024-04-16','CNYRUB_TOD_C',0.000000000000000000,0.000000000000000000,0.000000000000000000,874332,13.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,1300000.000000000000000000,0.000000000000000000,100.000000000000000000,100000.000000000000000000,'2024-04-16 17:14:00.000',0,0.000000000000000000,0.000000000000000000,0.000000000000000000,'0079MAT00001','0079MAT00001/','0079MAT00001','T0',NULL,NULL,'79','ГПБ','8','ПАО Сбербанк','СПВБ: Двусторонний непрерывный аукцион (TOD)',NULL,'2024-04-16','RUB',NULL,43707,NULL,'CURR'),
|
||||
(5557910000,'2024-04-16 11:13:30.198','2024-04-16 11:13:30.198',1347782,'B','UVAV','2024-04-16','CNYRUB_TOD_C',0.000000000000000000,0.000000000000000000,0.000000000000000000,874331,13.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,0.000000000000000000,1300000.000000000000000000,0.000000000000000000,100.000000000000000000,100000.000000000000000000,'2024-04-16 17:14:00.000',0,0.000000000000000000,0.000000000000000000,0.000000000000000000,'0008CAT00001','0008CAT00001/','0008CAT00001','T0',NULL,NULL,'8','ПАО Сбербанк','79','ГПБ','СПВБ: Двусторонний непрерывный аукцион (TOD)',NULL,'2024-04-16','RUB',NULL,43707,NULL,'CURR');
|
||||
|
||||
INSERT INTO public.execution_currency (exchange_execution_id,exchange_execution_time,exchange_execution_microseconds,trading_date,settlement_date,settlement_code,security_id,security_symbol,security_name,company_id,party_trading_clearing_registry_id,party_trading_clearing_registry,counter_party_id,counter_party_trading_clearing_registry_id,counter_party_trading_clearing_registry,market,price,lots,settlement_amount,quantity,side,currency_code,settlement_organization,coverage_status,session_id,clearing_date,id,created_at,updated_at) VALUES
|
||||
(1347782,'2024-04-16 17:14:00','2024-04-16 17:14:00','2024-04-16','2024-04-16','T0',553161143,'CNYRUB_TOD_C','Валютная пара рубль-юань',2000302,408160009,'0008CAT00001',2000096,5553940004,'0079MAT00001','UVAV',13.000000000000000000,100.00,1300000.00,100000.00,'B','RUB',NULL,NULL,NULL,'2024-04-16',5557920002,'2024-04-16 11:13:31.071',NULL),
|
||||
(1347782,'2024-04-16 17:14:00','2024-04-16 17:14:00','2024-04-16','2024-04-16','T0',553161143,'CNYRUB_TOD_C','Валютная пара рубль-юань',2000096,5553940004,'0079MAT00001',2000302,408160009,'0008CAT00001','UVAV',13.000000000000000000,100.00,1300000.00,100000.00,'S','RUB',NULL,NULL,NULL,'2024-04-16',5557920000,'2024-04-16 11:13:30.86',NULL);
|
||||
|
||||
|
|
@ -52,6 +52,10 @@ def remove_files_with_extensions(extension):
|
|||
os.remove(os.path.join(root, currentFile))
|
||||
|
||||
|
||||
def remove_if_exists(filepath):
|
||||
if os.path.exists(filepath):
|
||||
os.remove(filepath)
|
||||
|
||||
def run_specific(index):
|
||||
logging.info(f"$CI_PROJECT_DIR = {os.environ['CI_PROJECT_DIR']}")
|
||||
folders = [i for i in sorted(os.listdir(DATA_ROOT_DIR)) if re.search("\\d{1,}.\\d{1,}.*", i)]
|
||||
|
|
@ -62,10 +66,10 @@ def run_specific(index):
|
|||
shutil.rmtree(f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/input")
|
||||
|
||||
logging.info(f"Removing file {CLR_TEST_DIR}/db/export.sql")
|
||||
os.remove(f"{CLR_TEST_DIR}/db/export.sql")
|
||||
remove_if_exists(f"{CLR_TEST_DIR}/db/export.sql")
|
||||
|
||||
logging.info(f"Removing file {CLR_TEST_DIR}/db/test-data.sql")
|
||||
os.remove(f"{CLR_TEST_DIR}/db/test-data.sql")
|
||||
remove_if_exists(f"{CLR_TEST_DIR}/db/test-data.sql")
|
||||
|
||||
logging.info(f"Copying files from {DATA_ROOT_DIR}/{folders[index]}/db/ to {CLR_TEST_DIR}/db/")
|
||||
shutil.copytree(f"{DATA_ROOT_DIR}/{folders[index]}/db/", f"{CLR_TEST_DIR}/db/", dirs_exist_ok=True)
|
||||
|
|
@ -89,10 +93,10 @@ def main():
|
|||
shutil.rmtree(f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/input")
|
||||
|
||||
logging.info(f"Removing file {CLR_TEST_DIR}/db/export.sql")
|
||||
os.remove(f"{CLR_TEST_DIR}/db/export.sql")
|
||||
remove_if_exists(f"{CLR_TEST_DIR}/db/export.sql")
|
||||
|
||||
logging.info(f"Removing file {CLR_TEST_DIR}/db/test-data.sql")
|
||||
os.remove(f"{CLR_TEST_DIR}/db/test-data.sql")
|
||||
remove_if_exists(f"{CLR_TEST_DIR}/db/test-data.sql")
|
||||
|
||||
logging.info(f"Copying files from {DATA_ROOT_DIR}/{folder}/db/ to {CLR_TEST_DIR}/db/")
|
||||
shutil.copytree(f"{DATA_ROOT_DIR}/{folder}/db/", f"{CLR_TEST_DIR}/db/", dirs_exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue