-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add data from migrations table to report #64
Conversation
Fixes #63 |
Codecov Report
@@ Coverage Diff @@
## master #64 +/- ##
==========================================
- Coverage 7.1% 6.7% -0.41%
- Complexity 52 53 +1
==========================================
Files 6 6
Lines 183 194 +11
==========================================
Hits 13 13
- Misses 170 181 +11
Continue to review full report at Codecov.
|
4f6aebb
to
5245a1d
Compare
Would be great to expand the test-matrix now, to test configreport app in combination with several Database backends. ( mysql / postgres / oracle ) - so we can ensure that the report still works expected with the different supported databases Database test improvments here: |
5245a1d
to
d7fb726
Compare
d7fb726
to
2eaaf8c
Compare
->willReturn($expectedResult); | ||
|
||
$this->connection | ||
->method('getQueryBuilder') |
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.
might have been better to put actual data into the oc_migrations table, but I guess there might be data there already due to setup
or check that the result contains some old known migrations from the real data ?
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.
@PVince81 I captured the data from my dev machine and updated the test. Let me know if the updated test looks ok. For testing I used sqlite. Below is the console log:
➜ unit git:(add-oc-migration-data) ✗ /home/sujith/test/owncloud3/lib/composer/phpunit/phpunit/phpunit ReportDataCollectorTest.php
Cannot load Xdebug - it was already loaded
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
Runtime: PHP 7.2.9-1+ubuntu18.04.1+deb.sury.org+1 with Xdebug 2.6.0
Configuration: /home/sujith/test/owncloud3/apps/configreport/tests/unit/phpunit.xml
. 1 / 1 (100%)
Time: 10.24 seconds, Memory: 44.00MB
OK (1 test, 181 assertions)
Generating code coverage report in Clover XML format ... done
➜ unit git:(add-oc-migration-data) ✗
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.
Ouch hold on... I will ping again here. Just hold on for review. Until I fix this...
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.
Ok, so the failure as of now is ..Makefile:41: recipe for target 'test-php-unit-dbg' failed
https://drone.owncloud.com/owncloud/configreport/125/64.
@PVince81 Let me know the updated tests look ok.
this will also need a backport |
wot
|
3011f3b
to
dc7db3d
Compare
$this->assertArrayHasKey('app', $result); | ||
$this->assertArrayHasKey('version', $result); | ||
$values = \array_values($result); | ||
$this->assertContains($values[0], ['core', 'dav', 'files_sharing', 'files_trashbin', 'notifications', 'dav', 'files_external', 'federatedfilesharing', 'customgroups']); |
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.
this will likely fail as we don't bundle "customgroups", etc
only pick the ones present in the core repository
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 have updated the test, removed customgroups
. I can't delete notifications
, though. As the bundle owncloud-daily-master-qa.tar.bz2
has notifications app.
7927e57
to
bd242c4
Compare
@sharidas you cannot list all migrations anyway, so only a few is enough. |
8a03de7
to
ac41883
Compare
Updated the test. Removed |
@patrickjahns should we ignore / disable to unblock this ?
not sure if related to this PR |
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.
Code looks good 👍
I am going to push the change for backport then. Thanks. |
ac41883
to
22ad0db
Compare
Backport to stable10 branch #68 |
Before this PR, the debugger would not cause segfaults and run out of memory. 4G should be limited to 2G anyway. Neither the less - needs looking into, as we don't know what is causing the memory bloat when running the unit tests |
Removing the test and running it in drone results in no failure. So the test added here is the culprit. Looking at the tests, this is not a simple unit test, it's trigger a large integration test. The whole reporter class should be refactored to become testable. Right now in the current state this will 💥 in our face |
Any solutions in scope for 10.0.10 RC2 ? |
22ad0db
to
937c025
Compare
Add data from migrations table to the report. Signed-off-by: Sujith H <sharidasan@owncloud.com>
937c025
to
d1c1795
Compare
The pr is updated by skipping the test. |
Add data from migrations table to the
report.
Signed-off-by: Sujith H sharidasan@owncloud.com