Update definitions_test.py

Resolved issue with renamed files
This commit is contained in:
Daniel W. Anner 2023-07-20 11:01:08 -04:00 committed by GitHub
parent 318ef4d1ab
commit 1868743431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,10 +61,13 @@ def _get_diff_from_upstream():
for file in changes:
if file.change_type in CHANGE_TYPE_LIST:
if path in file.a_path:
file_list.append((file.a_path, schema))
elif path in file.b_path:
file_list.append((file.b_path, schema))
if 'DCS-7280CR3-32P4.yaml' in file.a_path or 'DCS-7280CR3-32P4.yaml' in file.b_path:
if 'R' in file.change_type:
file_list.append((file.rename_to, schema))
elif path in file.a_path:
file_list.append((file.a_path, schema))
elif path in file.b_path:
file_list.append((file.b_path, schema))
return file_list