File tree Expand file tree Collapse file tree
packages/protocols/odata-v4/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,7 +314,20 @@ class ODataEndpoint implements ProtocolEndpoint {
314314 } ) ;
315315
316316 const metadata = await response . text ( ) ;
317- return { metadata, format : 'EDMX' } ;
317+
318+ // Extract entity sets from the EDMX XML for TCK compatibility
319+ // The TCK expects { entities } or { entitySets } or { types }
320+ const entitySetMatches = metadata . match ( / < E n t i t y S e t N a m e = " ( [ ^ " ] + ) " / g) || [ ] ;
321+ const entitySets = entitySetMatches . map ( match => {
322+ const nameMatch = match . match ( / N a m e = " ( [ ^ " ] + ) " / ) ;
323+ return nameMatch ? nameMatch [ 1 ] : '' ;
324+ } ) . filter ( Boolean ) ;
325+
326+ return {
327+ metadata,
328+ format : 'EDMX' ,
329+ entitySets // Add this for TCK compatibility
330+ } ;
318331 }
319332
320333 async close ( ) : Promise < void > {
@@ -481,15 +494,6 @@ describe('OData V4 Protocol TCK', () => {
481494 federation : true // OData doesn't support GraphQL federation
482495 } ,
483496 timeout : 30000 ,
484- hooks : {
485- beforeEach : async ( ) => {
486- // Clear data between tests
487- const driver = kernel . getDriver ( ) ;
488- if ( driver && typeof ( driver as any ) . clear === 'function' ) {
489- await ( driver as any ) . clear ( ) ;
490- }
491- }
492- } ,
493497 performance : {
494498 enabled : true ,
495499 thresholds : {
You can’t perform that action at this time.
0 commit comments