Bug #4821
Updated by Brett Smith over 9 years ago
Two of the CLI tests are not isolated from the user's Arvados configuration, and can fail depending on what API server it's pointed at. If you're pointed at a production cluster, this happens:
<pre> 1) Failure:
TestArvGet#test_file_to_file_no_overwrite_file [/home/brett/repos/arvados/sdk/cli/test/test_arv-get.rb:67]:
Expected /Error:/ to match "arv-get: Local file tmp/foo already exists.\n".
2) Failure:
TestArvGet#test_file_to_file_no_overwrite_file_in_dir [/home/brett/repos/arvados/sdk/cli/test/test_arv-get.rb:79]:
Expected /Error:/ to match "arv-get: Local file tmp/foo already exists.\n".
</pre>
If you're pointed at an API server that is down, you get this:
<pre> 1) Failure:
TestArvGet#test_file_to_file_no_overwrite_file_in_dir [/home/brett/repos/arvados/sdk/cli/test/test_arv-get.rb:79]:
Expected /Error:/ to match "Traceback (most recent call last):\n File \"./bin/arv-get\", line 128, in <module>\n api_client = arvados.api('v1')\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/arvados/api.py\", line 156, in api\n svc = apiclient_discovery.build('arvados', version, **kwargs)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/oauth2client/util.py\", line 132, in positional_wrapper\n return wrapped(*args, **kwargs)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/googleapiclient/discovery.py\", line 198, in build\n resp, content = http.request(requested_url)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/arvados/api.py\", line 33, in http_request\n return self.orig_http_request(uri, **kwargs)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/httplib2/__init__.py\", line 1593, in request\n (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/httplib2/__init__.py\", line 1335, in _request\n (response, content) = self._conn_request(conn, request_uri, method, body, headers)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/httplib2/__init__.py\", line 1291, in _conn_request\n response = conn.getresponse()\n File \"/usr/lib/python2.7/httplib.py\", line 1022, in getresponse\n raise ResponseNotReady()\nhttplib.ResponseNotReady\n".
2) Failure:
TestArvGet#test_file_to_file_no_overwrite_file [/home/brett/repos/arvados/sdk/cli/test/test_arv-get.rb:67]:
Expected /Error:/ to match "Traceback (most recent call last):\n File \"./bin/arv-get\", line 128, in <module>\n api_client = arvados.api('v1')\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/arvados/api.py\", line 156, in api\n svc = apiclient_discovery.build('arvados', version, **kwargs)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/oauth2client/util.py\", line 132, in positional_wrapper\n return wrapped(*args, **kwargs)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/googleapiclient/discovery.py\", line 198, in build\n resp, content = http.request(requested_url)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/arvados/api.py\", line 33, in http_request\n return self.orig_http_request(uri, **kwargs)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/httplib2/__init__.py\", line 1593, in request\n (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/httplib2/__init__.py\", line 1335, in _request\n (response, content) = self._conn_request(conn, request_uri, method, body, headers)\n File \"/tmp/tmp.vPBqSYCQYx/local/lib/python2.7/site-packages/httplib2/__init__.py\", line 1291, in _conn_request\n response = conn.getresponse()\n File \"/usr/lib/python2.7/httplib.py\", line 1022, in getresponse\n raise ResponseNotReady()\nhttplib.ResponseNotReady\n".
</pre>
Make sure these tests work consistently, regardless of the user's configuration. Based on the test names, I think these are intended to test a case more like the first one pasted here, and should look for that error message more specifically.