Switch to using 'rails test:all' in documentation and CI
Fixes #3116. This allows us to drop our custom patch for running system tests, as well as opening up all the usual rails test goodies like running individual files or directories.
This commit is contained in:
parent
f58f49e196
commit
4c785792fb
8 changed files with 11 additions and 20 deletions
3
.github/workflows/docker.yml
vendored
3
.github/workflows/docker.yml
vendored
|
@ -33,4 +33,5 @@ jobs:
|
|||
curl -siL http://127.0.0.1:3000/api/0.6/node/1 | grep 'Null Island'
|
||||
- name: Test Complete Suite
|
||||
run: |
|
||||
docker-compose run --rm web bundle exec rails test:db
|
||||
docker-compose run --rm web bundle exec rails db:test:prepare
|
||||
docker-compose run --rm web bundle exec rails test:all
|
||||
|
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -66,7 +66,7 @@ jobs:
|
|||
- name: Install node modules
|
||||
run: bundle exec rake yarn:install
|
||||
- name: Run tests
|
||||
run: bundle exec rake test:db
|
||||
run: bundle exec rails test:all
|
||||
- name: Report completion to Coveralls
|
||||
uses: coverallsapp/github-action@v1.1.2
|
||||
with:
|
||||
|
|
|
@ -33,7 +33,7 @@ functionality.
|
|||
You can run the existing test suite with:
|
||||
|
||||
```
|
||||
bundle exec rake test
|
||||
bundle exec rails test:all
|
||||
```
|
||||
|
||||
You can view test coverage statistics by browsing the `coverage` directory.
|
||||
|
|
|
@ -56,7 +56,7 @@ Run the Rails database migrations:
|
|||
|
||||
Run the test suite by running:
|
||||
|
||||
docker-compose run --rm web bundle exec rake test:db
|
||||
docker-compose run --rm web bundle exec rails test:all
|
||||
|
||||
### Loading an OSM extract
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ bundle exec rake db:migrate
|
|||
To ensure that everything is set up properly, you should now run:
|
||||
|
||||
```
|
||||
bundle exec rake test:db
|
||||
bundle exec rails test:all
|
||||
```
|
||||
|
||||
This test will take a few minutes, reporting tests run, assertions, and any errors. If you receive no errors, then your installation is successful.
|
||||
|
|
|
@ -32,7 +32,7 @@ Within this login shell, you can do development, run the server or the tests. Fo
|
|||
|
||||
```
|
||||
cd /srv/openstreetmap-website/
|
||||
rake test
|
||||
bundle exec rails test:all
|
||||
```
|
||||
|
||||
To access the web pages you run the following commands then access the site in your [local browser](http://localhost:3000):
|
||||
|
@ -40,7 +40,7 @@ To access the web pages you run the following commands then access the site in y
|
|||
```
|
||||
vagrant ssh
|
||||
cd /srv/openstreetmap-website/
|
||||
rails server --binding=0.0.0.0
|
||||
bundle exec rails server --binding=0.0.0.0
|
||||
```
|
||||
|
||||
You edit the code on your computer using the code editor you are used to using, then through shared folders the code is updated on the VM instantly.
|
||||
|
|
|
@ -5,9 +5,9 @@ Do NOT edit any translations in here, please use translatewiki.net instead.
|
|||
The only file in this directory that should be edited by hand is en.yml, when
|
||||
localisation strings change or new translations are introduced. All other
|
||||
languages _need_ to be edited using translatewiki.net. Please make sure that you
|
||||
run the tests using *rake test* to make sure that there are no errors, as there
|
||||
is at least one test that makes sure that all translations are valid (we'll
|
||||
makes sure that they won't cause the site to not work).
|
||||
run the tests using *bundle exec rails test:all* to make sure that there are no
|
||||
errors, as there is at least one test that makes sure that all translations are
|
||||
valid (we'll makes sure that they won't cause the site to not work).
|
||||
|
||||
There is more information about translating the website on the wiki at
|
||||
http://wiki.openstreetmap.org/wiki/Website_Internationalization.
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
task :test => :environment do
|
||||
Rails::TestUnit::Runner.rake_run(["test/system"]) unless ENV.key?("TEST")
|
||||
end
|
||||
|
||||
namespace :test do
|
||||
task "lib" => "test:prepare" do
|
||||
$LOAD_PATH << "test"
|
||||
Rails::TestUnit::Runner.rake_run(["test/lib"])
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue