Fix(test): downgrade test priorities (#12913)

### What problem does this PR solve?

Changed test priorities in multiple test files, downgrading from p1 to
p2 and p2 to p3.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Liu An
2026-01-30 20:02:56 +08:00
committed by GitHub
parent eb75b1ce82
commit c4f60b349d
60 changed files with 108 additions and 104 deletions

View File

@ -209,7 +209,7 @@ class TestAddChunk:
assert False, res
assert res["data"]["doc"]["chunk_count"] == chunks_count + 2
@pytest.mark.p2
@pytest.mark.p3
def test_add_chunk_to_deleted_document(self, HttpApiAuth, add_document):
dataset_id, document_id = add_document
delete_documents(HttpApiAuth, dataset_id, {"ids": [document_id]})

View File

@ -151,7 +151,7 @@ class TestDatasetCreate:
res = create_dataset(HttpApiAuth, payload)
assert res["code"] == 0, res
@pytest.mark.p2
@pytest.mark.p3
def test_avatar_exceeds_limit_length(self, HttpApiAuth):
payload = {"name": "avatar_exceeds_limit_length", "avatar": "a" * 65536}
res = create_dataset(HttpApiAuth, payload)
@ -200,7 +200,7 @@ class TestDatasetCreate:
assert res["code"] == 0, res
assert res["data"]["description"] == "description", res
@pytest.mark.p2
@pytest.mark.p3
def test_description_exceeds_limit_length(self, HttpApiAuth):
payload = {"name": "description_exceeds_limit_length", "description": "a" * 65536}
res = create_dataset(HttpApiAuth, payload)
@ -293,7 +293,7 @@ class TestDatasetCreate:
assert res["code"] == 0, res
assert res["data"]["embedding_model"] == "BAAI/bge-small-en-v1.5@Builtin", res
@pytest.mark.p1
@pytest.mark.p2
@pytest.mark.parametrize(
"name, permission",
[

View File

@ -116,7 +116,7 @@ class TestDatasetsDelete:
res = list_datasets(HttpApiAuth)
assert len(res["data"]) == remaining, res
@pytest.mark.p1
@pytest.mark.p2
@pytest.mark.usefixtures("add_dataset_func")
def test_ids_empty(self, HttpApiAuth):
payload = {"ids": []}
@ -126,7 +126,7 @@ class TestDatasetsDelete:
res = list_datasets(HttpApiAuth)
assert len(res["data"]) == 1, res
@pytest.mark.p1
@pytest.mark.p3
@pytest.mark.usefixtures("add_datasets_func")
def test_ids_none(self, HttpApiAuth):
payload = {"ids": None}
@ -208,7 +208,7 @@ class TestDatasetsDelete:
assert res["code"] == 108, res
assert "lacks permission for dataset" in res["message"], res
@pytest.mark.p2
@pytest.mark.p3
@pytest.mark.usefixtures("add_dataset_func")
def test_field_unsupported(self, HttpApiAuth):
payload = {"unknown_field": "unknown_field"}

View File

@ -19,7 +19,7 @@ from configs import INVALID_API_TOKEN
from libs.auth import RAGFlowHttpApiAuth
@pytest.mark.p1
@pytest.mark.p2
class TestAuthorization:
@pytest.mark.parametrize(
"invalid_auth, expected_code, expected_message",

View File

@ -55,7 +55,7 @@ class TestCapability:
@pytest.mark.usefixtures("add_datasets")
class TestDatasetsList:
@pytest.mark.p1
@pytest.mark.p2
def test_params_unset(self, HttpApiAuth):
res = list_datasets(HttpApiAuth, None)
assert res["code"] == 0, res
@ -142,7 +142,7 @@ class TestDatasetsList:
assert res["code"] == 0, res
assert len(res["data"]) == 5, res
@pytest.mark.p2
@pytest.mark.p3
@pytest.mark.parametrize(
"params, assertions",
[
@ -334,7 +334,7 @@ class TestDatasetsList:
assert res["code"] == 108, res
assert "lacks permission for dataset" in res["message"], res
@pytest.mark.p2
@pytest.mark.p3
def test_field_unsupported(self, HttpApiAuth):
params = {"unknown_field": "unknown_field"}
res = list_datasets(HttpApiAuth, params)

View File

@ -187,7 +187,7 @@ class TestDatasetUpdate:
assert res["code"] == 0, res
assert res["data"][0]["avatar"] == f"data:image/png;base64,{encode_avatar(fn)}", res
@pytest.mark.p2
@pytest.mark.p3
def test_avatar_exceeds_limit_length(self, HttpApiAuth, add_dataset_func):
dataset_id = add_dataset_func
payload = {"avatar": "a" * 65536}
@ -236,7 +236,7 @@ class TestDatasetUpdate:
assert res["code"] == 0, res
assert res["data"][0]["description"] == "description"
@pytest.mark.p2
@pytest.mark.p3
def test_description_exceeds_limit_length(self, HttpApiAuth, add_dataset_func):
dataset_id = add_dataset_func
payload = {"description": "a" * 65536}
@ -330,7 +330,7 @@ class TestDatasetUpdate:
assert res["code"] == 0, res
assert res["data"][0]["embedding_model"] == "BAAI/bge-small-en-v1.5@Builtin", res
@pytest.mark.p1
@pytest.mark.p2
@pytest.mark.parametrize(
"permission",
[

View File

@ -80,7 +80,7 @@ class TestDocumentsUpload:
assert res["data"][0]["dataset_id"] == dataset_id
assert res["data"][0]["name"] == fp.name
@pytest.mark.p2
@pytest.mark.p3
@pytest.mark.parametrize(
"file_type",
["exe", "unknown"],