Skip to content

Commit

Permalink
fix: xfail raft update
Browse files Browse the repository at this point in the history
See reasoning in #215
  • Loading branch information
aiven-anton committed Oct 29, 2024
1 parent 1aa9760 commit 734d390
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions codegen/generate_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_{entity_snake_case}_roundtrip(instance: {entity_type}) -> None:
"""

test_code_java = """\
{xfail}
@pytest.mark.java
@given(instance=from_type({entity_type}))
def test_{entity_snake_case}_java(instance: {entity_type}, java_tester: JavaTester) -> None:
Expand Down Expand Up @@ -86,11 +87,22 @@ def main() -> None:
entity_snake_case=to_snake_case(entity_type.__name__),
)
)

if entity_type.__type__ is not EntityType.nested:
xfail = (
""
if entity_type.__name__ not in "UpdateRaftVoterResponse"
else (
"@pytest.mark.xfail("
'reason="https://github.com/Aiven-Open/kio/issues/215"'
")"
)
)
module_code[module_path].append(
test_code_java.format(
entity_type=entity_type.__name__,
entity_snake_case=to_snake_case(entity_type.__name__),
xfail=xfail,
)
)

Expand Down
1 change: 1 addition & 0 deletions tests/generated/test_update_raft_voter_v0_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def test_update_raft_voter_response_roundtrip(
assert instance == result


@pytest.mark.xfail(reason="https://github.com/Aiven-Open/kio/issues/215")
@pytest.mark.java
@given(instance=from_type(UpdateRaftVoterResponse))
def test_update_raft_voter_response_java(
Expand Down

0 comments on commit 734d390

Please sign in to comment.