Bug 35655 needed to mock the config, but instead introduced new env variables.
Created attachment 179093 [details] [review] Bug 39286: Use mock_config instead of env vars Bug 35655 needed to mock the config, but instead introduced new env variables. Test plan: prove t/db_dependent/Koha/BackgroundJob.t should still return green Bonus 1: no more warning t/db_dependent/Koha/BackgroundJob.t .. 1/6 Cannot connect to broker Failed to connect: Error connecting to not_localhost:99999: Invalid argument at /usr/share/perl5/Net/Stomp.pm line 27.; giving up at /usr/share/perl5/Net/Stomp.pm line 27. Bonus 2: tests are passing even if you have 'message_broker' in the config To test this, add the following entry to $KOHA_CONf then prove again <message_broker> <hostname>localhost</hostname> <port>61613</port> <username>guest</username> <password>guest</password> <vhost></vhost> </message_broker> => Without this patch the tests fail because the config will overwrite the env vars.
Created attachment 179148 [details] [review] Bug 39286: Use mock_config instead of env vars Bug 35655 needed to mock the config, but instead introduced new env variables. Test plan: prove t/db_dependent/Koha/BackgroundJob.t should still return green Bonus 1: no more warning t/db_dependent/Koha/BackgroundJob.t .. 1/6 Cannot connect to broker Failed to connect: Error connecting to not_localhost:99999: Invalid argument at /usr/share/perl5/Net/Stomp.pm line 27.; giving up at /usr/share/perl5/Net/Stomp.pm line 27. Bonus 2: tests are passing even if you have 'message_broker' in the config To test this, add the following entry to $KOHA_CONf then prove again <message_broker> <hostname>localhost</hostname> <port>61613</port> <username>guest</username> <password>guest</password> <vhost></vhost> </message_broker> => Without this patch the tests fail because the config will overwrite the env vars. Signed-off-by: Magnus Enger <magnus@libriotech.no> Warning goes away and prove works even with the message_broker config.
Created attachment 179161 [details] [review] Bug 39286: Use mock_config instead of env vars Bug 35655 needed to mock the config, but instead introduced new env variables. Test plan: prove t/db_dependent/Koha/BackgroundJob.t should still return green Bonus 1: no more warning t/db_dependent/Koha/BackgroundJob.t .. 1/6 Cannot connect to broker Failed to connect: Error connecting to not_localhost:99999: Invalid argument at /usr/share/perl5/Net/Stomp.pm line 27.; giving up at /usr/share/perl5/Net/Stomp.pm line 27. Bonus 2: tests are passing even if you have 'message_broker' in the config To test this, add the following entry to $KOHA_CONf then prove again <message_broker> <hostname>localhost</hostname> <port>61613</port> <username>guest</username> <password>guest</password> <vhost></vhost> </message_broker> => Without this patch the tests fail because the config will overwrite the env vars. Signed-off-by: Magnus Enger <magnus@libriotech.no> Warning goes away and prove works even with the message_broker config. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed for 25.05! Well done everyone, thank you!