diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-26 08:55:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-26 08:55:43 +0000 |
commit | 8f5e7a13cbcba35d32b70fe08db075d0fbcd09e1 (patch) | |
tree | 9759641fa49921548d8c8196ac8b0ea1435da2a5 /src/pt | |
parent | be0b8f8faca3f96f4c780cd9cd471b0cda6d297b (diff) | |
download | gnunet-8f5e7a13cbcba35d32b70fe08db075d0fbcd09e1.tar.gz gnunet-8f5e7a13cbcba35d32b70fe08db075d0fbcd09e1.zip |
-initialize GNS DNS interception in testcase, so that curl will actually get GNS resolution
Diffstat (limited to 'src/pt')
-rw-r--r-- | src/pt/test_gns_vpn.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 89e5f2cf8..0bcfc4a79 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -536,9 +536,6 @@ identity_cb (void *cls, | |||
536 | name); | 536 | name); |
537 | return; | 537 | return; |
538 | } | 538 | } |
539 | /* FIXME: we somehow need to get this zone-key into | ||
540 | the 'DNS_ROOT' option of the 'gns' service. This | ||
541 | is currently why the test fails... */ | ||
542 | zone_key = GNUNET_IDENTITY_ego_get_private_key (ego); | 539 | zone_key = GNUNET_IDENTITY_ego_get_private_key (ego); |
543 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; | 540 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; |
544 | peername = GNUNET_strdup (GNUNET_i2s_full (&id)); | 541 | peername = GNUNET_strdup (GNUNET_i2s_full (&id)); |
@@ -603,6 +600,14 @@ run (void *cls, | |||
603 | "-c", config, | 600 | "-c", config, |
604 | NULL | 601 | NULL |
605 | }; | 602 | }; |
603 | char *const identity3_args[] = | ||
604 | { | ||
605 | "gnunet-identity", | ||
606 | "-e", "master-zone", | ||
607 | "-s", "gns-intercept", | ||
608 | "-c", config, | ||
609 | NULL | ||
610 | }; | ||
606 | GNUNET_TESTING_peer_get_identity (peer, &id); | 611 | GNUNET_TESTING_peer_get_identity (peer, &id); |
607 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 612 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
608 | &do_shutdown, | 613 | &do_shutdown, |
@@ -631,6 +636,15 @@ run (void *cls, | |||
631 | GNUNET_free (config); | 636 | GNUNET_free (config); |
632 | return; | 637 | return; |
633 | } | 638 | } |
639 | if (0 != fork_and_exec (bin_identity, identity3_args)) | ||
640 | { | ||
641 | fprintf (stderr, | ||
642 | "Failed to run `gnunet-identity -e. Skipping test.\n"); | ||
643 | GNUNET_SCHEDULER_shutdown (); | ||
644 | GNUNET_free (bin_identity); | ||
645 | GNUNET_free (config); | ||
646 | return; | ||
647 | } | ||
634 | GNUNET_free (bin_identity); | 648 | GNUNET_free (bin_identity); |
635 | GNUNET_free (config); | 649 | GNUNET_free (config); |
636 | 650 | ||