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

#7906 delete extra space from the end of an API success message. #7907

Conversation

pkiraly
Copy link
Member

@pkiraly pkiraly commented May 27, 2021

What this PR does / why we need it: When an administrator delete a user, s/he receives a JSON message containing a string: "AuthenticatedUser [identifier] deleted. ". At the end of this message there is an unwanted extra space.

Which issue(s) this PR closes:

Closes #7906

Special notes for your reviewer: no

Suggestions on how to test this: no

Does this PR introduce a user interface change? If mockups are available, please link/include them here: no

Is there a release notes update needed for this change?: no

Additional documentation: no

@coveralls
Copy link

coveralls commented May 27, 2021

Coverage Status

Coverage remained the same at 19.324% when pulling f1e726e on pkiraly:7906-delete-an-extra-space-from-delete-user-api-message into 52fee75 on IQSS:develop.

@pkiraly
Copy link
Member Author

pkiraly commented May 27, 2021

I extended a test to cover the success message content.

@scolapasta
Copy link
Contributor

scolapasta commented May 27, 2021

I extended a test to cover the success message content.

@pkiraly I don't think this is needed (we already check the status code). The actual message isn't critical, just success of failure. This is actually a great example, had the test already contained this assert, then it would have failed for the removing of a space - having that fail adds no (or at least little) value.

@pkiraly
Copy link
Member Author

pkiraly commented May 27, 2021

I don't think this is needed (we already check the status code).
@scolapasta Yes, it did not have a real value per se, but the test would be a safeguard in the future, when somebody want to change the content of the message, e.g. change username to email address. A test proves that there is an expectation regarding to the output, and changing the message might involve changes in the client software and documentation.
If you still think testing it is useless, I delete the test changes.

@scolapasta
Copy link
Contributor

I don't think this is needed (we already check the status code).
@scolapasta Yes, it did not have a real value per se, but the test would be a safeguard in the future, when somebody want to change the content of the message, e.g. change username to email address. A test proves that there is an expectation regarding to the output, and changing the message might involve changes in the client software and documentation.
If you still think testing it is useless, I delete the test changes.

@pkiraly yes, let's remove - alternatively, if you think it's important output, we should return it as part of a more structured json and not as just part of the message itself. (but that could also be out of scope for now)

@pkiraly
Copy link
Member Author

pkiraly commented May 27, 2021

@scolapasta done

@kcondon kcondon self-assigned this May 28, 2021
@kcondon kcondon merged commit 81f940d into IQSS:develop May 28, 2021
@djbrooke djbrooke added this to the 5.6 milestone Jun 21, 2021
@pkiraly
Copy link
Member Author

pkiraly commented Jun 24, 2021

This PR was developed by Göttingen eResearch Alliance, Germany, and funded by SSHOC, "Social Sciences and Humanities Open Cloud". SSHOC has received funding from the European Union’s Horizon 2020 project call H2020-INFRAEOSC-04-2018, grant agreement #823782.

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.

When delete a user via API the success message contain an extra space.
5 participants