Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avro references #31

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pylint fixes
  • Loading branch information
libretto committed May 8, 2024
commit 6515f2c83bb7f85d66afd61b1d6e915be3c6d939
18 changes: 6 additions & 12 deletions tests/integration/test_schema_avro_references.py
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
Copyright (c) 2023 Aiven Ltd
See LICENSE for details
"""
import json

from karapace.client import Client

import json

baseurl = "http://localhost:8081"


@@ -16,10 +16,7 @@ async def test_avro_references(registry_async_client: Client) -> None:
"type": "record",
"name": "Country",
"namespace": "com.netapp",
"fields": [
{"name": "name", "type": "string"},
{"name": "code", "type": "string"}
]
"fields": [{"name": "name", "type": "string"}, {"name": "code", "type": "string"}],
}

schema_address = {
@@ -30,14 +27,11 @@ async def test_avro_references(registry_async_client: Client) -> None:
{"name": "street", "type": "string"},
{"name": "city", "type": "string"},
{"name": "postalCode", "type": "string"},
{"name": "country", "type": "Country"}
]

{"name": "country", "type": "Country"},
],
}

res = await registry_async_client.post(
f"subjects/country/versions", json={"schema": json.dumps(schema_country)}
)
res = await registry_async_client.post("subjects/country/versions", json={"schema": json.dumps(schema_country)})
assert res.status_code == 200
assert "id" in res.json()
country_references = [{"name": "country.proto", "subject": "country", "version": 1}]