From 22cde9cd6e66462442647abf271559d9e3bcb41c Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 3 Apr 2012 14:53:19 +0000 Subject: [PATCH] - more changes --- src/integration-tests/Makefile.am | 17 +- .../confs/c_normal_client_tcp.conf | 2 +- .../confs/c_normal_client_tcp_udp.conf | 354 ++++++++++++++++++ .../confs/c_normal_client_tcp_udp_http.conf | 354 ++++++++++++++++++ ...ntegration_connection_values_tcp_udp.py.in | 124 ++++++ ...ation_connection_values_tcp_udp_http.py.in | 124 ++++++ 6 files changed, 972 insertions(+), 3 deletions(-) create mode 100644 src/integration-tests/confs/c_normal_client_tcp_udp.conf create mode 100644 src/integration-tests/confs/c_normal_client_tcp_udp_http.conf create mode 100755 src/integration-tests/test_integration_connection_values_tcp_udp.py.in create mode 100755 src/integration-tests/test_integration_connection_values_tcp_udp_http.py.in diff --git a/src/integration-tests/Makefile.am b/src/integration-tests/Makefile.am index 9d5177b70..93608824d 100644 --- a/src/integration-tests/Makefile.am +++ b/src/integration-tests/Makefile.am @@ -16,7 +16,9 @@ check_PROGRAMS = noinst_SCRIPTS = \ gnunet_testing.py \ gnunet_pyexpect.py \ - test_integration_connection_values_tcp.py + test_integration_connection_values_tcp.py \ + test_integration_connection_values_tcp_udp.py \ + test_integration_connection_values_tcp_udp_http.py if HAVE_PYTHON_PEXPECT check_SCRIPTS = \ @@ -86,11 +88,20 @@ test_integration_connection_values_tcp.py: test_integration_connection_values_tc $(do_subst) < $(srcdir)/test_integration_connection_values_tcp.py.in > test_integration_connection_values_tcp.py chmod +x test_integration_connection_values_tcp.py +test_integration_connection_values_tcp_udp.py: test_integration_connection_values_tcp_udp.py.in Makefile + $(do_subst) < $(srcdir)/test_integration_connection_values_tcp_udp.py.in > test_integration_connection_values_tcp_udp.py + chmod +x test_integration_connection_values_tcp_udp.py + +test_integration_connection_values_tcp_udp_http.py: test_integration_connection_values_tcp_udp_http.py.in Makefile + $(do_subst) < $(srcdir)/test_integration_connection_values_tcp_udp_http.py.in > test_integration_connection_values_tcp_udp_http.py + chmod +x test_integration_connection_values_tcp_udp_http.py + EXTRA_DIST = \ gnunet_testing.py.in \ gnunet_pyexpect.py.in \ - test_integration_connection_value.py.in \ + test_integration_connection_value_tcp.py.in \ + test_integration_connection_value_tcp_udp.py.in \ test_integration_bootstrap_and_connect.py.in \ test_integration_bootstrap_and_connect_and_disconnect.py.in \ test_integration_bootstrap_and_connect_and_disconnect_nat.py.in \ @@ -103,6 +114,8 @@ EXTRA_DIST = \ confs/c_no_nat_client_2.conf \ confs/c_no_nat_client.conf \ confs/c_normal_client_tcp.conf \ + confs/c_normal_client_tcp_udp.conf \ + confs/c_normal_client_tcp_udp_http.conf \ hostkeys/0000-hostkey \ hostkeys/0001-hostkey \ hostkeys/0002-hostkey \ diff --git a/src/integration-tests/confs/c_normal_client_tcp.conf b/src/integration-tests/confs/c_normal_client_tcp.conf index c5de78b79..dd873c4f9 100644 --- a/src/integration-tests/confs/c_normal_client_tcp.conf +++ b/src/integration-tests/confs/c_normal_client_tcp.conf @@ -1,6 +1,6 @@ [PATHS] SERVICEHOME = /tmp/c_normal_client -DEFAULTCONFIG = confs/c_normal_client.conf +DEFAULTCONFIG = confs/c_normal_client_tcp.conf [gnunetd] HOSTKEY = hostkeys/0002-hostkey diff --git a/src/integration-tests/confs/c_normal_client_tcp_udp.conf b/src/integration-tests/confs/c_normal_client_tcp_udp.conf new file mode 100644 index 000000000..b2a42fea5 --- /dev/null +++ b/src/integration-tests/confs/c_normal_client_tcp_udp.conf @@ -0,0 +1,354 @@ +[PATHS] +SERVICEHOME = /tmp/c_normal_client +DEFAULTCONFIG = confs/c_normal_client_tcp_udp.conf + +[gnunetd] +HOSTKEY = hostkeys/0002-hostkey + +[client] +HOME = $SERVICEHOME + +[vpn] +AUTOSTART = YES +PORT = 0 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-dns +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/gnunet-service-vpn-57 + + +[resolver] +AUTOSTART = YES +PORT = 20071 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-resolver +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-resolver-56 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = NO + +[mesh] +AUTOSTART = YES +PORT = 20070 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-mesh +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-mesh-55 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[nse] +AUTOSTART = YES +PORT = 20069 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-nse +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-nse-54 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +PROOFFILE = $SERVICEHOME/.nse-proof +HISTOGRAM = $SERVICEHOME/nse-history.log +WORKDELAY = 5 ms +INTERVAL = 1 h +WORKBITS = 26 + +[topology] +MINIMUM-FRIENDS = 0 +FRIENDS-ONLY = NO +AUTOCONNECT = YES +TARGET-CONNECTION-COUNT = 16 +FRIENDS = $SERVICEHOME/friends +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-topology + +[datastore] +AUTOSTART = YES +UNIXPATH = /tmp/test-service-datastore-53 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +PORT = 20068 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-datastore +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +QUOTA = 100 MB +BLOOMFILTER = $SERVICEHOME/fs/bloomfilter +DATABASE = sqlite + +[datastore-sqlite] +FILENAME = $SERVICEHOME/datastore/sqlite.db + +[datastore-postgres] +CONFIG = connect_timeout=10; dbname=gnunet + +[datastore-mysql] +DATABASE = gnunet +CONFIG = ~/.my.cnf + +[peerinfo] +AUTOSTART = YES +PORT = 20067 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-peerinfo +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-peerinfo-52 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = YES +HOSTS = $SERVICEHOME/data/hosts/ + +[TESTING] +WEAKRANDOM = NO +CONNECT_TIMEOUT = 30 s +CONNECT_ATTEMPTS = 3 +MAX_OUTSTANDING_CONNECTIONS = 50 +DELETE_FILES = YES + +[ats] +AUTOSTART = YES +PORT = 20066 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-ats +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-ats-51 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +WAN_QUOTA_IN = 65536 +WAN_QUOTA_OUT = 65536 +DUMP_MLP = NO +DUMP_SOLUTION = NO +DUMP_OVERWRITE = NO +DUMP_MIN_PEERS = 0 +DUMP_MIN_ADDRS = 0 +ATS_MIN_INTERVAL = 15000 +ATS_EXEC_INTERVAL = 30000 + +[transport] +AUTOSTART = YES +PORT = 20065 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-transport +NEIGHBOUR_LIMIT = 50 +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +PLUGINS = tcp udp +UNIXPATH = /tmp/test-service-transport-50 +BLACKLIST_FILE = $SERVICEHOME/blacklist +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[transport-tcp] +PORT = 0 +ADVERTISED_PORT = 20064 +MAX_CONNECTIONS = 128 +TIMEOUT = 5 s +USE_LOCALADDR = YES + +[transport-udp] +PORT = 0 +BROADCAST = YES +BROADCAST_INTERVAL = 30000 +MAX_BPS = 1000000 +USE_LOCALADDR = YES + +[transport-http] +PORT = 0 +MAX_CONNECTIONS = 128 + +[transport-https] +PORT = 0 +CRYPTO_INIT = NORMAL +KEY_FILE = https.key +CERT_FILE = https.cert +MAX_CONNECTIONS = 128 + +[transport-wlan] +INTERFACE = mon0 +TESTMODE = 0 + +[datacache-mysql] +DATABASE = gnunet +CONFIG = ~/.my.cnf + +[datacache-postgres] +CONFIG = connect_timeout=10; dbname=gnunet + +[template] +AUTOSTART = NO +PORT = 20060 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-template +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-template-49 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[fs] +AUTOSTART = YES +INDEXDB = $SERVICEHOME/idxinfo.lst +TRUST = $SERVICEHOME/data/credit/ +IDENTITY_DIR = $SERVICEHOME/identities/ +STATE_DIR = $SERVICEHOME/persistence/ +UPDATE_DIR = $SERVICEHOME/updates/ +PORT = 20059 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-fs +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +DELAY = YES +CONTENT_CACHING = YES +CONTENT_PUSHING = YES +UNIXPATH = /tmp/test-service-fs-48 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = YES +MAX_PENDING_REQUESTS = 65536 +MIN_MIGRATION_DELAY = 100 ms +EXPECTED_NEIGHBOUR_COUNT = 128 + +[vpn] +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-vpn +IPV6ADDR = 1234::1 +IPV6PREFIX = 32 +IPV4ADDR = 10.11.10.1 +IPV4MASK = 255.255.0.0 +VIRTDNS = 10.11.10.2 +VIRTDNS6 = 1234::17 +IFNAME = vpn-gnunet + +[exit] +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-exit +IPV6ADDR = 1234:1::1 +IPV6PREFIX = 32 +IPV4ADDR = 10.10.1.1 +IPV4MASK = 255.255.0.0 +IFNAME = exit-gnunet +ENABLE_UDP = NO +ENABLE_TCP = NO + +[dns] +AUTOSTART = YES +PORT = 0 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-dns +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-dns-47 +PROVIDE_EXIT = NO + +[arm] +PORT = 20058 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-arm +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +DEFAULTSERVICES = topology hostlist fs +UNIXPATH = /tmp/test-service-arm-46 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[hostlist] +HTTPPORT = 8080 +HOME = $SERVICEHOME +HOSTLISTFILE = $SERVICEHOME/hostlist/learned.data +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-hostlist +OPTIONS = -b +SERVERS = http://v9.gnunet.org/hostlist http://ioerror.gnunet.org:65535/ +HTTP-PROXY = + +[core] +AUTOSTART = YES +PORT = 20057 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-core +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-core-45 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[nat] +BEHIND_NAT = YES +PUNCHED_NAT = NO +ENABLE_UPNP = NO +USE_LOCALADDR = YES +USE_HOSTNAME = NO +ENABLE_ICMP_CLIENT = NO +ENABLE_ICMP_SERVER = NO +DISABLEV6 = YES +RETURN_LOCAL_ADDRESSES = NO +HOSTNAME_DNS_FREQUENCY = 1200000 +IFC_SCAN_FREQUENCY = 3000000 +DYNDNS_FREQUENCY = 140000 +EXTERNAL_ADDRESS = 127.0.0.1 +INTERNAL_ADDRESS = 127.0.0.1 +BINDTO = 127.0.0.1 + +[gnunet-nat-server] +HOSTNAME = gnunet.org +PORT = 20056 + +[statistics] +AUTOSTART = YES +PORT = 20055 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-statistics +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-statistics-44 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = YES + +[dht] +AUTOSTART = YES +PORT = 20054 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-dht +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +BUCKET_SIZE = 4 +UNIXPATH = /tmp/test-service-dht-43 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[dhtcache] +DATABASE = sqlite +QUOTA = 1 MB \ No newline at end of file diff --git a/src/integration-tests/confs/c_normal_client_tcp_udp_http.conf b/src/integration-tests/confs/c_normal_client_tcp_udp_http.conf new file mode 100644 index 000000000..453be3e38 --- /dev/null +++ b/src/integration-tests/confs/c_normal_client_tcp_udp_http.conf @@ -0,0 +1,354 @@ +[PATHS] +SERVICEHOME = /tmp/c_normal_client +DEFAULTCONFIG = confs/c_normal_client_tcp_udp_http.conf + +[gnunetd] +HOSTKEY = hostkeys/0002-hostkey + +[client] +HOME = $SERVICEHOME + +[vpn] +AUTOSTART = YES +PORT = 0 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-dns +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/gnunet-service-vpn-57 + + +[resolver] +AUTOSTART = YES +PORT = 20071 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-resolver +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-resolver-56 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = NO + +[mesh] +AUTOSTART = YES +PORT = 20070 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-mesh +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-mesh-55 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[nse] +AUTOSTART = YES +PORT = 20069 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-nse +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-nse-54 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +PROOFFILE = $SERVICEHOME/.nse-proof +HISTOGRAM = $SERVICEHOME/nse-history.log +WORKDELAY = 5 ms +INTERVAL = 1 h +WORKBITS = 26 + +[topology] +MINIMUM-FRIENDS = 0 +FRIENDS-ONLY = NO +AUTOCONNECT = YES +TARGET-CONNECTION-COUNT = 16 +FRIENDS = $SERVICEHOME/friends +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-topology + +[datastore] +AUTOSTART = YES +UNIXPATH = /tmp/test-service-datastore-53 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +PORT = 20068 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-datastore +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +QUOTA = 100 MB +BLOOMFILTER = $SERVICEHOME/fs/bloomfilter +DATABASE = sqlite + +[datastore-sqlite] +FILENAME = $SERVICEHOME/datastore/sqlite.db + +[datastore-postgres] +CONFIG = connect_timeout=10; dbname=gnunet + +[datastore-mysql] +DATABASE = gnunet +CONFIG = ~/.my.cnf + +[peerinfo] +AUTOSTART = YES +PORT = 20067 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-peerinfo +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-peerinfo-52 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = YES +HOSTS = $SERVICEHOME/data/hosts/ + +[TESTING] +WEAKRANDOM = NO +CONNECT_TIMEOUT = 30 s +CONNECT_ATTEMPTS = 3 +MAX_OUTSTANDING_CONNECTIONS = 50 +DELETE_FILES = YES + +[ats] +AUTOSTART = YES +PORT = 20066 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-ats +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-ats-51 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +WAN_QUOTA_IN = 65536 +WAN_QUOTA_OUT = 65536 +DUMP_MLP = NO +DUMP_SOLUTION = NO +DUMP_OVERWRITE = NO +DUMP_MIN_PEERS = 0 +DUMP_MIN_ADDRS = 0 +ATS_MIN_INTERVAL = 15000 +ATS_EXEC_INTERVAL = 30000 + +[transport] +AUTOSTART = YES +PORT = 20065 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-transport +NEIGHBOUR_LIMIT = 50 +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +PLUGINS = tcp udp http +UNIXPATH = /tmp/test-service-transport-50 +BLACKLIST_FILE = $SERVICEHOME/blacklist +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[transport-tcp] +PORT = 0 +ADVERTISED_PORT = 20064 +MAX_CONNECTIONS = 128 +TIMEOUT = 5 s +USE_LOCALADDR = YES + +[transport-udp] +PORT = 0 +BROADCAST = YES +BROADCAST_INTERVAL = 30000 +MAX_BPS = 1000000 +USE_LOCALADDR = YES + +[transport-http] +PORT = 0 +MAX_CONNECTIONS = 128 + +[transport-https] +PORT = 0 +CRYPTO_INIT = NORMAL +KEY_FILE = https.key +CERT_FILE = https.cert +MAX_CONNECTIONS = 128 + +[transport-wlan] +INTERFACE = mon0 +TESTMODE = 0 + +[datacache-mysql] +DATABASE = gnunet +CONFIG = ~/.my.cnf + +[datacache-postgres] +CONFIG = connect_timeout=10; dbname=gnunet + +[template] +AUTOSTART = NO +PORT = 20060 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-template +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-template-49 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[fs] +AUTOSTART = YES +INDEXDB = $SERVICEHOME/idxinfo.lst +TRUST = $SERVICEHOME/data/credit/ +IDENTITY_DIR = $SERVICEHOME/identities/ +STATE_DIR = $SERVICEHOME/persistence/ +UPDATE_DIR = $SERVICEHOME/updates/ +PORT = 20059 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-fs +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +DELAY = YES +CONTENT_CACHING = YES +CONTENT_PUSHING = YES +UNIXPATH = /tmp/test-service-fs-48 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = YES +MAX_PENDING_REQUESTS = 65536 +MIN_MIGRATION_DELAY = 100 ms +EXPECTED_NEIGHBOUR_COUNT = 128 + +[vpn] +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-vpn +IPV6ADDR = 1234::1 +IPV6PREFIX = 32 +IPV4ADDR = 10.11.10.1 +IPV4MASK = 255.255.0.0 +VIRTDNS = 10.11.10.2 +VIRTDNS6 = 1234::17 +IFNAME = vpn-gnunet + +[exit] +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-exit +IPV6ADDR = 1234:1::1 +IPV6PREFIX = 32 +IPV4ADDR = 10.10.1.1 +IPV4MASK = 255.255.0.0 +IFNAME = exit-gnunet +ENABLE_UDP = NO +ENABLE_TCP = NO + +[dns] +AUTOSTART = YES +PORT = 0 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-dns +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-dns-47 +PROVIDE_EXIT = NO + +[arm] +PORT = 20058 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-arm +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +DEFAULTSERVICES = topology hostlist fs +UNIXPATH = /tmp/test-service-arm-46 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[hostlist] +HTTPPORT = 8080 +HOME = $SERVICEHOME +HOSTLISTFILE = $SERVICEHOME/hostlist/learned.data +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-daemon-hostlist +OPTIONS = -b +SERVERS = http://v9.gnunet.org/hostlist http://ioerror.gnunet.org:65535/ +HTTP-PROXY = + +[core] +AUTOSTART = YES +PORT = 20057 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-core +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-core-45 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[nat] +BEHIND_NAT = YES +PUNCHED_NAT = NO +ENABLE_UPNP = NO +USE_LOCALADDR = YES +USE_HOSTNAME = NO +ENABLE_ICMP_CLIENT = NO +ENABLE_ICMP_SERVER = NO +DISABLEV6 = YES +RETURN_LOCAL_ADDRESSES = NO +HOSTNAME_DNS_FREQUENCY = 1200000 +IFC_SCAN_FREQUENCY = 3000000 +DYNDNS_FREQUENCY = 140000 +EXTERNAL_ADDRESS = 127.0.0.1 +INTERNAL_ADDRESS = 127.0.0.1 +BINDTO = 127.0.0.1 + +[gnunet-nat-server] +HOSTNAME = gnunet.org +PORT = 20056 + +[statistics] +AUTOSTART = YES +PORT = 20055 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-statistics +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +UNIXPATH = /tmp/test-service-statistics-44 +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = YES + +[dht] +AUTOSTART = YES +PORT = 20054 +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-dht +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +BUCKET_SIZE = 4 +UNIXPATH = /tmp/test-service-dht-43 +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES + +[dhtcache] +DATABASE = sqlite +QUOTA = 1 MB \ No newline at end of file diff --git a/src/integration-tests/test_integration_connection_values_tcp_udp.py.in b/src/integration-tests/test_integration_connection_values_tcp_udp.py.in new file mode 100755 index 000000000..905ea9b1b --- /dev/null +++ b/src/integration-tests/test_integration_connection_values_tcp_udp.py.in @@ -0,0 +1,124 @@ +#!/usr/bin/python +# This file is part of GNUnet. +# (C) 2010 Christian Grothoff (and other contributing authors) +# +# GNUnet is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 2, or (at your +# option) any later version. +# +# GNUnet is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNUnet; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# +# +# This test starts 3 peers and expects bootstrap and a connected clique +# +# Conditions for successful exit: +# Both peers have 1 connected peer in transport, core, topology, fs + +import sys +import os +import subprocess +import re +import shutil +import time +import pexpect +from gnunet_testing import Peer +from gnunet_testing import Test +from gnunet_testing import Check +from gnunet_testing import Condition +from gnunet_testing import * + + +#definitions + +testname = "test_integration_connection_value" +verbose = True +check_timeout = 30 + + +def cleanup (): + if os.name == "nt": + shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_normal_client"), True) + else: + shutil.rmtree ("/tmp/c_normal_client/", True) + + +def success_cont (check): + global success + success = True; + +def fail_cont (check): + global success + success= False; + check.evaluate(True) + + +def check_connect (): + check = Check (test) + check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'core', '# neighbour entries allocated')) + check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'core', '# entries in session map')) + check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client, 'core', '# entries in session map')) + check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'topology', '# peers connected')) + check.add (EqualStatisticsCondition (client, 'topology', '# peers connected', client, 'core', '# entries in session map')) + + while True: + check.reset() + res = check.run_once (None, None) + print "Values are equal" + check.evaluate (False) +#if (False == res): +# break + time.sleep (5) + +# +# Test execution +# +def run (): + global success + global test + global client + + + success = False + + test = Test ('test_integration_connection_value', verbose) + + client = Peer(test, './confs/c_normal_client_tcp_udp.conf'); + client.start(); + + if (client.started == True): + test.p ('Peers started, running check') + check_connect () + + client.stop () + + cleanup () + + if (success == False): + print ('Test failed') + return False + else: + return True + + +try: + run () +except (KeyboardInterrupt, SystemExit): + print 'Test interrupted' + client.stop () + cleanup () +if (success == False): + sys.exit(1) +else: + sys.exit(0) + + diff --git a/src/integration-tests/test_integration_connection_values_tcp_udp_http.py.in b/src/integration-tests/test_integration_connection_values_tcp_udp_http.py.in new file mode 100755 index 000000000..0916f8540 --- /dev/null +++ b/src/integration-tests/test_integration_connection_values_tcp_udp_http.py.in @@ -0,0 +1,124 @@ +#!/usr/bin/python +# This file is part of GNUnet. +# (C) 2010 Christian Grothoff (and other contributing authors) +# +# GNUnet is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 2, or (at your +# option) any later version. +# +# GNUnet is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNUnet; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# +# +# This test starts 3 peers and expects bootstrap and a connected clique +# +# Conditions for successful exit: +# Both peers have 1 connected peer in transport, core, topology, fs + +import sys +import os +import subprocess +import re +import shutil +import time +import pexpect +from gnunet_testing import Peer +from gnunet_testing import Test +from gnunet_testing import Check +from gnunet_testing import Condition +from gnunet_testing import * + + +#definitions + +testname = "test_integration_connection_value" +verbose = True +check_timeout = 30 + + +def cleanup (): + if os.name == "nt": + shutil.rmtree (os.path.join (os.getenv ("TEMP"), "c_normal_client"), True) + else: + shutil.rmtree ("/tmp/c_normal_client/", True) + + +def success_cont (check): + global success + success = True; + +def fail_cont (check): + global success + success= False; + check.evaluate(True) + + +def check_connect (): + check = Check (test) + check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'core', '# neighbour entries allocated')) + check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'core', '# entries in session map')) + check.add (EqualStatisticsCondition (client, 'core', '# neighbour entries allocated', client, 'core', '# entries in session map')) + check.add (EqualStatisticsCondition (client, 'transport', '# peers connected', client, 'topology', '# peers connected')) + check.add (EqualStatisticsCondition (client, 'topology', '# peers connected', client, 'core', '# entries in session map')) + + while True: + check.reset() + res = check.run_once (None, None) + print "Values are equal" + check.evaluate (False) +#if (False == res): +# break + time.sleep (5) + +# +# Test execution +# +def run (): + global success + global test + global client + + + success = False + + test = Test ('test_integration_connection_value', verbose) + + client = Peer(test, './confs/c_normal_client_tcp_udp_http.conf'); + client.start(); + + if (client.started == True): + test.p ('Peers started, running check') + check_connect () + + client.stop () + + cleanup () + + if (success == False): + print ('Test failed') + return False + else: + return True + + +try: + run () +except (KeyboardInterrupt, SystemExit): + print 'Test interrupted' + client.stop () + cleanup () +if (success == False): + sys.exit(1) +else: + sys.exit(0) + + -- 2.25.1