killgrave icon indicating copy to clipboard operation
killgrave copied to clipboard

Improvement - Imposter responses

Open deerbone opened this issue 1 year ago • 2 comments

This PR introduces preloading response body into memory before the mockserver starts. This makes it easier to spot bugs in a configuration that uses a lot of BodyFiles. Any issue with the files is now clearly logged on startup. Watcher still works even with this change.

This change improves the speed of the server since the data doesn't need to get loaded every time a request arrives.

I have also fixed the imposter base path bug, that I later realized is already implemented by #173. I can remove it, but it would be nice to have that fix merged since the main branch is harder to use because of it.

deerbone avatar Oct 15 '24 18:10 deerbone

I have also fixed the imposter base path bug, that I later realized is already implemented by #173. I can remove it, but it would be nice to have that fix merged since the main branch is harder to use because of it.

I'm planning to get that one merged over the next few days, I'll ping you once ready so you can pull those changes. I just wanted to find some time to add a couple of tests of that change, so we prevent the same mistake once more in the future.

Thanks! 🙏🏻

joanlopez avatar Oct 26 '24 23:10 joanlopez

my feeling is that it might have conflicts with https://github.com/friendsofgo/killgrave/pull/177

@joanlopez for sure, there will be conflicts but nothing major that I can't resolve. I'll revisit this PR once the other one is merged.

deerbone avatar Oct 30 '24 11:10 deerbone