mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 11:19:05 +00:00
fix(test): fix test conflicts in openapi (#14064)
This commit is contained in:
parent
8338d73587
commit
aca7c103c8
@ -1,21 +1,21 @@
|
||||
[
|
||||
{
|
||||
"request": {
|
||||
"url": "/openapi/v3/entity/dataset/urn%3Ali%3Adataset%3A%28urn%3Ali%3AdataPlatform%3Atest%2Cdataset1EntityV3%2CPROD%29",
|
||||
"url": "/openapi/v3/entity/dataset/urn%3Ali%3Adataset%3A%28urn%3Ali%3AdataPlatform%3Atest%2CdatasetSingle1EntityV3%2CPROD%29",
|
||||
"description": "Remove test dataset 1",
|
||||
"method": "delete"
|
||||
}
|
||||
},
|
||||
{
|
||||
"request": {
|
||||
"url": "/openapi/v3/entity/dataset/urn%3Ali%3Adataset%3A%28urn%3Ali%3AdataPlatform%3Atest%2Cdataset2EntityV3%2CPROD%29",
|
||||
"url": "/openapi/v3/entity/dataset/urn%3Ali%3Adataset%3A%28urn%3Ali%3AdataPlatform%3Atest%2CdatasetSingle2EntityV3%2CPROD%29",
|
||||
"description": "Remove test dataset 2",
|
||||
"method": "delete"
|
||||
}
|
||||
},
|
||||
{
|
||||
"request": {
|
||||
"url": "/openapi/v3/entity/dataset/urn%3Ali%3Adataset%3A%28urn%3Ali%3AdataPlatform%3Atest%2Cdataset3EntityV3%2CPROD%29",
|
||||
"url": "/openapi/v3/entity/dataset/urn%3Ali%3Adataset%3A%28urn%3Ali%3AdataPlatform%3Atest%2CdatasetSingle3EntityV3%2CPROD%29",
|
||||
"description": "Remove test dataset 3",
|
||||
"method": "delete"
|
||||
}
|
||||
@ -45,11 +45,11 @@
|
||||
"description": "Create 3 datasets",
|
||||
"json": [
|
||||
{
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,dataset1EntityV3,PROD)",
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,datasetSingle1EntityV3,PROD)",
|
||||
"datasetProperties": {
|
||||
"value": {
|
||||
"name": "dataset1EntityV3",
|
||||
"qualifiedName": "entities.dataset1EntityV3",
|
||||
"name": "datasetSingle1EntityV3",
|
||||
"qualifiedName": "entities.datasetSingle1EntityV3",
|
||||
"customProperties": {},
|
||||
"tags": []
|
||||
}
|
||||
@ -61,11 +61,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,dataset2EntityV3,PROD)",
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,datasetSingle2EntityV3,PROD)",
|
||||
"datasetProperties": {
|
||||
"value": {
|
||||
"name": "dataset2EntityV3",
|
||||
"qualifiedName": "entities.dataset2EntityV3",
|
||||
"name": "datasetSingle2EntityV3",
|
||||
"qualifiedName": "entities.datasetSingle2EntityV3",
|
||||
"customProperties": {},
|
||||
"tags": []
|
||||
}
|
||||
@ -77,11 +77,11 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,dataset3EntityV3,PROD)",
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,datasetSingle3EntityV3,PROD)",
|
||||
"datasetProperties": {
|
||||
"value": {
|
||||
"name": "dataset3EntityV3",
|
||||
"qualifiedName": "entities.dataset3EntityV3",
|
||||
"name": "datasetSingle3EntityV3",
|
||||
"qualifiedName": "entities.datasetSingle3EntityV3",
|
||||
"customProperties": {},
|
||||
"tags": []
|
||||
}
|
||||
@ -101,7 +101,7 @@
|
||||
"params": {
|
||||
"pitKeepAlive": "1m",
|
||||
"count": "1",
|
||||
"query": "qualifiedName:entities\\.dataset*",
|
||||
"query": "qualifiedName:entities\\.datasetSingle*",
|
||||
"sortCriteria": "urn"
|
||||
},
|
||||
"description": "Generic scroll",
|
||||
@ -118,11 +118,11 @@
|
||||
"json": {
|
||||
"entities": [
|
||||
{
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,dataset1EntityV3,PROD)",
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,datasetSingle1EntityV3,PROD)",
|
||||
"datasetProperties": {
|
||||
"value": {
|
||||
"name": "dataset1EntityV3",
|
||||
"qualifiedName": "entities.dataset1EntityV3",
|
||||
"name": "datasetSingle1EntityV3",
|
||||
"qualifiedName": "entities.datasetSingle1EntityV3",
|
||||
"customProperties": {},
|
||||
"tags": []
|
||||
}
|
||||
@ -139,7 +139,7 @@
|
||||
"params": {
|
||||
"pitKeepAlive": "1m",
|
||||
"count": "1",
|
||||
"query": "qualifiedName:entities\\.dataset*",
|
||||
"query": "qualifiedName:entities\\.datasetSingle*",
|
||||
"sortCriteria": "urn",
|
||||
"sortOrder": "DESCENDING"
|
||||
},
|
||||
@ -152,11 +152,11 @@
|
||||
"json": {
|
||||
"entities": [
|
||||
{
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,dataset3EntityV3,PROD)",
|
||||
"urn": "urn:li:dataset:(urn:li:dataPlatform:test,datasetSingle3EntityV3,PROD)",
|
||||
"datasetProperties": {
|
||||
"value": {
|
||||
"name": "dataset3EntityV3",
|
||||
"qualifiedName": "entities.dataset3EntityV3",
|
||||
"name": "datasetSingle3EntityV3",
|
||||
"qualifiedName": "entities.datasetSingle3EntityV3",
|
||||
"customProperties": {},
|
||||
"tags": []
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ def evaluate_test(auth_session, test_name, test_data):
|
||||
if "wait" in req_resp["request"]:
|
||||
time.sleep(req_resp["request"]["wait"])
|
||||
continue
|
||||
url = req_resp["request"]["url"]
|
||||
|
||||
actual_resp = execute_request(auth_session, req_resp["request"])
|
||||
diff = None
|
||||
try:
|
||||
@ -84,13 +84,15 @@ def evaluate_test(auth_session, test_name, test_data):
|
||||
logger.warning("No expected response json found")
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
f"Error executing step: {idx}, url: {url}, test: {test_name}"
|
||||
f"Error executing step: {idx}, url: {actual_resp.url}, test: {test_name}"
|
||||
)
|
||||
if description:
|
||||
logger.error(f"Step {idx} Description: {description}")
|
||||
if diff:
|
||||
logger.error(f"Unexpected diff: {diff}")
|
||||
logger.debug(f"Response content: {actual_resp.content}")
|
||||
logger.error(f"Response content: {actual_resp.content}")
|
||||
else:
|
||||
logger.debug(f"Response content: {actual_resp.content}")
|
||||
raise e
|
||||
except Exception as e:
|
||||
logger.error(f"Error executing test: {test_name}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user