blob: 3d5edf77444f599a0c9531b7ef93fd5eb3f468e3 [file] [log] [blame]
Hila Ben Abraham4c850f82014-06-22 20:24:34 -05001#!/usr/bin/python2
2# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
3#
4# Copyright (C) 2014 Washington University in St. Louis
5# Author: Hila Ben Abraham <hila@wustl.edu>
6# See COPYING for copyright and distribution information.
7#
8
9import os
10import unittest
11import subprocess
12
13class test_hub_discovery(unittest.TestCase):
14 """Test case for testing NDN Hub Discovery NDN hub discovery procedure"""
15
16 def setUp(self):
17 print "\nTesting NDN hub discovery procedure"
18 print "*****************************"
19 os.chdir("test_hub_discovery")
20 os.system("mkdir -p logs")
21
22 def tearDown(self):
23 print "********************************"
24 os.chdir("..")
25
26 def test_hub_discovery(self):
27 print ">>> test hub discovery procedure <<<"
28 ret = subprocess.call(["./hub-discovery-test.sh"], shell=True)
29 if (ret != 0):
30 self.fail(" >> TEST HUB DISCOVEY PROCEDURE FAILED")
31 else:
32 print ">> TEST HUB DISCOVEY PROCEDURE PASSED SUCCESSFULLY"