NICMx / FORT-validator

RPKI cache validator
MIT License
51 stars 24 forks source link

cache.test fails #101

Closed rfc1036 closed 12 months ago

rfc1036 commented 12 months ago

1.6.0 fails the test suite:

[...]
Expected nodes:
- rsync://a.b.c/d/ tmp/test.tal/rsync/a.b.c/d error:0 success:1
- rsync://a.b.c/e/ tmp/test.tal/rsync/a.b.c/e error:0 success:1
- rsync://x.y.z/m/ tmp/test.tal/rsync/x.y.z/m error:0 success:1

Actual nodes:
- rsync://a.b.c/d/ tmp/test.tal/rsync/a.b.c/d attempt:0 success:1
- rsync://x.y.z/m/ tmp/test.tal/rsync/x.y.z/m attempt:0 success:1
- rsync://a.b.c/e/ tmp/test.tal/rsync/a.b.c/e attempt:0 success:1

Files in cache:
- tmp/test.tal/rsync/a.b.c/e
- tmp/test.tal/rsync/x.y.z/m
- tmp/test.tal/rsync/a.b.c/d

URI 'rsync://a.b.c/d/' does not begin with 'https://'.
Cannot generate 's cage. I'm probably going to end up deleting it from the cache.
URI 'rsync://x.y.z/m/' does not begin with 'https://'.
Cannot generate 's cage. I'm probably going to end up deleting it from the cache.
URI 'rsync://a.b.c/e/' does not begin with 'https://'.
Cannot generate 's cage. I'm probably going to end up deleting it from the cache.
The cache cleanup ended prematurely with error code -1 (Unknown error -1)
Unable to write tmp/test.tal/metadata.json; unknown cause.
tmp/test.tal/metadata.json does not exist.
[...]

test/cache.log attached.

ydahhrk commented 12 months ago

Thank you for this report!

ydahhrk commented 12 months ago

Just for the sake of clarity: The error is actually at the end of the attached log file:

cache/local_cache_test.c:737:F:metadata.json:test_metadata_json:0: Assertion '"[{\"url\":\"rsync://a.b.c/d\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":0,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}," "{\"url\":\"rsync://a.b.c/e\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":1}," "{\"url\":\"rsync://x.y.z/e\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":0,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}," "{\"url\":\"https://a/b\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":1,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}," "{\"url\":\"https://a/c\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":0,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}]" == str' failed: "[{\"url\":\"rsync://a.b.c/d\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":0,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}," "{\"url\":\"rsync://a.b.c/e\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":1}," "{\"url\":\"rsync://x.y.z/e\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":0,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}," "{\"url\":\"https://a/b\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":1,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}," "{\"url\":\"https://a/c\",\"attempt-timestamp\":\"1969-12-31T18:00:00-0600\",\"attempt-result\":0,\"success-timestamp\":\"1969-12-31T18:00:00-0600\"}]" == "[{"url":"rsync://a.b.c/d","attempt-timestamp":"1969-12-31T18:00:00-0600","attempt-result":0,"success-timestamp":"1969-12-31T18:00:00-0600"},{"url":"rsync://a.b.c/e","attempt-timestamp":"1969-12-31T18:00:00-0600","attempt-result":1},{"url":"rsync://x.y.z/e","attempt-timestamp":"1969-12-31T18:00:00-0600","attempt-result":0,"success-timestamp":"1969-12-31T18:00:00-0600"},{"url":"https://a/b","attempt-timestamp":"1969-12-31T18:00:00-0600","attempt-result":1,"success-timestamp":"1969-12-31T18:00:00-0600"},{"url":"https://a/c","attempt-timestamp":"1969-12-31T18:00:00-0600","attempt-result":0,"success-timestamp":"1969-12-31T18:00:00-0600"}]", str == "[{"url":"rsync://a.b.c/d","attempt-timestamp":"1970-01-01T01:00:00+0100","attempt-result":0,"success-timestamp":"1970-01-01T01:00:00+0100"},{"url":"rsync://a.b.c/e","attempt-timestamp":"1970-01-01T01:00:00+0100","attempt-result":1},{"url":"rsync://x.y.z/e","attempt-timestamp":"1970-01-01T01:00:00+0100","attempt-result":0,"success-timestamp":"1970-01-01T01:00:00+0100"},{"url":"https://a/b","attempt-timestamp":"1970-01-01T01:00:00+0100","attempt-result":1,"success-timestamp":"1970-01-01T01:00:00+0100"},{"url":"https://a/c","attempt-timestamp":"1970-01-01T01:00:00+0100","attempt-result":0,"success-timestamp":"1970-01-01T01:00:00+0100"}]"

The following messages:

URI 'rsync://a.b.c/d/' does not begin with 'https://'. Cannot generate 's cage. I'm probably going to end up deleting it from the cache.

Are simply error pipeline tests.

I'll try finding a more elegant way to convey this in the output tomorrow.