Skip to content

Commit 1479e11

Browse files
committed
qa/tests: skip rgw site tests in api
Failure in https://jenkins.ceph.com/job/ceph-api/95185/ ``` dashboard.rest_client.RequestException: RGW REST API GET timed out after 45 seconds (url=http://172.21.5.32:8000/admin/realm?list). ``` Signed-off-by: Nizamudeen A <[email protected]>
1 parent 9238442 commit 1479e11

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

qa/tasks/mgr/dashboard/helper.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
import json
66
import logging
7+
import os
78
import random
89
import re
910
import string
1011
import time
12+
import unittest
1113
from collections import namedtuple
1214
from functools import wraps
1315
from typing import List, Optional, Tuple, Type, Union
@@ -756,3 +758,8 @@ def wrapper(*args, **kwargs):
756758
raise err
757759
return wrapper
758760
return decorator
761+
762+
763+
skip_unless_dashboard_pr = unittest.skipUnless(
764+
os.environ.get('ghprbPullTitle', '').startswith('mgr/dashboard:'),
765+
'Skipping because PR title does not start with mgr/dashboard')

qa/tasks/mgr/dashboard/test_rgw.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
from cryptography.hazmat.primitives.hashes import SHA1
1111
from cryptography.hazmat.primitives.twofactor.totp import TOTP
1212

13-
from .helper import DashboardTestCase, JLeaf, JList, JObj
13+
from .helper import (DashboardTestCase, JLeaf, JList, JObj,
14+
skip_unless_dashboard_pr)
1415

1516
logger = logging.getLogger(__name__)
1617

@@ -66,6 +67,7 @@ def get_rgw_user(self, uid, stats=True):
6667
return self._get('/api/rgw/user/{}?stats={}'.format(uid, stats))
6768

6869

70+
@skip_unless_dashboard_pr
6971
class RgwSiteTest(RgwTestCase):
7072

7173
AUTH_ROLES = ['rgw-manager']

0 commit comments

Comments
 (0)