Conversation
| When requesting status.php | ||
| Then the json responded should match with | ||
| """ | ||
| {"installed":true,"maintenance":false,"needsDbUpgrade":false,"version":"10.0.3.3","versionstring":"10.0.3","edition":"Community","productname":"ownCloud"} |
There was a problem hiding this comment.
This will fail each time the ownCloud version number is bumped.
I did a similar sort of test for a version number in returned data in https://github.com/owncloud/core/pull/29230/files - look for "attribute value should be a valid version string" step. If you extract version and versionstring from the JSON then you can use version_compare() to discover if the data is a "reasonable valid" version number representation.
There was a problem hiding this comment.
I was thinking about checking the actual values by using occ.
There was a problem hiding this comment.
Yes, you could do that also - get those current version strings by some other way and make sure they are the same.
|
Ok some changes, now the version and versionstrings won't require to be changed with any newer version. To achieve that I've refactored CommandLine trait to include all the code from CommandLineContext, removing it. There is a variable required called ocPath, and I've added it to the constructor. This will affect all the apps, and will require to add that variable in customgroups and guests at least. |
|
Please rereview @PVince81 @phil-davis |
Codecov Report
@@ Coverage Diff @@
## master #29265 +/- ##
=========================================
Coverage 59.56% 59.56%
Complexity 17156 17156
=========================================
Files 1029 1029
Lines 57211 57211
=========================================
Hits 34076 34076
Misses 23135 23135Continue to review full report at Codecov.
|
29fcc80 to
b85a147
Compare
There was a problem hiding this comment.
having X in the expected version here doesn't feel right.
another approach could be to check keys individually:
"the response contains a key "installed" with value true"
in this case the version string would be checked with only:
"the response contains a key "versionString".
Also note that we have config switches to disable exposing the version, so we should also have scenarios for these
There was a problem hiding this comment.
Those X are changed with the current version of the server before comparing.
It gets their values using occ and then changes x.x.x.x for 10.0.3.3 for example.
There was a problem hiding this comment.
That is what I mean with "versions fixed " in the step name.
There was a problem hiding this comment.
I know, but to someone non-technical reading the scenarios this is not self-explanatory.
If you do not want to change this to the above proposal, then I suggest changing the strings to "$CURRENT_VERSION_STRING" which most will understand that a substitution will happen there.
There was a problem hiding this comment.
OK, that sounds good.
0eeec91 to
13bb778
Compare
|
@SergioBertolinSG please backport |
|
Backport to stable10 is in PR #29296 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is a test for #29228
it currently fails, requires #29261 .