def test_tomcat_container_noport(self, *args): c = TomcatContainerCrawler() c.crawl(1234) pass
def test_none_tomcat_container(self, *args): options = {"password": "******", "user": "******"} c = TomcatContainerCrawler() with self.assertRaises(ConnectionError): c.crawl(1234, **options)
def test_get_feature(self): c = TomcatContainerCrawler() self.assertEqual(c.get_feature(), 'tomcat')
def test_tomcat_container_fordocker(self, *args): c = TomcatContainerCrawler() options = {"password": "******", "user": "******"} emitted = list(c.crawl(**options)) self.assertEqual(emitted[0][0], 'tomcat_jvm') self.assertEqual(emitted[0][2], 'application')
def test_no_available_port(self): c = TomcatContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_none_tomcat_container(self): c = TomcatContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_get_metrics(self): c = TomcatContainerCrawler() options = {"password": "******", "user": "******"} emitted = list(c.crawl(**options)) self.assertEqual(emitted[0][0], 'tomcat_jvm') self.assertEqual(emitted[0][2], 'application')