Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable stub server #4

Merged
merged 7 commits into from
Dec 4, 2024
Merged

Add configurable stub server #4

merged 7 commits into from
Dec 4, 2024

Conversation

wimspaargaren
Copy link
Contributor

Add a configurable stub server.

Configuring

curl --location 'localhost:8080/configure' \
--header 'Content-Type: application/json' \
--data '{
    "path": "/foo",
    "response": {"foo": "bar"}
}'

Hit a configured endpoint

curl --location 'localhost:8080/foo'

@sbp-bvanb
Copy link
Collaborator

Could you extend the README by adding an example you have provided in the description of this PR?

@wimspaargaren
Copy link
Contributor Author

Done. Also simplified the docker file. Now the only thing that remains is adjusting the docker GH action to receive different build args.

@sbp-bvanb sbp-bvanb force-pushed the add-stub-server branch 4 times, most recently from f0e9a86 to f9b898e Compare December 3, 2024 07:57
Copy link

@markvl-sbp markvl-sbp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Dockerfile can be improved slightly, but nothing to keep this PR from being merged as-is.

Dockerfile Outdated Show resolved Hide resolved
Copy link

@kasbuunk kasbuunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have time for detailed look, but some comments nonetheless. If I had more time I'd take a close look at that any in Response and map value in endpoints to see how it's used and if we can make a non-empty interface from that.

cmd/mcvs-stub-server/main.go Show resolved Hide resolved
cmd/mcvs-stub-server/main.go Show resolved Hide resolved
cmd/mcvs-stub-server/main.go Outdated Show resolved Hide resolved
cmd/mcvs-stub-server/main.go Outdated Show resolved Hide resolved
@wimspaargaren wimspaargaren merged commit 516f89f into main Dec 4, 2024
10 checks passed
@wimspaargaren wimspaargaren deleted the add-stub-server branch December 4, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants