ci: removed unnecessary slow marker (#67106)
This commit is contained in:
parent
d3782c80f7
commit
d5f16e620d
|
@ -18,10 +18,10 @@ PGPORT=`python3 -c 'import struct; import socket; s=socket.socket(); s.setsockop
|
|||
script {
|
||||
if (currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause')) {
|
||||
sh """
|
||||
NUMPROCESSES=6 PYTESTOPTIONS=--slow \
|
||||
NUMPROCESSES=6 \
|
||||
PGPORT=`python3 -c 'import struct; import socket; s=socket.socket(); s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack("ii", 1, 0)); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` pg_virtualenv -o fsync=off ${env.TMPDIR}/venv/bin/tox -rv"""
|
||||
sh """
|
||||
NUMPROCESSES=6 PYTESTOPTIONS=--slow \
|
||||
NUMPROCESSES=6 \
|
||||
PGPORT=`python3 -c 'import struct; import socket; s=socket.socket(); s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack("ii", 1, 0)); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` pg_virtualenv -o fsync=off ${env.TMPDIR}/venv/bin/tox -rv -e py3-buster-rbac"""
|
||||
if (env.JOB_NAME == 'authentic' && env.GIT_BRANCH == 'origin/main') {
|
||||
sh """
|
||||
|
|
|
@ -42,29 +42,6 @@ from authentic2_idp_oidc.models import OIDCClient
|
|||
from . import utils
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--slow",
|
||||
action="store_true",
|
||||
help="run slow tests",
|
||||
)
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
# register an additional marker
|
||||
config.addinivalue_line("markers", "slow: mark test as slow")
|
||||
|
||||
|
||||
def pytest_runtest_setup(item):
|
||||
markers = list(item.iter_markers(name='slow'))
|
||||
slow = item.config.getoption('--slow')
|
||||
if bool(markers) != bool(slow):
|
||||
if not slow:
|
||||
pytest.skip('slow tests must not run')
|
||||
else:
|
||||
pytest.skip('not slow tests must not run')
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def settings(settings, request):
|
||||
# our post_migrate handlers depends upon some values of the settings (like
|
||||
|
|
|
@ -22,7 +22,6 @@ from django.db import connection
|
|||
from authentic2.models import Attribute, AttributeValue
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_attribute_value_uniqueness(transactional_db, simple_user, concurrency, pytestconfig):
|
||||
if pytestconfig.getoption('nomigrations'):
|
||||
pytest.skip('running migrations is required for this test')
|
||||
|
|
|
@ -183,7 +183,6 @@ def test_manager_user_edit_by_uuid(app, superuser, simple_user):
|
|||
assert simple_user.first_name.encode('utf-8') in resp.content
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_manager_stress_create_user(superuser_or_admin, app, mailoutbox):
|
||||
new_ou = OU.objects.create(name='new ou', slug='new-ou')
|
||||
url = reverse('a2-manager-user-add', kwargs={'ou_pk': new_ou.pk})
|
||||
|
|
|
@ -13,25 +13,3 @@
|
|||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--slow",
|
||||
action="store_true",
|
||||
help="run slow tests",
|
||||
)
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
# register an additional marker
|
||||
config.addinivalue_line("markers", "slow: mark test as slow")
|
||||
|
||||
|
||||
def pytest_runtest_setup(item):
|
||||
markers = list(item.iter_markers(name='slow'))
|
||||
slow = item.config.getoption('--slow')
|
||||
if markers and not slow:
|
||||
pytest.skip('slow tests must not run')
|
||||
|
|
|
@ -146,7 +146,6 @@ SIZE = 1000
|
|||
SPAN = 50
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
def test_massive_role_parenting(db):
|
||||
user = User.objects.create(username='user')
|
||||
roles = []
|
||||
|
|
Loading…
Reference in New Issue