Fossil SCM
In json.test, look for the empty file artifact using its new SHA3 hash explicitly. This allows json-artifact-file and related tests to pass, and eliminates a cascade of false failures that had crashed the test harness.
Commit
5ad7038fa33a741610c807074f6c0ec48c0c90948bbaf4b215187a52969c7674
Parent
cdf1700ade96d36…
1 file changed
+3
-1
+3
-1
| --- test/json.test | ||
| +++ test/json.test | ||
| @@ -201,10 +201,12 @@ | ||
| 201 | 201 | |
| 202 | 202 | #### ARTIFACT |
| 203 | 203 | |
| 204 | 204 | # sha1 of 0 bytes and a file to match in a commit |
| 205 | 205 | set UUID_empty da39a3ee5e6b4b0d3255bfef95601890afd80709 |
| 206 | +# sha3 of 0 bytes and a file to match in a commit | |
| 207 | +set UUID_empty_64 a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a | |
| 206 | 208 | write_file empty "" |
| 207 | 209 | fossil add empty |
| 208 | 210 | fossil ci -m "empty file" |
| 209 | 211 | |
| 210 | 212 | # json artifact (checkin) |
| @@ -213,11 +215,11 @@ | ||
| 213 | 215 | test json-artifact-checkin {[dict get $JR payload type] eq "checkin"} |
| 214 | 216 | test_json_payload json-artifact \ |
| 215 | 217 | [concat type uuid isLeaf timestamp user comment parents tags files] {} |
| 216 | 218 | |
| 217 | 219 | # json artifact (file) |
| 218 | -fossil_json [concat artifact $UUID_empty] | |
| 220 | +fossil_json [concat artifact $UUID_empty_64] | |
| 219 | 221 | test_json_envelope_ok json-artifact-file-env |
| 220 | 222 | test json-artifact-file {[dict get $JR payload type] eq "file"} |
| 221 | 223 | test_json_payload json-artifact [concat type uuid size checkins] {} |
| 222 | 224 | |
| 223 | 225 | # json artifact (wiki) |
| 224 | 226 |
| --- test/json.test | |
| +++ test/json.test | |
| @@ -201,10 +201,12 @@ | |
| 201 | |
| 202 | #### ARTIFACT |
| 203 | |
| 204 | # sha1 of 0 bytes and a file to match in a commit |
| 205 | set UUID_empty da39a3ee5e6b4b0d3255bfef95601890afd80709 |
| 206 | write_file empty "" |
| 207 | fossil add empty |
| 208 | fossil ci -m "empty file" |
| 209 | |
| 210 | # json artifact (checkin) |
| @@ -213,11 +215,11 @@ | |
| 213 | test json-artifact-checkin {[dict get $JR payload type] eq "checkin"} |
| 214 | test_json_payload json-artifact \ |
| 215 | [concat type uuid isLeaf timestamp user comment parents tags files] {} |
| 216 | |
| 217 | # json artifact (file) |
| 218 | fossil_json [concat artifact $UUID_empty] |
| 219 | test_json_envelope_ok json-artifact-file-env |
| 220 | test json-artifact-file {[dict get $JR payload type] eq "file"} |
| 221 | test_json_payload json-artifact [concat type uuid size checkins] {} |
| 222 | |
| 223 | # json artifact (wiki) |
| 224 |
| --- test/json.test | |
| +++ test/json.test | |
| @@ -201,10 +201,12 @@ | |
| 201 | |
| 202 | #### ARTIFACT |
| 203 | |
| 204 | # sha1 of 0 bytes and a file to match in a commit |
| 205 | set UUID_empty da39a3ee5e6b4b0d3255bfef95601890afd80709 |
| 206 | # sha3 of 0 bytes and a file to match in a commit |
| 207 | set UUID_empty_64 a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a |
| 208 | write_file empty "" |
| 209 | fossil add empty |
| 210 | fossil ci -m "empty file" |
| 211 | |
| 212 | # json artifact (checkin) |
| @@ -213,11 +215,11 @@ | |
| 215 | test json-artifact-checkin {[dict get $JR payload type] eq "checkin"} |
| 216 | test_json_payload json-artifact \ |
| 217 | [concat type uuid isLeaf timestamp user comment parents tags files] {} |
| 218 | |
| 219 | # json artifact (file) |
| 220 | fossil_json [concat artifact $UUID_empty_64] |
| 221 | test_json_envelope_ok json-artifact-file-env |
| 222 | test json-artifact-file {[dict get $JR payload type] eq "file"} |
| 223 | test_json_payload json-artifact [concat type uuid size checkins] {} |
| 224 | |
| 225 | # json artifact (wiki) |
| 226 |