Exemple #1
0
    def test_get_other(self):
        """``get_topic`` defaults to 'other' for non-specific/unknown log formats"""
        output = main.get_topic('vlab_foo_9001')
        expected = 'other'

        self.assertEqual(output, expected)
Exemple #2
0
    def test_get_dns(self):
        """``get_topic`` successfully identifies DNS logs"""
        output = main.get_topic('vlab_dns_1')
        expected = 'dns'

        self.assertEqual(output, expected)
Exemple #3
0
    def test_get_worker(self):
        """``get_topic`` successfully identifies worker logs"""
        output = main.get_topic('vlab_insightiq-worker_36')
        expected = 'worker'

        self.assertEqual(output, expected)
Exemple #4
0
    def test_get_ntp(self):
        """``get_topic`` successfully identifies NTP logs"""
        output = main.get_topic('vlab_ntp_1')
        expected = 'ntp'

        self.assertEqual(output, expected)
Exemple #5
0
    def test_get_api(self):
        """``get_topic`` successfully identifies web-server containers"""
        output = main.get_topic('vlab_insightiq-api_7')
        expected = 'web'

        self.assertEqual(output, expected)