#!/usr/bin/python2
# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2014-2018 Arizona Board of Regents.
# Author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
# Author: Eric Newberry <enewberry@cs.arizona.edu>
# See COPYING for copyright and distribution information.
#

import os
import unittest
import subprocess

class test_ndnping(unittest.TestCase):
    """Test case for the ndnping application"""

    def setUp(self):
        print "\nTesting ndnping"
        print "***************"
        os.chdir("test_ndnping")

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

    def test_ndnping(self):
        ret = subprocess.call(["./ndnping-test.sh"], shell=True)
        print "Test script return value:", ret
        errormsg = {
            1 : "ndnping did not receive a Data packet satisfying its Interest",
            2 : "ndnpingserver did not exit after sending 5 Data packets",
            3 : "ndnpingserver did not receive 5 Interests",
        }
        if (ret != 0):
            self.fail(errormsg[ret])
