#!/usr/bin/python2
# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2014 University of Arizona
# Author: Yi Huang <ltr120@email.arizona.edu>
# See COPYING for copyright and distribution information.
#

import os
import unittest
import subprocess

class test_nrd(unittest.TestCase):
    """Test case for NRD"""

    def setUp(self):
        print "\nTesting NRD"
        print "***********"
        os.chdir("test_nrd")

    def tearDown(self):
        print "***********"
        os.chdir("..")

    def test_nrd(self):
        ret = subprocess.call(["./nrd-test.sh"], shell=True)
        print "Test script return value:", ret
        errormsg = {
            1 : "the name '/test-nrd/A' already exists before ndn-traffic-server starts",
            2 : "the name '/test-nrd/B' already exists before ndn-traffic-server starts",
            3 : "the name '/test-nrd/A' does not exists after ndn-traffic-server starts",
            4 : "the name '/test-nrd/B' does not exists after ndn-traffic-server starts",
            5 : "the name '/test-nrd/A' still exists after ndn-traffic-server exit",
            6 : "the name '/test-nrd/B' still exists after ndn-traffic-server exit",
        }
        if (ret != 0):
            self.fail(errormsg[ret])
