Comments (2)
Hi @mukrisp ,
I see the problem. I'll comment on a few things though since it looks like you're trying to get this to work 😄.
-
You mentioned that you put in a print statement and it caused mountebank to crash. I believe it's by design. From the http protocol it looks like you're supposed to print a JSON object to the console so mountebank knows the service loaded successfully. If you were using
console.log(...)
to print something before that, I could see a crash happening. -
The error you're seeing is due to my bad documentation. If you remove the comment under
_note: ...
underservices
, the protocol/service should load. When testing this I sent this body to the imposters endpoint via postman:
{
"protocol": "grpc",
"port": 4545,
"loglevel": "debug",
"recordRequests": true,
"services": {
"example.ExampleService": {
"file": "example.proto"
}
},
"options": {
"protobufjs": {
"_note": "any options to protobufjs",
"includeDirs": ["/mountebank-grpc/src/protos"]
}
},
...
}
That property was accidentally being sent to root.js.
- You should be able to send a client request to UnaryUnary after that. If you're using the JSON from the doc, you'll want to remove the
stubs.responses[0].is.error
since that will override the response invalue
.
Let me know if you have any other problems. There are some limitations with this implementation with the WellKnownTypes, but if you don't need those these are good for a quick mock.
from mountebank-grpc.
Hi,
Thanks for looking into this. As per your suggestion updated the imposter config by excluding the "_note" param.
It worked. Thanks again.
I am exploring on this. Will post here if any info is needed.
Regards,
Muthukrishnan.P
from mountebank-grpc.
Related Issues (10)
- Stream close immediately
- Crashes randomly
- "error": "11 OUT_OF_RANGE: invalid message" HOT 1
- Working Dockerfile for mountebank-grpc HOT 1
- Unable to install using npm install after cloning HOT 2
- Unable to match predicate of path and value for grpc request HOT 1
- Docker image for Docker compose HOT 1
- grpc_proxy imposter load failed when different proto files HOT 7
- Streaming responses are not streamed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mountebank-grpc.