Add Mobility with Link scenario
refs #3074
Change-Id: I2d4c12195ad0441370c34260425be482ed7a47f4
diff --git a/test_mobility_link/test_mobility_link.py b/test_mobility_link/test_mobility_link.py
new file mode 100644
index 0000000..b1c9d19
--- /dev/null
+++ b/test_mobility_link/test_mobility_link.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python2
+# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+#
+# Copyright (C) 2016 University of Arizona
+# Author: Eric Newberry <enewberry@cs.arizona.edu>
+# See COPYING for copyright and distribution information.
+#
+
+import os
+import unittest
+import subprocess
+
+class test_mobility_link(unittest.TestCase):
+ """Test case for Mobility with Link"""
+
+ def setUp(self):
+ print "\nTesting Mobility with Link"
+ print "*****************"
+ os.chdir("test_mobility_link")
+
+ def tearDown(self):
+ print "*****************"
+ os.chdir("..")
+
+ def test_mobility_link(self):
+ ret = subprocess.call(["./mobility-link-test.sh"], shell=True)
+ print "Test script return value:", ret
+ errormsg = {
+ 1 : "Failed to create required routes",
+ 2 : "Interest /net/ndnsim/www/index.html not answered with Data containing payload 'DDDDDDDD'",
+ 3 : "Interest /net/ndnsim/www/news.html not answered with Nack with reason 'NoRoute'",
+ 4 : "Interest /net/ndnsim/www/contact.html not answered with Data containing payload 'BBBBBBBB'",
+ 5 : "Interest /net/ndnsim/www/about.html not answered with Data containing payload 'CCCCCCCC'",
+ 6 : "Interest /net/ndnsim/www/info.html not answered with Data containing payload 'CCCCCCCC'",
+ 7 : "Interest /net/ndnsim/www/logo.jpg not answered with Nack with reason 'NoRoute'",
+ }
+ if (ret != 0):
+ self.fail(errormsg[ret])