+import os
import requests
from datetime import datetime
-from pytest import raises
+from pytest import raises, skip
from teuthology.config import config
from teuthology import suite
-class TestSuite(object):
+class TestSuiteOffline(object):
def test_name_timestamp_passed(self):
stamp = datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
name = suite.make_run_name('suite', 'ceph', 'kernel', 'flavor',
'mtype', user='USER')
assert name.startswith('USER-')
- def test_ceph_hash(self):
- resp = requests.get(
- 'https://api.github.com/repos/ceph/ceph/git/refs/heads/master')
- ref_hash = resp.json()['object']['sha']
- assert suite.get_hash('ceph') == ref_hash
-
def test_distro_defaults_saya(self):
assert suite.get_distro_defaults('ubuntu', 'saya') == ('armv7l',
'saucy', 'deb')
assert suite.get_gitbuilder_url('ceph', 'squeeze', 'deb', 'x86_64',
'basic') == ref_url
+
+class TestSuiteOnline(object):
+ def setup(self):
+ if 'TEST_ONLINE' not in os.environ:
+ skip("To run these sets, set the environment variable TEST_ONLINE")
+
+ def test_ceph_hash(self):
+ resp = requests.get(
+ 'https://api.github.com/repos/ceph/ceph/git/refs/heads/master')
+ ref_hash = resp.json()['object']['sha']
+ assert suite.get_hash('ceph') == ref_hash
+
def test_config_bogus_kernel_branch(self):
# Don't attempt to send email
config.results_email = None