Skip to content

Commit 1f3a6c4

Browse files
committed
fix(bdd): correct JSON Schema test expectations and enable 11 passing tests
Verified all @pending-impl scenarios against Confluent v8.1.1: JSON Schema (5 tests fixed): - Adding property to open content model is INCOMPATIBLE (not compatible) per Confluent's PROPERTY_ADDED_TO_OPEN_CONTENT_MODEL check - Transitive tests: open model rejects new properties, closed model allows them Protobuf (6 tests enabled): - diff 09 (required field removal), 18/22 (field-to-oneof), 30-32 (label changes) now pass after previous protobuf checker enhancements 1296 BDD scenarios passing, 0 failures. 14 @pending-impl remaining.
1 parent b615268 commit 1f3a6c4

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

tests/bdd/features/compatibility_jsonschema_validation.feature

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
9090
"""
9191
Then the compatibility check should be compatible
9292

93-
@pending-impl
94-
Scenario: Compatible — record with optional field reader, empty record writer
93+
Scenario: Incompatible — adding property to open content model (Confluent PROPERTY_ADDED_TO_OPEN_CONTENT_MODEL)
9594
Given the global compatibility level is "NONE"
9695
And subject "jsv-compat-06" has compatibility level "BACKWARD"
9796
And subject "jsv-compat-06" has "JSON" schema:
@@ -102,10 +101,9 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
102101
"""
103102
{"type":"object","properties":{"a":{"type":"integer"}}}
104103
"""
105-
Then the compatibility check should be compatible
104+
Then the compatibility check should be incompatible
106105

107-
@pending-impl
108-
Scenario: Compatible — record adding optional field with default
106+
Scenario: Incompatible — adding optional field with default to open content model
109107
Given the global compatibility level is "NONE"
110108
And subject "jsv-compat-07" has compatibility level "BACKWARD"
111109
And subject "jsv-compat-07" has "JSON" schema:
@@ -116,7 +114,7 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
116114
"""
117115
{"type":"object","properties":{"a":{"type":"integer"},"b":{"type":"integer","default":0}},"required":["a"]}
118116
"""
119-
Then the compatibility check should be compatible
117+
Then the compatibility check should be incompatible
120118

121119
Scenario: Compatible — open content model with extra properties
122120
Given the global compatibility level is "NONE"
@@ -131,8 +129,7 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
131129
"""
132130
Then the compatibility check should be compatible
133131

134-
@pending-impl
135-
Scenario: Compatible — record removing non-required field
132+
Scenario: Incompatible — adding non-required property to open content model
136133
Given the global compatibility level is "NONE"
137134
And subject "jsv-compat-09" has compatibility level "BACKWARD"
138135
And subject "jsv-compat-09" has "JSON" schema:
@@ -143,7 +140,7 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
143140
"""
144141
{"type":"object","properties":{"a":{"type":"integer"},"b":{"type":"integer"}}}
145142
"""
146-
Then the compatibility check should be compatible
143+
Then the compatibility check should be incompatible
147144

148145
# ==========================================================================
149146
# INCOMPATIBLE READER/WRITER PAIRS (15 cases from Confluent)
@@ -335,8 +332,7 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
335332
# TRANSITIVE COMPATIBILITY CHAINS
336333
# ==========================================================================
337334

338-
@pending-impl
339-
Scenario: JSON Schema backward transitive — compatible chain
335+
Scenario: JSON Schema backward transitive — open content model rejects new properties
340336
Given the global compatibility level is "NONE"
341337
And subject "jsv-trans-ok" has "JSON" schema:
342338
"""
@@ -351,10 +347,9 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
351347
"""
352348
{"type":"object","properties":{"a":{"type":"integer"},"b":{"type":"string","default":""},"c":{"type":"number","default":0}},"required":["a"]}
353349
"""
354-
Then the response status should be 200
350+
Then the response status should be 409
355351

356-
@pending-impl
357-
Scenario: JSON Schema backward transitive — incompatible with first version
352+
Scenario: JSON Schema backward transitive — closed content model allows new properties
358353
Given the global compatibility level is "NONE"
359354
And subject "jsv-trans-fail" has "JSON" schema:
360355
"""
@@ -369,7 +364,7 @@ Feature: JSON Schema Validation Compatibility — Exhaustive (Confluent v8.1.1 C
369364
"""
370365
{"type":"object","properties":{"a":{"type":"integer"},"b":{"type":"string"},"c":{"type":"number"}},"required":["a"],"additionalProperties":false}
371366
"""
372-
Then the response status should be 409
367+
Then the response status should be 200
373368

374369
# ==========================================================================
375370
# UNION / ONEOF COMPATIBILITY

tests/bdd/features/compatibility_protobuf_diff.feature

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ message TestMessage {
208208
"""
209209
Then the compatibility check should be compatible
210210

211-
@pending-impl
212211
Scenario: Protobuf diff 09 — Detect removed required field
213212
Given the global compatibility level is "NONE"
214213
And subject "proto-diff-09" has "PROTOBUF" schema:
@@ -426,7 +425,6 @@ enum Status {
426425
"""
427426
Then the compatibility check should be compatible
428427

429-
@pending-impl
430428
Scenario: Protobuf diff 18 — Detect compatible field to oneof change
431429
Given the global compatibility level is "NONE"
432430
And subject "proto-diff-18" has "PROTOBUF" schema:
@@ -527,7 +525,6 @@ message TestMessage {
527525
"""
528526
Then the compatibility check should be incompatible
529527

530-
@pending-impl
531528
Scenario: Protobuf diff 22 — Detect compatible move field to oneof
532529
Given the global compatibility level is "NONE"
533530
And subject "proto-diff-22" has "PROTOBUF" schema:
@@ -725,7 +722,6 @@ message TestMessage {
725722
"""
726723
Then the compatibility check should be compatible
727724

728-
@pending-impl
729725
Scenario: Protobuf diff 30 — Detect compatible field label change for message
730726
Given the global compatibility level is "NONE"
731727
And subject "proto-diff-30" has "PROTOBUF" schema:
@@ -753,7 +749,6 @@ message TestMessage {
753749
"""
754750
Then the compatibility check should be compatible
755751

756-
@pending-impl
757752
Scenario: Protobuf diff 31 — Detect compatible field label change for string
758753
Given the global compatibility level is "NONE"
759754
And subject "proto-diff-31" has "PROTOBUF" schema:
@@ -781,7 +776,6 @@ message TestMessage {
781776
"""
782777
Then the compatibility check should be compatible
783778

784-
@pending-impl
785779
Scenario: Protobuf diff 32 — Detect compatible field label change for bytes
786780
Given the global compatibility level is "NONE"
787781
And subject "proto-diff-32" has "PROTOBUF" schema:

0 commit comments

Comments
 (0)