-
Notifications
You must be signed in to change notification settings - Fork 75
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
Eliminate references to OTRS domains in the test suite #1013
Comments
This has to dealt with on an individual basis (sometimes only checksums of the expected results would have to be recalculated, sometimes servers would have to be set up, which provide some API to communicate with,...), unfortunately, which was the reason that we left it untouched so far. Of course this should be corrected over time, but atm, I don't think the benefit justifies the time needed to at least completely do this. |
I can work on this issue, if you want you can assign this to me. How do you think this could be solved? Replacing "otrs.[com|org|de]" with "otobo.org"? |
Hi Nicola, we would be happy if you do. :) You can just replace it with otobo.org, though I'm pretty sure that it won't be possible just like this everywhere, as I wrote before. But even if it can only be changed partly, if you help us and just rewrite some tests, which easily can be adapted to still run, it is helpful and welcome. I will assign you for now - thanks, Sven |
@niccord The first step would be to verify that the unit tests, optimally including the Selenium, tests are succeeding in your devel environment. In case of stumbling blocks I could assist you with the setup. |
@bschmalhofer I've launched the test suite including the Selenium part, but I am not sure about the result: I have a huge .out file (more than 500k rows), with lots of My environment is pretty clean and I've updated it from git before running the tests. |
@niccord yes, the test output is somewhat daunting. The relevant lines are the last two lines. There I have:
There are some 'not ok' cases, but these should be marked as TODO. Some sporadic failures are also tracked in #988. Don't worry about the error messages. They usually come from test code that deliberately provokes the errors. |
I have some MySQL table error, so I can't find that line in my test output. I try updating my docker container then run the tests again. |
Is it expected for the test scripts to drop my database tables? Because for the second time in a row I found it that way 😨 I have set this in my Kernel/Config.pm file: # Test database used only when is specified in the test file
$Self->{TestDatabase} = {
DatabaseDSN => "DBI:Pg:dbname=otobo_test;host=$Self->{DatabaseHost}",
DatabaseUser => 'otrs',
DatabasePw => 'vRfmjkSijXuX1KKt',
}; but I also have: $Self->{'TestHTTPHostname'} = 'localhost'; which is used by Selenium, I suppose. I my test I found:
|
Hi @niccord , I noticed that you are using Docker together with PostgreSQL. This is mostly untested from my side. In https://github.com/bschmalhofer/otobo-ideas/wiki/Running-the-Test-Suite I started to jot down the approach I usually use. Note that this should be simplified and eventually be turned into a nice tutorial. I hope it helps for getting started. Best regards, |
Hi Bernhard, Your tutorial seems simple and straightforward, thanks! |
Since I am still unable to test with Selenium, I changed my approach: I have changed I will open a PR now, can you please test it with Selenium? |
Cool, I looked the changes and I notices some issues, mostly that Copyright notes were changed too. Could you take I look at the review comments in #1049 ? |
My regex should have had to filter them, anyway I restore those lines back. |
Hi Nicola, I have updated the instructions for running the test. https://github.com/bschmalhofer/otobo-ideas/wiki/Running-the-Test-Suite should now be more complete. I have also run the test suite from your PR and got three scripts with failures.
The failures in EmailParser.t and in PostMaster.t are just MD5 sums that have changed. That should be easy to fix. Best regards, |
Hi Bernhard, With this script, EmailParser, PostMaster and WebUserAgent give a different result: So what's the difference between the two scripts? Thank you 🙂 |
Hi Nicola, without looking at it, probably the scripts compare different files or checksums or so. This can really only be debugged by looking at what the script does, exactly. A good help can be to use Starting a single test is for example: Thank you - Sven |
Hi Nicola, @niccord, I would also recommend that you verify that e.g. /opt/otobo/scripts/test/EmailParser.t really holds your changed file. It is not enough that the container otobo_web_1 is running with your locally built image. The images holds the changed files in /opt/otobo_install/otobo_next. The files still have to be copied to the volume at /opt/otobo. See line 82 of scripts/update.sh in the otobo-docker repository.
|
Hi Bernhard @bschmalhofer, I followed your tutorial step by step but I have an issue with
Can you please help me? |
Hi Nicola, sorry, that error comes from recent changes for #1109. The aim there is to simplify the whole process by eliminating scripts/devel/prepare_selenium_container.sh. For that I started on a custom Selenium image, that unfortunately in not yet available on Docker Hub.Updated instructions are now at https://github.com/bschmalhofer/otobo-ideas/wiki/Running-the-Test-Suite-under-Docker.
And thanks for you continued contributions to OTOBO. |
Thanks for your quick answer. |
On which branch are you working? The head of https://github.com/RotherOSS/otobo/blob/rel-10_0 contains the script bin/docker/build_docker_images.sh that should build this local image. Maybe you need to rebase your local branch. |
I am working on a branch on my personal fork trying to fix this issue. |
Picked this up again after a pause and plan to have it ready for 10.0.13. As far as I rember some MD5 hashes still need to be adapted in the test suite. |
Hi Bernhard, |
at the "Gründerzentrum im Hafen Straubing-Sand"
Merged Nicolas PR, with the fixed MD5 sums. Reopening because I switched some more references from OTRS to OTOBO. |
at the "Gründerzentrum im Hafen Straubing-Sand"
Moving from Straubig-Sand to Oberwalting.
Eliminiated some more references to OTRS. Closing this issue. |
Wrong commit messages... |
The command
shows that OTRS domains are still referenced in the test scripts. These could be switched to OTOBO domains. Some test might also make DNS queries to OTRS domains.
The text was updated successfully, but these errors were encountered: