-
Notifications
You must be signed in to change notification settings - Fork 2
Developers Guide
Download Vagrant and VirtualBox. Once Vagrant has been installed, it's recommended that you install the vbguest plugin to keep the VirtualBox guest additions in sync with the VirtualBox version. In the same directory as your Vagrantfile type:
$ vagrant plugin install vagrant-vbguest
$ git clone git@github.com:IntersectAustralia/owncloud.git
$ cd owncloud
$ git submodule init
$ git submodule update
$ vagrant up
NOTE
If you get an error after 'vagrant up' command (VBoxManage: error: Failed to create the host-only adapter), then run this command:
$ sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist
then try 'vagrant up' again.
$ vagrant ssh
$ sudo su -
$ ls /var/www/html/owncloud/apps
You should see the directories crate_it and file_previewer
The server should be started already, go to http://localhost:8080/owncloud and create an account by entering a username and password.
NOTE
If you go to the Crate It page and you cannot see any folders/files, or the metadata section on the right hand side, that the cr8it config file (/var/www/html/owncloud/data/cr8it_config.json) is not set up properly. Please contact the Intersect team for more information on how to configure this file.
Once you have changed the cr8it_config.json file, be sure the restart the server:
$ vagrant ssh
$ sudo su -
$ service httpd restart
Download and install composor
$ curl http://getcomposer.org/installer | php
Install components
$ php -d detect_unicode=Off composer.phar install --prefer-source -v
Create a test user account that the tests can run against, with username / password "test". This step will currently has to be done manually.
Start java selenium server
# Assuming you are inside the owncloud directory (where you cloned the project)
$ cd apps/crate_it
$ bin/selenium/start.sh
If you are running tests on host machine against a guest vagrant system, you will need to set the following environment variable:
$ export TEST_ENV=vagrant
# Now you can run tests as follows:
$ bin/behat features/your_behat_test.feature
The publishing feature publishes to Sword endpoints, a useful server for development that can be installed on your vagrant machine is the Simple Sword Server.
$ git clone https://github.com/swordapp/Simple-Sword-Server.git
$ cd Simple-Sword-Server/sss
$ mv sss-1.0.py sss.py
$ python sss.py
This will crate a store subfolder which itself contains several subfolders corresponding to each collection. You can then add the endpoint to your cr8it_config.json.
Mailcatcher is a simple mail server for development and testing which catches the mail instead of sending it. In can be installed via gem.
$ sudo gem install mailcatcher
You will then need to update your php.ini to make use of mailcatcher instead of sendmail. If you are using vagrant you will also need to listen beyond the local loopback by specifying ip 0.0.0.0. Uncomment the sendmail_path line in /etc/php.ini so it looks like the following:
sendmail_path = /usr/bin/env /usr/bin/catchmail --smtp-ip 0.0.0.0
Then start mailcatcher with:
$ mailcatcher --http-ip 0.0.0.0
Point your browser to the guest machine on port 1080 to see the mailcatcher's web interface.