Skip to content

Commit

Permalink
test(functional): enable bulk import feature flag before test
Browse files Browse the repository at this point in the history
  • Loading branch information
nejch committed Apr 25, 2024
1 parent c64d126 commit b81da2e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion tests/functional/api/test_bulk_imports.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
def test_bulk_imports(gl, group):
import time
import pytest

import gitlab


@pytest.fixture
def bulk_import_enabled(gl: gitlab.Gitlab):
settings = gl.settings.get()
bulk_import_default = settings.bulk_import_enabled

settings.bulk_import_enabled = True
settings.save()

# todo: why so fussy with feature flag timing?
time.sleep(5)
get_settings = gl.settings.get()
assert get_settings.bulk_import_enabled == True

yield settings

settings.bulk_import_enabled = bulk_import_default
settings.save()


def test_bulk_imports(gl, group, bulk_import_enabled):
destination = f"{group.full_path}-import"
configuration = {
"url": gl.url,
Expand Down

0 comments on commit b81da2e

Please sign in to comment.