You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When looking to some problems @ MDL-70658 related to this image... it was not straightforward to know what is needed to get it working in a local environment.
So I had to look to both this and moodle-ci-runner (that already supports it) to see how to configure my local testing environment.
It would be great to get that minimally documented, maybe in the README.
For the records, this is what I did here to get the image working with both phpunit and behat. Tricky that we use that dynamic hash (not sure why), but it works. Added to config.php:
// Also keep the BBB docker mock server at hand if we are running tests.
// docker run -d -p 8080:80 moodlehq/bigbluebutton_mock:latest
$mockhash = sha1($CFG->wwwroot);
if (defined('BEHAT_TESTS') || defined('BEHAT_SITE_RUNNING')) {
$mockhash = sha1($CFG->behat_wwwroot);
}
define("TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER", 'http://127.0.0.1:8080/hash' . $mockhash);
The text was updated successfully, but these errors were encountered:
It seems that it's really hard to get the image working for local environments where the web server is not dockerized but running in the host and without any dns, but generic 127.0.0.1 or localhost. All sort of things have been tried (network=host, only for linux, host.docker.internal for mac/win, hacking the tests to connect there, also --add-host=hostdns:hostip...).
So surely, the best (easiest, quickest and working) solution for local testing is to just run the symfony app locally and done. Updated mine, this is how my config.php looks now:
// Also keep the BBB docker mock server at hand if we are running tests.
// docker run -d -p 8001:80 moodlehq/bigbluebutton_mock:latest
// !!! Cannot use the container locally because it's not able to callback to the host, so using server instead:
// cd /Users/stronk7/git_moodle/bigbluebutton_mock/application
// symfony server:start --port=8001 --no-tls --allow-http
// If it's not started, follow the instructions @ https://github.com/moodlehq/bigbluebutton_mock
$mockhash = sha1($CFG->wwwroot);
if (defined('BEHAT_TESTS') || defined('BEHAT_SITE_RUNNING')) {
$mockhash = sha1($CFG->behat_wwwroot);
}
define("TEST_MOD_BIGBLUEBUTTONBN_MOCK_SERVER", 'http://127.0.0.1:8001/hash' . $mockhash);
When looking to some problems @ MDL-70658 related to this image... it was not straightforward to know what is needed to get it working in a local environment.
So I had to look to both this and
moodle-ci-runner
(that already supports it) to see how to configure my local testing environment.It would be great to get that minimally documented, maybe in the README.
For the records, this is what I did here to get the image working with both phpunit and behat. Tricky that we use that dynamic hash (not sure why), but it works. Added to
config.php
:The text was updated successfully, but these errors were encountered: