Skip to content

Commit e50238d

Browse files
committed
negative test 2
1 parent 7ff7c61 commit e50238d

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/actions/db-inserts-verify/action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ runs:
3030
3131
3232
# Pick regex
33-
regex="${{ inputs.parse_regex }}"
34-
if [[ -z "$regex" ]]; then
35-
# Default: match common formats
36-
regex='([0-9]+)[[:space:]]*(rows inserted|total inserted|committed|Inserted|ROWS_INSERTED=)'
37-
fi
33+
regex='ROWS_INSERTED=([0-9]+)'
3834
3935
# Find last match
4036
count="$(grep -Eo "${{ inputs.parse_regex }}" report.out | sed -E 's/.*=([0-9]+).*/\1/' | tail -n1 || true)"

api/testrail/api_testrail.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,7 @@ def report_test_coverage_insert(self, projects_id, payload):
647647
)
648648
self.session.add(report)
649649
self.session.commit()
650-
#print(f'ROWS_INSERTED={rows}')
651-
print(f'ROWS_INSERTED=0')
650+
print(f'ROWS_INSERTED={rows}')
652651

653652
def report_testrail_users_insert(self, payload):
654653
for index, row in payload.iterrows():
@@ -661,6 +660,7 @@ def report_testrail_users_insert(self, payload):
661660
)
662661
self.session.add(report)
663662
self.session.commit()
663+
print(f'ROWS_INSERTED={rows}')
664664

665665
def report_test_run_payload(self, runs):
666666
"""pack testrail data for 1 run in a data array
@@ -724,6 +724,7 @@ def report_test_plans_insert(self, project_id, payload):
724724
self.session.add(report)
725725
self.session.commit()
726726
total['id'] = report.id
727+
print(f'ROWS_INSERTED={rows}')
727728
return payload
728729

729730
def report_testrail_test_result_insert(self, db_run_id, payload, type):

0 commit comments

Comments
 (0)