-
Notifications
You must be signed in to change notification settings - Fork 187
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
[tests-only][full-ci] removing the setresponse in given/then step in SettingContext and TUSContext #7298
Conversation
Issue with sonarcloud: #7301 |
a0f1d39
to
93a889b
Compare
ac98536
to
5c900e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 ✨
5c900e3
to
c0e0c6f
Compare
this scenario is failing: |
consistently failing in CI |
yeah it might also be due to the test code so i will try to look carefully locally |
e18cdee
to
bcb3668
Compare
e55e064
to
30f4128
Compare
if (isset(WebDavHelper::$SPACE_ID_FROM_OCIS)) { | ||
WebDavHelper::$SPACE_ID_FROM_OCIS = ''; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review this @saw-jan dai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we clear this after each request. any case where this is to be clean in afterScenario? But yeah i think that we do not need this variable $SPACE_ID_FROM_OCIS
variable anymore. This was added because we used the same testcode for core
. We can make an issue to refactor this also. @saw-jan @SwikritiT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we clear this after each request. any case where this is to be clean in afterScenario? But yeah i think that we do not need this variable
$SPACE_ID_FROM_OCIS
variable anymore. This was added because we used the same testcode forcore
. We can make an issue to refactor this also. @saw-jan @SwikritiT
I actually removed this before but this scenario was failing: apiSpacesShares/shareUploadTUS.feature:248
later found out that $SPACE_ID_FROM_OCIS was not reset in the scenario apiSpacesShares/shareUploadTUS.feature:248 so the request was send to the space id from previous scenario resulting 409 status error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make an issue to refactor this also.
yeah, should be on the list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other LGTM 👍
30f4128
to
f7f5f42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 ✨
Kudos, SonarCloud Quality Gate passed! |
…SettingContext and TUSContext (#7298) * refactor given when then steps in settings and tus contexts * set resource location from response * addressed the reviews * reset spaceidfromocis * reset after scenario using after hook
Description
We have used setResponse() and $this->response in the Given/Then steps and some helper functions (maybe to reuse existing available methods). But storing responses from Given/Then steps and helper functions is not a good idea because it can lead to a false positive assertion in the Then steps.
So, check the use of setResponse() and $this->response in
So this pr make the above changes in
SettingContext
andTUSContext
Related Issue
#7082
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: