Skip to content

Commit 2d70abd

Browse files
committed
Made it possible to run the tests without internet access
When the default rake task is run (which is the standard way to run the tests) we always update the common test suite before running the tests. Unfortunately, if the computer running the tests has no internet access, this update will fail and then the tests never run. I've changed this so that if the update to the common test suite fails, we display an error then carry on with the rest of the test suite.
1 parent aab26dd commit 2d70abd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Rakefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ task :update_common_tests do
99
unless File.read(".git/config").include?('submodule "test/test-suite"')
1010
sh "git submodule init"
1111
end
12-
sh "git submodule update --remote --quiet"
12+
13+
puts "Updating json-schema common test suite..."
14+
15+
begin
16+
sh "git submodule update --remote --quiet"
17+
rescue StandardError
18+
STDERR.puts "Failed to update common test suite."
19+
end
1320
end
1421

1522
Rake::TestTask.new do |t|

0 commit comments

Comments
 (0)