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')
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')
def test_no_accessible_endpoint(self, *args): c = DB2ContainerCrawler() with self.assertRaises(ConnectionError): options = { "password": "******", "user": "******", "db": "sample" } c.crawl(1234, **options)[0]
def test_no_accessible_endpoint(self): c = DB2ContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_none_apache_container(self): c = DB2ContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_no_available_port(self): c = DB2ContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_get_feature(self): c = DB2ContainerCrawler() self.assertEqual(c.get_feature(), 'db2')
def test_no_available_port(self): c = DB2ContainerCrawler() c.crawl("mockcontainer") pass