示例#1
0
 def test_get_metrics(self):
     c = DB2ContainerCrawler()
     options = {"password": "******", "user": "******", "db": "sample"}
     emitted = c.crawl(**options)[0]
     self.assertEqual(emitted[0], 'db2')
     self.assertIsInstance(emitted[1], DB2Feature)
     self.assertEqual(emitted[2], 'application')
示例#2
0
 def test_db2_container_crawler_fordocker(self, *kwargs):
     c = DB2ContainerCrawler()
     options = {"password": "******", "user": "******", "db": "sample"}
     emitted = c.crawl(1234, **options)[0]
     self.assertEqual(emitted[0], 'db2')
     self.assertIsInstance(emitted[1], DB2Feature)
     self.assertEqual(emitted[2], 'application')
示例#3
0
 def test_no_accessible_endpoint(self, *args):
     c = DB2ContainerCrawler()
     with self.assertRaises(ConnectionError):
         options = {
             "password": "******",
             "user": "******",
             "db": "sample"
         }
         c.crawl(1234, **options)[0]
示例#4
0
 def test_no_accessible_endpoint(self):
     c = DB2ContainerCrawler()
     with self.assertRaises(CrawlError):
         c.crawl("mockcontainer")
示例#5
0
 def test_none_apache_container(self):
     c = DB2ContainerCrawler()
     with self.assertRaises(CrawlError):
         c.crawl("mockcontainer")
示例#6
0
 def test_no_available_port(self):
     c = DB2ContainerCrawler()
     with self.assertRaises(CrawlError):
         c.crawl("mockcontainer")
示例#7
0
 def test_get_feature(self):
     c = DB2ContainerCrawler()
     self.assertEqual(c.get_feature(), 'db2')
示例#8
0
 def test_no_available_port(self):
     c = DB2ContainerCrawler()
     c.crawl("mockcontainer")
     pass