11167: Fixed integration test by replacing the use of PhantomJS with
authorLucas Di Pentima <lucas@curoverse.com>
Tue, 8 Aug 2017 19:53:32 +0000 (16:53 -0300)
committerLucas Di Pentima <lucas@curoverse.com>
Tue, 8 Aug 2017 19:53:32 +0000 (16:53 -0300)
Selenium, as the former wasn't returning all the expected response
headers.
Also, fixed the Range header used when asking for a partial log.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@curoverse.com>

apps/workbench/app/views/jobs/_show_log.html.erb
apps/workbench/test/integration/jobs_test.rb

index b4ede751183206e8259afd6df196f7a368c2bb7e..821b4bcdf27de248d1b3b29a81e0fb4e18bad04b 100644 (file)
@@ -74,7 +74,7 @@ var makeFilter = function() {
     $("#log-viewer-download-pane").show();
     var headers = {};
     if (log_size > log_maxbytes) {
-      headers['Range'] = 'bytes=0-' + log_maxbytes;
+      headers['Range'] = 'bytes=0-' + (log_maxbytes - 1);
     }
     var ajax_opts = { dataType: 'text', headers: headers };
     load_log();
index 4b89b5daa97d179df8f5fb1081dbbd9183193602..bfed03b14bd223085dd7fa704eb8494c951ec198 100644 (file)
@@ -40,6 +40,7 @@ class JobsTest < ActionDispatch::IntegrationTest
   end
 
   test 'view partial job log' do
+    need_selenium 'to be able to see the CORS response headers (PhantomJS 1.9.8 does not)'
     use_keep_web_config
 
     # This config will be restored during teardown by ../test_helper.rb: