def test_no_accessible_endpoint(self): c = NginxContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_no_available_port(self): c = NginxContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_none_nginx_container(self): c = NginxContainerCrawler() with self.assertRaises(CrawlError): c.crawl("mockcontainer")
def test_get_feature(self): c = NginxContainerCrawler() self.assertEqual(c.get_feature(), 'nginx')
def test_get_metrics(self): c = NginxContainerCrawler() emitted = c.crawl()[0] self.assertEqual(emitted[0], 'nginx') self.assertIsInstance(emitted[1], NginxFeature) self.assertEqual(emitted[2], 'application')
def test_nginx_container_noport(self, *args): c = NginxContainerCrawler() c.crawl(1234) pass
def test_nginx_container_fordocker(self, *args): c = NginxContainerCrawler() emitted = c.crawl()[0] self.assertEqual(emitted[0], 'nginx') self.assertIsInstance(emitted[1], NginxFeature) self.assertEqual(emitted[2], 'application')