tests/metrics: add basic test to ensure code is executable.

This commit is contained in:
Jimmy Berry 2018-11-26 16:58:04 -06:00
parent 590fd22198
commit 1abca4088a
2 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,7 @@ urlgrabber
pyxdg
cmdln
git+https://github.com/openSUSE/osc
influxdb
# Dependencies for testing
httpretty<0.9.6

12
tests/metrics_tests.py Normal file
View File

@ -0,0 +1,12 @@
from OBSLocal import OBSLocalTestCase
import unittest
class TestMetrics(OBSLocalTestCase):
script = './metrics.py'
script_debug_osc = False
def test_all(self):
self.osc_user('staging-bot')
self.execute_script(['--help']) # Avoids the need to influxdb instance.
self.assertOutput('metrics.py')