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

Fix #1859 - Pass caller's propagation-policy/cascade options to the underlying replicaset when deleting a deployment #1871

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

k-wall
Copy link
Contributor

@k-wall k-wall commented Nov 20, 2019

I tried and failed to write a unit test for this change. The mock server allows you to set up expectations about a server.expect().delete().withPath()..., but there seem to be no way to actually set an expectation about the request body (to validate the delete options). I noticed the server.getLastRequest() exists, but this doesn't help me in this case. getLastRequest() gives me the delete for the deployment, I need to access the penultimate which would be the DELETE for my replicaset.

… to the underlying replicaset when deleting a deployment
@centos-ci
Copy link

Can one of the admins verify this patch?

@rohanKanojia
Copy link
Member

You can try asserting value of getLastRequest().getBody().readUtf8()

@rohanKanojia
Copy link
Member

ok to test

@k-wall
Copy link
Contributor Author

k-wall commented Nov 20, 2019

You can try asserting value of getLastRequest().getBody().readUtf8()

the code deletes the replicaset then the deployment. getLastRequest gives me the delete of the deployment. The mock framework doesn't seem to allow me to access the request that came before it which is what I need to validate my change.

@rohanKanojia
Copy link
Member

ah, sorry. I misunderstood your statement. Yeah, I'm also not sure how to get second last request.

@rohanKanojia
Copy link
Member

retest this please

@rohanKanojia
Copy link
Member

[merge]

@fusesource-ci fusesource-ci merged commit fbb6901 into fabric8io:master Nov 20, 2019
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.

6 participants