Coder Social home page Coder Social logo

mackensen / moodle-hat Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 6.0 65 KB

Moodle Hat is a Vagrant configuration which provisions a Moodle instance with Behat Acceptance testing and PHPUnit testing configured. It uses a headless Selenium server for Javascript testing.

License: GNU General Public License v2.0

Shell 11.07% Puppet 79.55% PHP 8.81% Vim Script 0.57%

moodle-hat's People

Contributors

andyzito avatar kwiliarty avatar mackensen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-hat's Issues

Run composer install; not update

I think I did a composer update in the manifest because of an outdated library, but the lock file is there for a reason and it creates problems with the upstream when vagrant changes it locally. Deleting the vendor/ directory and installing has the same effect.

LDAP provisioning fails on new builds

Sometimes puppet tries to load the eduperson schema before the database is configured:

==> default: Error: LDIF content:
==> default: dn: cn=eduperson,cn=schema,cn=config
==> default: objectClass: olcSchemaConfig
==> default: cn: eduperson
...
==> default: Error message: Command original_ldapadd is missing

Enhancement: Support richer behat progress/failure outputs by default

The problem with behat is that it takes so long to run that its worthwhile having different output plugins that you can examine whilst a run continues. Since I started using the html output plugin and failure dumps I found it a lot more productive. I think something like that would be a great edition to this!

This is the bash function I use with mdk:

function behat () {
    BEHATDATAROOT=`mdk info -v behat_dataroot`
    BEHATPATH=/Users/danp/www/behat_runs/`date +%Y%m%d_%H%M%S`/
    mkdir $BEHATPATH
    mdk info -v behat_faildump_path -e $BEHATPATH

    vendor/bin/behat --format=moodle_progress,progress,html,failed \
        --out=,$BEHATPATH/progress.txt,$BEHATPATH/status.html,$BEHATPATH/failed.txt \
        --config=$BEHATDATAROOT/behat/behat.yml "$@"
}

I serve that behat_runs directory with apache with listings and can examine it whilst a run is going on.
(Only just getting started with vagrant myself, but hope I could make a pull request at some point :))

Load Moodle's config file from puppet before running install_database.php

We should revert #9 and just make sure that we load the config.php from puppet before running admin/cli/install_database.php as an alternative to admin/cli/install.php. The former expects config.php to exist, and by loading the config from puppet we keep the door open to tweak config settings down the road.

Behat init problem

==> default: Error: php admin/tool/behat/cli/init.php returned 250 instead of one of [0]
==> default: Error: /Stage[main]/Moodle::Behat/Exec[configure_behat]/returns: change from notrun to 0 failed: php admin/tool/behat/cli/init.php returned 250 instead of one of [0]

OS: OS X
Vagrant vers.: 1.8.1

Configure cron by default

What it says on the tin. Useful for running scheduled tasks. I'm thinking about adding it, but commenting it out by default. I can see use cases for when you wouldn't want it running while you were actively developing a new task.

Fix permissions after provisioning

Following a full provisioning run there are a couple non-ideal situations:

  • Parts of /home/vagrant are owned root:root, which prevents composer from using the oauth token as the vagrant user
  • Although there's an ACL for vagrant on /var/www/moodle/htdocs, effective permissions wind up being a no-op so you can't reinitialize behat. Apache doesn't need write so owning everything vagrant:vagrant might fix it

Composer installation fails intermittently

Hadn't seen this before:

PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'The HOME or COMPOSER_HOME environment variable must be set for composer to install correctly'

I don't know why this is a problem now when it wasn't before, but setting COMPOSER_HOME as an environment variable is a trivial fix.

Error communicating with the remote browser. It may have died

Complete behat runs don't finish. This is the short version:

Error communicating with the remote browser. It may have died.
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'moodlehat', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-30-> generic', java.version: '1.6.0_33'
Driver info: driver.version: EventFiringWebDriver

Remove any existing moodle config file before installation

Rather than cloning the moodle directory for each initial provision it can save time to copy an existing local moodle. Similarly, it can be convenient at times to reprovision an existing machine. In both cases, the admin/cli/install.php command will fail, however, if config.php already exists. By removing any potential config.php first we can insure that the command will run.

Add eduperson schema

This is selfish because the local_ldap tests need it but it seems like a common enough use case.

Add ghostscript support

ghostscript amounts to an undocumented dependency for the PDF annotation features. I've no immediate plans to install unoconv but having gs enables Google Drive integration.

proxy_fcgi:error

Hi everyone,
After vagrant up and all the setup I try to access http://local.moodle.test/ and I have a 404. http://192.168.50.10/ gave me a 503.

I have this error in my log:

vagrant@moodlehat:/var/www/moodle/htdocs$ sudo cat /var/log/apache2/local.moodle.test_error.log
[Wed Feb 10 23:23:41.415993 2021] [proxy:error] [pid 18879] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9001 (*) failed
[Wed Feb 10 23:23:41.416180 2021] [proxy_fcgi:error] [pid 18879] [client 192.168.50.1:58848] AH01079: failed to make connection to backend: localhost

Anyone had this problem before?

Thank you in advance for your help

Consider xdebug support

I haven't done much with xdebug, but I've encountered a bug where performance matters. If xdebug proves helpful I'll consider rolling it in. If there are reasonable alternatives to xdebug I'm open to them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.