@@ -45,7 +45,7 @@ struct simple_sharded_store {
45
45
simple_sharded_store& operator =(simple_sharded_store&&) = delete ;
46
46
47
47
pps::schema_id
48
- insert (const pps::canonical_schema & schema, pps::schema_version version) {
48
+ insert (const pps::unparsed_schema & schema, pps::schema_version version) {
49
49
const auto id = next_id++;
50
50
store
51
51
.upsert (
@@ -73,9 +73,9 @@ bool check_compatible(
73
73
simple_sharded_store store;
74
74
store.store .set_compatibility (lvl).get ();
75
75
store.insert (
76
- pandaproxy::schema_registry::canonical_schema {
76
+ pandaproxy::schema_registry::unparsed_schema {
77
77
pps::subject{" sub" },
78
- pps::canonical_schema_definition {writer, pps::schema_type::protobuf}},
78
+ pps::unparsed_schema_definition {writer, pps::schema_type::protobuf}},
79
79
pps::schema_version{1 });
80
80
return store.store
81
81
.is_compatible (
@@ -107,7 +107,7 @@ SEASTAR_THREAD_TEST_CASE(test_protobuf_simple) {
107
107
108
108
auto schema1 = pps::canonical_schema{
109
109
pps::subject{" simple" }, simple.share ()};
110
- store.insert (schema1, pps::schema_version{1 });
110
+ store.insert (pps::to_unparsed ( schema1. share ()) , pps::schema_version{1 });
111
111
auto valid_simple = pps::make_protobuf_schema_definition (
112
112
store.store , schema1.share ())
113
113
.get ();
@@ -119,7 +119,7 @@ SEASTAR_THREAD_TEST_CASE(test_protobuf_nested) {
119
119
120
120
auto schema1 = pps::canonical_schema{
121
121
pps::subject{" nested" }, nested.share ()};
122
- store.insert (schema1, pps::schema_version{1 });
122
+ store.insert (pps::to_unparsed ( schema1. share ()) , pps::schema_version{1 });
123
123
auto valid_nested = pps::make_protobuf_schema_definition (
124
124
store.store , schema1.share ())
125
125
.get ();
@@ -134,7 +134,7 @@ SEASTAR_THREAD_TEST_CASE(test_protobuf_imported_failure) {
134
134
// imported depends on simple, which han't been inserted
135
135
auto schema1 = pps::canonical_schema{
136
136
pps::subject{" imported" }, imported.share ()};
137
- store.insert (schema1, pps::schema_version{1 });
137
+ store.insert (pps::to_unparsed ( schema1. share ()) , pps::schema_version{1 });
138
138
BOOST_REQUIRE_EXCEPTION (
139
139
pps::make_protobuf_schema_definition (store.store , schema1.share ()).get (),
140
140
pps::exception ,
@@ -151,7 +151,7 @@ SEASTAR_THREAD_TEST_CASE(test_protobuf_imported_not_referenced) {
151
151
auto schema2 = pps::canonical_schema{
152
152
pps::subject{" imported" }, imported_no_ref.share ()};
153
153
154
- store.insert (schema1, pps::schema_version{1 });
154
+ store.insert (pps::to_unparsed ( schema1. share ()) , pps::schema_version{1 });
155
155
156
156
auto valid_simple = pps::make_protobuf_schema_definition (
157
157
store.store , schema1.share ())
@@ -174,9 +174,9 @@ SEASTAR_THREAD_TEST_CASE(test_protobuf_referenced) {
174
174
auto schema3 = pps::canonical_schema{
175
175
pps::subject{" imported-again.proto" }, imported_again.share ()};
176
176
177
- store.insert (schema1, pps::schema_version{1 });
178
- store.insert (schema2, pps::schema_version{1 });
179
- store.insert (schema3, pps::schema_version{1 });
177
+ store.insert (pps::to_unparsed ( schema1. share ()) , pps::schema_version{1 });
178
+ store.insert (pps::to_unparsed ( schema2. share ()) , pps::schema_version{1 });
179
+ store.insert (pps::to_unparsed ( schema3. share ()) , pps::schema_version{1 });
180
180
181
181
auto valid_simple = pps::make_protobuf_schema_definition (
182
182
store.store , schema1.share ())
@@ -199,9 +199,9 @@ SEASTAR_THREAD_TEST_CASE(test_protobuf_recursive_reference) {
199
199
auto schema3 = pps::canonical_schema{
200
200
pps::subject{" imported-twice.proto" }, imported_twice.share ()};
201
201
202
- store.insert (schema1, pps::schema_version{1 });
203
- store.insert (schema2, pps::schema_version{1 });
204
- store.insert (schema3, pps::schema_version{1 });
202
+ store.insert (pps::to_unparsed ( schema1. share ()) , pps::schema_version{1 });
203
+ store.insert (pps::to_unparsed ( schema2. share ()) , pps::schema_version{1 });
204
+ store.insert (pps::to_unparsed ( schema3. share ()) , pps::schema_version{1 });
205
205
206
206
auto valid_simple = pps::make_protobuf_schema_definition (
207
207
store.store , schema1.share ())
@@ -338,7 +338,7 @@ message well_known_types {
338
338
confluent.type.Decimal c_decimal = 48;
339
339
})" ,
340
340
pps::schema_type::protobuf}};
341
- store.insert (schema, pps::schema_version{1 });
341
+ store.insert (pps::to_unparsed ( schema. share ()) , pps::schema_version{1 });
342
342
343
343
auto valid_empty
344
344
= pps::make_protobuf_schema_definition (store.store , schema.share ()).get ();
0 commit comments