Skip to content

Commit

Permalink
Remove invalid header testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyabiradar07 committed May 9, 2024
1 parent b77814c commit ad68b28
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Here are the test scenarios:
Here are the test scenarios:

- Importing metadata for a valid datasource to the API.
- Post an invalid header content type
- Post the same datasource again
- Test with invalid values such as blank, null or an invalid value for various keys in the dsmetadata input request json
- Validate error messages when the mandatory fields are missing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,6 @@ def test_import_metadata(cluster_type):
print("delete metadata = ", response.status_code)


@pytest.mark.negative
def test_import_metadata_with_invalid_header(cluster_type):
"""
Test Description: This test validates the importing of metadata by specifying invalid content type in the header
"""

input_json_file = "../json_files/import_metadata.json"

form_kruize_url(cluster_type)

response = delete_metadata(input_json_file)
print("delete metadata = ", response.status_code)

# Import metadata using the specified json
response = import_metadata(input_json_file, invalid_header=True)

data = response.json()
#print(data['message'])
print("content type = ", response.headers["Content-Type"])

assert response.status_code == ERROR_STATUS_CODE
assert data['status'] == ERROR_STATUS

response = delete_metadata(input_json_file)
print("delete metadata = ", response.status_code)


@pytest.mark.negative
@pytest.mark.parametrize(
"test_name, expected_status_code, version, datasource_name",
Expand Down

0 comments on commit ad68b28

Please sign in to comment.