Open oltyant opened 1 year ago
As far as I can see, you are simulating a GET
on the endpoint. If you want to test streaming behavior, I guess you'd need to simulate receiving a streaming response. Which should give you a Response[ZStream[...]]
or sth similar
Hello,
I have a bunch of plain http server endpoints which works fine but one of them I needed to change to give back
serverSentEventsBody
so this is the only endpoint that gives backStream[Throwable, ServerSentEvent]
. I am using ZIO 2 and so I am usingZStream
in the implementation. Now when we test the endpoints we use the entire list of routes:val wsRoutes = Router("/" -> allRoutes).orNotFound
In a similar way:I did not find a way to transform the
result: Response[ZIO[Server,Throwable,_]]
to aZStream
to test the server sent events. Is there a way to do it? I could not find a solution anywhere. If there is, sorry for raising a ticket for it. If not, will you add this feature to tapir?