Skip to content

Commit 366a11c

Browse files
Update tests to fix CI errors
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent e50169f commit 366a11c

9 files changed

Lines changed: 55 additions & 24 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
license_expression: mit
3+
is_license_tag: yes
4+
is_continuous: yes
5+
---
6+
7+
{{"license": "type": "MIT",}}

tests/formattedcode/data/common/manifests-expected.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ headers:
2929
system_environment:
3030
operating_system: linux
3131
cpu_architecture: 64
32-
platform: Linux-5.15.0-76-generic-x86_64-with-glibc2.29
33-
platform_version: '#83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023'
32+
platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.29
33+
platform_version: '#93~20.04.1-Ubuntu SMP Wed Sep 6 16:15:40 UTC 2023'
3434
python_version: "3.8.10 (default, May 26 2023, 14:05:08) \n[GCC 9.4.0]"
3535
spdx_license_list_version: '3.21'
3636
files_count: 4
@@ -1043,7 +1043,11 @@ license_references:
10431043
is_unknown: no
10441044
is_generic: no
10451045
spdx_license_key: MIT
1046-
other_spdx_license_keys: []
1046+
other_spdx_license_keys:
1047+
- LicenseRef-MIT-Bootstrap
1048+
- LicenseRef-MIT-Discord
1049+
- LicenseRef-MIT-TC
1050+
- LicenseRef-MIT-Diehl
10471051
osi_license_key:
10481052
text_urls:
10491053
- http://opensource.org/licenses/mit-license.php

tests/formattedcode/data/yaml/package-and-licenses-expected.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ headers:
2929
system_environment:
3030
operating_system: linux
3131
cpu_architecture: 64
32-
platform: Linux-5.15.0-76-generic-x86_64-with-glibc2.29
33-
platform_version: '#83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023'
32+
platform: Linux-5.15.0-84-generic-x86_64-with-glibc2.29
33+
platform_version: '#93~20.04.1-Ubuntu SMP Wed Sep 6 16:15:40 UTC 2023'
3434
python_version: "3.8.10 (default, May 26 2023, 14:05:08) \n[GCC 9.4.0]"
3535
spdx_license_list_version: '3.21'
3636
files_count: 4
@@ -322,7 +322,11 @@ license_references:
322322
is_unknown: no
323323
is_generic: no
324324
spdx_license_key: MIT
325-
other_spdx_license_keys: []
325+
other_spdx_license_keys:
326+
- LicenseRef-MIT-Bootstrap
327+
- LicenseRef-MIT-Discord
328+
- LicenseRef-MIT-TC
329+
- LicenseRef-MIT-Diehl
326330
osi_license_key:
327331
text_urls:
328332
- http://opensource.org/licenses/mit-license.php

tests/licensedcode/data/datadriven/external/licensecheck/devscripts/false-positives.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
license_expressions:
2-
- x11-tiff
2+
- mit-old-style-no-advert
3+
- other-permissive
34
- generic-cla
45
- unknown-license-reference
56
- unknown-license-reference

tests/licensedcode/data/datadriven/lic2/aes-128-3.0_and_bsd-new_and_bsd-original-uc_and_bsd-simplified_and_other.txt.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ license_expressions:
3232
- unknown-license-reference
3333
- proprietary-license
3434
- proprietary-license
35-
- proprietary-license
3635
- warranty-disclaimer
3736
- proprietary-license
3837
- unknown-license-reference
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
license_expressions:
22
- mit
3-
- mit
3+
- embedthis-extension

tests/licensedcode/data/licenses_reference_reporting/scan-matched-text-with-reference.expected.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,12 @@
250250
"is_unknown": false,
251251
"is_generic": false,
252252
"spdx_license_key": "MIT",
253-
"other_spdx_license_keys": [],
253+
"other_spdx_license_keys": [
254+
"LicenseRef-MIT-Bootstrap",
255+
"LicenseRef-MIT-Discord",
256+
"LicenseRef-MIT-TC",
257+
"LicenseRef-MIT-Diehl"
258+
],
254259
"osi_license_key": null,
255260
"text_urls": [
256261
"http://opensource.org/licenses/mit-license.php"

tests/licensedcode/data/licenses_reference_reporting/scan-with-reference.expected.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,12 @@
247247
"is_unknown": false,
248248
"is_generic": false,
249249
"spdx_license_key": "MIT",
250-
"other_spdx_license_keys": [],
250+
"other_spdx_license_keys": [
251+
"LicenseRef-MIT-Bootstrap",
252+
"LicenseRef-MIT-Discord",
253+
"LicenseRef-MIT-TC",
254+
"LicenseRef-MIT-Diehl"
255+
],
251256
"osi_license_key": null,
252257
"text_urls": [
253258
"http://opensource.org/licenses/mit-license.php"

tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,21 @@
406406
]
407407
},
408408
{
409-
"identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d",
409+
"identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e",
410410
"license_expression": "apache-2.0",
411411
"detection_count": 2,
412412
"detection_log": []
413413
},
414414
{
415-
"identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e",
415+
"identifier": "apache_2_0-3972bfb2-eb21-3d0c-d862-1642babb9f95",
416416
"license_expression": "apache-2.0",
417-
"detection_count": 2,
417+
"detection_count": 1,
418+
"detection_log": []
419+
},
420+
{
421+
"identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d",
422+
"license_expression": "apache-2.0",
423+
"detection_count": 1,
418424
"detection_log": []
419425
},
420426
{
@@ -1448,21 +1454,21 @@
14481454
"license_expression": "apache-2.0",
14491455
"matches": [
14501456
{
1451-
"score": 100.0,
1452-
"start_line": 3,
1457+
"score": 74.36,
1458+
"start_line": 1,
14531459
"end_line": 13,
1454-
"matched_length": 85,
1455-
"match_coverage": 100.0,
1456-
"matcher": "2-aho",
1460+
"matched_length": 87,
1461+
"match_coverage": 74.36,
1462+
"matcher": "3-seq",
14571463
"license_expression": "apache-2.0",
1458-
"rule_identifier": "apache-2.0_7.RULE",
1464+
"rule_identifier": "apache-2.0_1297.RULE",
14591465
"rule_relevance": 100,
1460-
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_7.RULE",
1461-
"matched_text": "Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License."
1466+
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1297.RULE",
1467+
"matched_text": "All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this [file] except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License."
14621468
}
14631469
],
14641470
"detection_log": [],
1465-
"identifier": "apache_2_0-c4e30bcd-ccfd-bbc3-d2f1-196ab911e47d"
1471+
"identifier": "apache_2_0-3972bfb2-eb21-3d0c-d862-1642babb9f95"
14661472
},
14671473
{
14681474
"license_expression": "apache-2.0",
@@ -1499,7 +1505,7 @@
14991505
}
15001506
],
15011507
"license_clues": [],
1502-
"percentage_of_license_text": 26.1,
1508+
"percentage_of_license_text": 26.65,
15031509
"scan_errors": []
15041510
}
15051511
]

0 commit comments

Comments
 (0)