|
@@ -682,6 +682,7 @@ test_dir_format()
|
|
|
r1.identity_pkey = pk2;
|
|
|
r1.bandwidthrate = 1000;
|
|
|
r1.bandwidthburst = 5000;
|
|
|
+ r1.advertisedbandwidth = 10000;
|
|
|
r1.exit_policy = NULL;
|
|
|
r1.nickname = "Magri";
|
|
|
r1.platform = tor_strdup(platform);
|
|
@@ -706,7 +707,7 @@ test_dir_format()
|
|
|
r2.dir_port = 0;
|
|
|
r2.onion_pkey = pk2;
|
|
|
r2.identity_pkey = pk1;
|
|
|
- r2.bandwidthrate = r2.bandwidthburst = 3000;
|
|
|
+ r2.bandwidthrate = r2.bandwidthburst = r2.advertisedbandwidth = 3000;
|
|
|
r2.exit_policy = &ex1;
|
|
|
r2.nickname = "Fred";
|
|
|
|
|
@@ -725,7 +726,7 @@ test_dir_format()
|
|
|
strcat(buf2, get_uname());
|
|
|
strcat(buf2, "\n"
|
|
|
"published 1970-01-01 00:00:00\n"
|
|
|
- "bandwidth 1000 5000\n"
|
|
|
+ "bandwidth 1000 5000 10000\n"
|
|
|
"onion-key\n");
|
|
|
strcat(buf2, pk1_str);
|
|
|
strcat(buf2, "signing-key\n");
|
|
@@ -745,6 +746,7 @@ test_dir_format()
|
|
|
test_eq(rp1->dir_port, r1.dir_port);
|
|
|
test_eq(rp1->bandwidthrate, r1.bandwidthrate);
|
|
|
test_eq(rp1->bandwidthburst, r1.bandwidthburst);
|
|
|
+ test_eq(rp1->advertisedbandwidth, r1.advertisedbandwidth);
|
|
|
test_assert(crypto_pk_cmp_keys(rp1->onion_pkey, pk1) == 0);
|
|
|
test_assert(crypto_pk_cmp_keys(rp1->identity_pkey, pk2) == 0);
|
|
|
test_assert(rp1->exit_policy == NULL);
|