Closed daithi-coombes closed 11 years ago
@mrdavidlaing currently I'm going to try importing the test data using the Vagrant file here https://github.com/mrdavidlaing/pressupbox-development-boilerplate/blob/test-database/Vagrantfile#L51
Where are the mysql tables defined? It may be best to import the test data there. I've looked in the vagrant file and grunt but can't find it.
sorry, the call for the db actions are in the grunt file development-boilerplate/blob/test-database/Gruntfile.js#L97
so will put them there for now, the shell command can then be coppied/pasted to rake.
The db gets created in the dev-server grunt task, so you should stick the db restore steps there - https://github.com/mrdavidlaing/pressupbox-development-boilerplate/blob/master/Gruntfile.js#L96
Just seen your comment - we're talking about the same place :)
@daithi-coombes - do you have an ETA for this to be completed?
getting started on it as we speak. I hope to have it up and tested by noon today
@daithi-coombes Also, I noticed that some of the galleries seem to be missing images eg: http://localhost:4567/?p=555 refers to wp-content/uploads/2011/01/canola2-624x468.jpg which we obviously don't have.
Could you get hold of those files and dump them into /tests/wp-content/uploads/... - the setup-test-database
task could test just copy them into the right place.
@mrdavidlaing
perfect example of my comment earlier that I couldn't commit changes I made to the build scripts inside the vm. I imported the sql dump in the 'dev-server' task using phing's build.xml, so my dev-server
task in build xml now looks like...
<!-- setup dev server -->
<target name="dev-server">
<taskdef name="pdosqlexec" classname="phing.tasks.ext.pdo.PDOSQLExecTask"/>
<trycatch>
<try>
<pdosqlexec url="mysql:host=localhost"
userid="root"
password="secret_password"
onerror="abort"
autocommit="true">
CREATE DATABASE wordpress;
</pdosqlexec>
</try>
<catch>
</catch>
<finally>
<exec command="mysql -uroot -psecret_password -h localhost wordpress < wordpress.sample.sql" />
</finally>
</trycatch>
</target>
<!-- end setup dev server -->
but this will be moved to rake tonight ;)
no prob, I'll find the missing files and commit them.
just thinking that maybe we should have another point for our next meeting (or sooner), that any build scripts, init scripts or init files that are needed by the vm should be in a folder in the pressupbox repository, that way contributers to pressupbox can submit commits to the build scripts etc?
I'm going to merge this PR to get the basic features already implemented.
The additional features @daithi-coombes is proposing can be rolled into the #24 - Rewrite build script in Rake
Install a test database for wordpress to populate the blog. See issue #4
some test data at: https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml