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