blob: ef9ce396d570f874504c8f44f2f347ade52c0aaa [file] [log] [blame]
#!/usr/bin/python2
# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2014 Arizona Board of Regents.
# Author: Yi Huang <ltr120@email.arizona.edu>
# See COPYING for copyright and distribution information.
#
import os
import unittest
import subprocess
class test_cs_freshness(unittest.TestCase):
"""Test case for testing ContentStore and Freshness"""
def setUp(self):
print "\nTesting ContentStore and Freshness"
print "**********************************"
os.chdir("test_cs_freshness")
def tearDown(self):
print "**********************************"
os.chdir("..")
def test_cs_freshness(self):
ret = subprocess.call(["./cs-freshness-test.sh"], shell=True)
print "Test script return value:", ret
errormsg = {
1 : "No data received for first interest",
2 : "No data received for second interest",
3 : "ndn-traffic-server should receive exactly 1 interest",
4 : "Data received for third interest (expected no data received)",
5 : "No data received for fourth interest",
}
if (ret != 0):
self.fail(errormsg[ret])