Eddie Stanley
07/23/2023, 11:58 PMBoris
07/24/2023, 1:30 AMEddie Stanley
07/24/2023, 1:36 AMEddie Stanley
07/24/2023, 1:37 AMBoris
07/24/2023, 1:48 AMBoris
07/24/2023, 1:48 AMEddie Stanley
07/24/2023, 1:49 AMBoris
07/24/2023, 1:58 AMBoris
07/24/2023, 1:59 AMBoris
07/24/2023, 1:59 AMBoris
07/24/2023, 2:00 AMBoris
07/24/2023, 2:01 AMEddie Stanley
07/24/2023, 2:02 AMthen it doesn't affect the contract, it's just an infrastructure dependency, that could be tested in other waysTo be clear, I'm not worried about not testing the pass-through layer. I'm more worried that we do test the (logical) contract between the SPA and the ExtractionService
Boris
07/24/2023, 2:02 AMEddie Stanley
07/24/2023, 2:03 AMBoris
07/24/2023, 2:04 AMTimothy Jones
07/24/2023, 5:33 AMTimothy Jones
07/24/2023, 5:34 AMTimothy Jones
07/24/2023, 5:34 AMTimothy Jones
07/24/2023, 5:35 AMMatt (pactflow.io / pact-js / pact-go)
Essentially the idea is that you have “transforming verifications” - where you write the contract at the SPA, do the verification at the proxy, that verification produces and a transformed contract (which is asserted the same way as a regular client contract would be)I remember you talking about it at lunch once, but I never fully followed it, specifically, how it solved the problem. There are two classes (broadly) of this problem: 1. Pure transform aka the classic API gateway (often, this is pure configuration/infra). The hard problem here, usually, is that there is little code to test and it can be cumbersome to setup the testing scenarios. 2. There is some more complex logic going on (combining APIs, orchestration, choreography, etc.). The problem here, is that if you are using tools like Layer7/Apigee/Axway etc. then you’re in a real spot because they are very hard to test, but you can’t get away with just mapping or ignoring bits because they do way to much. I posited a while back that for (1) we could potentially just allow a configuration file be uploaded from the provider that documents the mapping, and we somehow “overlay” that into the verification process. I like that terminology - and it describes a broader concept that could be reused, for sure.
Timothy Jones
07/24/2023, 7:41 AMTimothy Jones
07/24/2023, 7:42 AMTimothy Jones
07/24/2023, 7:44 AMMatt (pactflow.io / pact-js / pact-go)
For the rest, you’d run the mock in a capture mode.which mock are we talking about here? The mock that the gateway would use? i.e. you would do a VCR style test?
Matt (pactflow.io / pact-js / pact-go)
I don’t like the idea of uploading a mapping. You’d be back in spec land.agreed, it was just an idea at the time (and it’s gone nowhere, probably in part because it’s not a good idea 😆 )
Timothy Jones
07/24/2023, 9:13 AMMock Client (running the contract verification as normal)
-> Proxy
-> Mock Server (running contract definition, as you normally would at the client)
You would run the Mock Server in a "capture" mode, where you go "ok, capture the request, and return this response"