-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Failure in update while operating on CRUD mode on Kubernetes mock server #957
Comments
Experienced the very same with createOrReplace() |
This makes CRUD mode almost unusable. Exception is thrown, when the mockresponse is null: // class MockWebServer.java
/**
* Reads a request and writes its response. Returns true if further calls should be attempted
* on the socket.
*/
private boolean processOneRequest(Socket socket, BufferedSource source, BufferedSink sink)
throws IOException, InterruptedException {
RecordedRequest request = readRequest(socket, source, sink, sequenceNumber);
if (request == null) return false;
requestCount.incrementAndGet();
requestQueue.add(request);
MockResponse response = dispatcher.dispatch(request);
if (response.getSocketPolicy() == DISCONNECT_AFTER_REQUEST) { // <-- Thrown here
socket.close();
return false;
} |
@rohanKanojia Are you still facing the issue ? |
Please try editing something else in the resource like, change some data value or something else. Also please try to use As far as I know, apiVersion, Kind and Name can't be changed, maybe I am wrong. If that's true, then I did not get what you are trying to achieve. |
ah, sorry my bad. I didn't realize that it's not possible to edit the name of a resource. You're right. |
Here is some code snippet that uses Kubernetes mock server in crud mode:
Whenever i try to udpdate this, i get a NullPointer exception :
Ideally Mock server should support such simple update operations.
The text was updated successfully, but these errors were encountered: