Skip to content

Commit 8b1e944

Browse files
committed
enterprise option is obsolete
1 parent 177c8da commit 8b1e944

File tree

7 files changed

+13
-27
lines changed

7 files changed

+13
-27
lines changed

tests/conftest.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class GlobalData:
2727
graph_name: str = "test_graph"
2828
username: str = generate_username()
2929
cluster: bool = False
30-
enterprise: bool = False
3130
skip: list[str] = None
3231
db_version: version.Version = version.parse("0.0.0")
3332

@@ -54,12 +53,6 @@ def pytest_addoption(parser):
5453
parser.addoption(
5554
"--cluster", action="store_true", help="Run tests in a cluster setup"
5655
)
57-
parser.addoption(
58-
"--enterprise",
59-
action="store_true",
60-
default=True,
61-
help="Run tests in an enterprise setup",
62-
)
6356
parser.addoption(
6457
"--skip",
6558
action="store",
@@ -69,6 +62,7 @@ def pytest_addoption(parser):
6962
"jwt-secret-keyfile", # server was not configured with a keyfile
7063
"foxx", # foxx is not supported
7164
"js-transactions", # javascript transactions are not supported
65+
"enterprise", # skip what used to be "enterprise-only" before 3.12
7266
],
7367
default=[],
7468
help="Skip specific tests",
@@ -86,7 +80,6 @@ def pytest_configure(config):
8680
global_data.secret = config.getoption("secret")
8781
global_data.token = JwtToken.generate_token(global_data.secret)
8882
global_data.cluster = config.getoption("cluster")
89-
global_data.enterprise = config.getoption("enterprise")
9083
global_data.skip = config.getoption("skip")
9184
global_data.graph_name = generate_graph_name()
9285

@@ -134,11 +127,6 @@ def skip_tests():
134127
return global_data.skip
135128

136129

137-
@pytest.fixture
138-
def enterprise():
139-
return global_data.enterprise
140-
141-
142130
@pytest.fixture
143131
def username():
144132
return global_data.username

tests/test_analyzer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@pytest.mark.asyncio
14-
async def test_analyzer_management(db, bad_db, enterprise, db_version):
14+
async def test_analyzer_management(db, bad_db, skip_tests, db_version):
1515
analyzer_name = generate_analyzer_name()
1616
full_analyzer_name = db.name + "::" + analyzer_name
1717
bad_analyzer_name = generate_analyzer_name()
@@ -68,7 +68,7 @@ async def test_analyzer_management(db, bad_db, enterprise, db_version):
6868
assert await db.delete_analyzer(analyzer_name, ignore_missing=True) is False
6969

7070
# Test create geo_s2 analyzer
71-
if enterprise:
71+
if "enterprise" not in skip_tests:
7272
analyzer_name = generate_analyzer_name()
7373
result = await db.create_analyzer(analyzer_name, "geo_s2", properties={})
7474
assert result["type"] == "geo_s2"

tests/test_backup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66

77

88
@pytest.mark.asyncio
9-
async def test_backup(
10-
url, sys_db_name, bad_db, token, enterprise, cluster, db_version, skip_tests
11-
):
12-
if not enterprise:
9+
async def test_backup(url, sys_db_name, bad_db, token, cluster, db_version, skip_tests):
10+
if "enterprise" in skip_tests:
1311
pytest.skip("Backup API is only available in ArangoDB Enterprise Edition")
1412
if not cluster:
1513
pytest.skip("For simplicity, the backup API is only tested in cluster setups")

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ async def test_client_jwt_auth(url, sys_db_name, basic_auth_root):
121121

122122
@pytest.mark.asyncio
123123
async def test_client_jwt_superuser_auth(
124-
url, sys_db_name, basic_auth_root, token, enterprise, skip_tests
124+
url, sys_db_name, basic_auth_root, token, skip_tests
125125
):
126126
# successful authentication
127127
async with ArangoClient(hosts=url) as client:
128128
db = await client.db(
129129
sys_db_name, auth_method="superuser", token=token, verify=True
130130
)
131-
if enterprise:
131+
if "enterprise" not in skip_tests:
132132
await db.jwt_secrets()
133133
if "jwt-secret-keyfile" not in skip_tests:
134134
await db.reload_jwt_secrets()

tests/test_cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
@pytest.mark.asyncio
1717
async def test_cluster(
18-
url, sys_db_name, bad_db, token, enterprise, cluster, db_version
18+
url, sys_db_name, bad_db, token, skip_tests, cluster, db_version
1919
):
2020
if not cluster:
2121
pytest.skip("Cluster API is only tested in cluster setups")
22-
if not enterprise or db_version < version.parse("3.12.0"):
22+
if "enterprise" in skip_tests or db_version < version.parse("3.12.0"):
2323
pytest.skip(
2424
"For simplicity, the cluster API is only tested in the latest versions"
2525
)

tests/test_database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
@pytest.mark.asyncio
6161
async def test_database_misc_methods(
62-
sys_db, db, bad_db, cluster, db_version, url, sys_db_name, token, enterprise
62+
sys_db, db, bad_db, cluster, db_version, url, sys_db_name, token, skip_tests
6363
):
6464
# Status
6565
status = await sys_db.status()
@@ -181,7 +181,7 @@ async def test_database_misc_methods(
181181
response = await sys_db.request(request)
182182
assert json.loads(response.raw_body) == 1
183183

184-
if enterprise and db_version >= version.parse("3.12.0"):
184+
if "enterprise" not in skip_tests and db_version >= version.parse("3.12.0"):
185185
# API calls
186186
with pytest.raises(ServerApiCallsError):
187187
await bad_db.api_calls()

tests/test_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ async def test_graph_basic(db, bad_db):
5656

5757

5858
@pytest.mark.asyncio
59-
async def test_graph_properties(db, bad_graph, cluster, enterprise):
59+
async def test_graph_properties(db, bad_graph, cluster, skip_tests):
6060
# Create a graph
6161
name = generate_graph_name()
62-
is_smart = cluster and enterprise
62+
is_smart = cluster and "enterprise" in skip_tests
6363
options = GraphOptions(number_of_shards=3)
6464
graph = await db.create_graph(name, is_smart=is_smart, options=options)
6565

0 commit comments

Comments
 (0)