xmera-circle / redmine_workload

[Fork] Calculate user workload over time
6 stars 3 forks source link

Fix issues with Postgres installation #18

Closed roman-vanicek closed 1 year ago

roman-vanicek commented 1 year ago

Tested on Postgres installation only. Fix issues #9 and #16.

liaham commented 1 year ago

Hi @roman-vanicek,

thank you very much for your first contribution. This will make all PostgreSQL user really happy! :-)

I will test it with MySQL/MariaDB as soon as I can.

Best regards, @liaham

liaham commented 1 year ago

Hi @roman-vanicek,

Unfortunately, date related tests won't pass with MySQL/MariaDB.

Did you also run the automated tests or did you test manually by clicking through the UI?

Here is the test result:

# Running:

....................................................................................F....................................

Finished in 10.420229s, 11.6120 runs/s, 79.5568 assertions/s.

  1) Failure:
WlNationalHolidayTest#test_holiday_is_not_workday [/home/liane-xmera/redmine/plugins/redmine_workload/test/unit/wl_national_holiday_test.rb:65]:
Result should only bring 2 workdays!.
--- expected
+++ actual
@@ -1 +1 @@
-[Mon, 15 May 2017, Thu, 18 May 2017]
+[Mon, 15 May 2017]

121 runs, 829 assertions, 1 failures, 0 errors, 0 skips

Best Regards, @liaham

roman-vanicek commented 1 year ago

I have to patch the code base quite a bit (created a new PR for it) to make it work. No tests fail in the patched environment with Postgres DB. Maybe the other PR shall be integrated before continuing with this one.

Roman

liaham commented 1 year ago

Thank you very much, Roman!

I will review your changes in https://github.com/xmera-circle/redmine_workload/pull/19 probably next week.

When the automated tests pass with postgres then we need an approach which supports both postgres and mysql.

Fixing postsgres problems in change of mysql problems is no option.

Do you think you can find an alternative solution?

roman-vanicek commented 1 year ago

While preparing PR #19 the test WlUserVacationTest: test_vacation_should_not_be_in_working_days was one of the last failing tests - I know this is not the one that fails for MySQL. Although the changes in PR #19 are purely syntactic may be there is some hidden bug that may get fixed using PR #19. If you agree, I would wait for its integration as I am unable to run tests without it.

liaham commented 1 year ago

Of course, let's wait until PR #19 is integrated.

Thank you!

roman-vanicek commented 1 year ago

Just for record: My test result is: 121 runs, 834 assertions, 0 failures, 0 errors, 0 skips

The number of assertions does not match with yours. One more thing to investigate after PR #19.

The test WlNationalHolidayTest: test_holiday_is_not_workday did run successfully.

liaham commented 1 year ago

Hi @roman-vanicek,

I have re-enabled the postgres section of the test action. So if you like to develop an alternative solution for the postgres problem, we can run the test against.

I will close this PR now.

Best Regards,

@liaham