SuffolkLITLab/EfileProxyServer

Add an end-to-end (without submission) unit test to avoid errors on in the ECF module

Closed this issue · 3 comments

Right now it's difficult to write unit tests for the ECF module due to the crazy number if inputs, so we'll need to build a testcontainers solution that can read in and setup a codedatabase just for those unit tests (doesn't have to have every court, maybe just one or two).

Would be nice to have guarantees that refactors won't re-introduce these certification patches.

Best way forward for this is to take the now separate python client from the EFSP integration package, put it in a separate package, and have two tests: one for this repo, which uses setup-python in the github action, and runs the integration test from there on the current commit in the Java repo, and another in the new python repo, which runs the same integration on e-file-test.suffolklitlab.org.

An update on this: #139 has been merged, and it's about as far as we can go.

I started trying to add a github action that could run the server, but it ran into a significant problem; the Suffolk.pfx certificate file needs to be present. It's possible to store it as base64'd file in a secret, but I'm hesitant that the internals would still be leaked somehow, either through maliciousness or mistake, and Tyler probably won't be happy / and or won't actually give us a new one. Cracking the *.pfx is probably possible, even without leaking it's password.

All that to say, I don't think we'll be able to automatically run a test that hits the EFM with GitHub. It's been made extremely easy, with one python script that starts, runs the tests (with coverage), and stops the docker containers, and I think that's as far as we could go with GitHub. We could make a system where efile-test.suffolklitlab.org polls the GitHub every night for new commits, and if they are present, it builds and runs. But getting reporting for that might be a bit more work. It is plausible enough that I'll leave this issue up for now.

Moved the other task to a new, better suited issue