mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 23:54:08 +00:00
Fix 'rhizomeprotocol' test to always PASS
This commit is contained in:
parent
6b1becd328
commit
38a5717789
@ -341,8 +341,13 @@ int rhizome_add_manifest(rhizome_manifest *m_in,int ttl)
|
||||
if (rhizome_store_bundle(m_in) == -1)
|
||||
return WHY("rhizome_store_bundle() failed.");
|
||||
|
||||
DEBUGF("Announcing arrival of manifest %s* version %lld",
|
||||
alloca_tohex(m_in->cryptoSignPublic, 8), m_in->version);
|
||||
// This message used in tests; do not modify or remove.
|
||||
const char *service = rhizome_manifest_get(m_in, "service", NULL, 0);
|
||||
INFOF("RHIZOME ADD MANIFEST service=%s bid=%s version=%lld",
|
||||
service ? service : "NULL",
|
||||
alloca_tohex_sid(m_in->cryptoSignPublic),
|
||||
m_in->version
|
||||
);
|
||||
monitor_announce_bundle(m_in);
|
||||
return 0;
|
||||
}
|
||||
|
@ -55,9 +55,22 @@ setup_FileTransferNew() {
|
||||
set_instance +A
|
||||
echo 'File one' >file1
|
||||
executeOk_servald rhizome add file '' '' file1 file1.manifest
|
||||
extract_manifest_id BID file1.manifest
|
||||
extract_manifest_version VERSION file1.manifest
|
||||
}
|
||||
test_FileTransferNew() {
|
||||
sleep 10
|
||||
sleep 30 &
|
||||
local timeout_pid=$!
|
||||
local timeout_retry_seconds=1
|
||||
tfw_log "# wait for manifest to arrive"
|
||||
while true; do
|
||||
if grep "RHIZOME ADD MANIFEST service=file bid=$BID version=$VERSION" "$LOGB"; then
|
||||
break
|
||||
fi
|
||||
kill -0 $timeout_pid 2>/dev/null || fail "timeout"
|
||||
tfw_log "sleep $timeout_retry_seconds"
|
||||
sleep $timeout_retry_seconds
|
||||
done
|
||||
set_instance +B
|
||||
executeOk_servald rhizome list ''
|
||||
assert_rhizome_list file1!
|
||||
|
Loading…
x
Reference in New Issue
Block a user