Ejemplo n.º 1
0
 def test_03__deploy_ios(self):
     if not "TRAVIS" in os.environ:
         self.skipTest("Not inside Travis")
         return
     elif not os.environ["TRAVIS_REPO_SLUG"] == "job/aclhound":
         self.skipTest("Skipping this test when triggered by a fork")
         return
     os.environ["WORKSPACE"] = os.getcwd()
     with Capturing() as output:
         cli = ACLHoundClient({u'--help': False, u'--version': False,
                               u'<args>': ['all'], u'<command>': 'deploy',
                               u'debug': False, u'jenkins': True})
         cli.deploy({u'--help': False, u'--version': False, u'<devicename>':
                     'devices/concepts-ict.mu.meerval.net',
                     u'<command>': 'deploy', u'debug': False,
                     u'jenkins': True})
Ejemplo n.º 2
0
 def test_02__build_asa(self):
     os.environ["WORKSPACE"] = os.getcwd()
     with Capturing() as output:
         cli = ACLHoundClient({u'--help': False, u'--version': False,
                               u'<args>': ['all'], u'<command>': 'build',
                               u'debug': False, u'jenkins': True})
         cli.build({u'--help': False, u'--version': False, u'<devicename>':
                    'devices/s2-asa.meerval.net', u'<command>': 'build',
                    u'debug': False, u'jenkins': True})
     predefined_output = open('build_asa.txt').read().splitlines()
     output.pop(0)
     predefined_output.pop(0)
     output = "\n".join(output)
     predefined_output = "\n".join(predefined_output)
     self.maxDiff = None
     self.assertEquals(output, predefined_output)
Ejemplo n.º 3
0
 def test_04__deploy_ios(self):
     if not "TRAVIS" in os.environ:
         self.skipTest("Not inside Travis")
         return
     elif not os.environ["TRAVIS_REPO_SLUG"] == "job/aclhound":
         self.skipTest("Skipping this test when triggered by a fork")
         return
     os.environ["WORKSPACE"] = os.getcwd()
     with Capturing() as output:
         cli = ACLHoundClient({u'--help': False, u'--version': False,
                               u'<args>': ['all'], u'<command>': 'deploy',
                               u'debug': False, u'jenkins': True})
         cli.deploy({u'--help': False, u'--version': False, u'<devicename>':
                     'devices/steffann.mu.meerval.net',
                     u'<command>': 'deploy', u'debug': False,
                     u'jenkins': True})
Ejemplo n.º 4
0
 def test_03__build_junos(self):
     os.environ["WORKSPACE"] = os.getcwd()
     with Capturing() as output:
         cli = ACLHoundClient({u'--help': False, u'--version': False,
                               u'<args>': ['all'], u'<command>': 'build',
                               u'debug': False, u'jenkins': True})
         cli.build({u'--help': False, u'--version': False, u'<devicename>':
                    'devices/junos.eby', u'<command>': 'build',
                    u'debug': False, u'jenkins': True})
     predefined_output = open('build_junos.txt').read().splitlines()
     output.pop(0)
     predefined_output.pop(0)
     output = "\n".join(output)
     predefined_output = "\n".join(predefined_output)
     self.maxDiff = None
     self.assertEquals(output, predefined_output)
Ejemplo n.º 5
0
 def test_01__build_ios(self):
     os.environ["WORKSPACE"] = os.getcwd() + "/tests/data"
     with Capturing() as output:
         cli = ACLHoundClient({u'--help': False, u'--version': False,
                               u'<args>': ['all'], u'<command>': 'build',
                               u'debug': False, u'jenkins': True})
         cli.build({u'--help': False, u'--version': False, u'<devicename>':
                    'devices/s2-ios.meerval.net', u'<command>': 'build',
                    u'debug': False, u'jenkins': True})
     predefined_output = open('build_ios.txt').read().splitlines()
     # remove first line, as this contains system specific output
     output.pop(0)
     predefined_output.pop(0)
     output = "\n".join(output)
     predefined_output = "\n".join(predefined_output)
     # compare generated & predefined output blob, should be same
     self.maxDiff = None
     self.assertEquals(output, predefined_output)
Ejemplo n.º 6
0
 def test_01__build_ios(self):
     os.environ["WORKSPACE"] = os.getcwd() + "/tests/data"
     with Capturing() as output:
         cli = ACLHoundClient({u'--help': False, u'--version': False,
                               u'<args>': ['all'], u'<command>': 'build',
                               u'debug': False, u'jenkins': True})
         cli.build({u'--help': False, u'--version': False, u'<devicename>':
                    'devices/s2-ios.meerval.net', u'<command>': 'build',
                    u'debug': False, u'jenkins': True})
     self.assertNotIn('ERROR', '\n'.join(output))
     predefined_output = open('build_ios.txt').read().splitlines()
     # remove first line, as this contains system specific output
     output.pop(0)
     predefined_output.pop(0)
     output = "\n".join(output)
     predefined_output = "\n".join(predefined_output)
     # compare generated & predefined output blob, should be same
     self.maxDiff = None
     self.assertEquals(output, predefined_output)