--short Skip (or scale down) some slow tests.
--interactive Set up, then prompt for test/install steps to perform.
WORKSPACE=path Arvados source tree to test.
-CONFIGSRC=path Dir with api server config files to copy into source tree.
- (If none given, leave config files alone in source tree.)
+CONFIGSRC=path Dir with config.yml file containing PostgreSQL section for use by tests. (required)
services/api_test="TEST=test/functional/arvados/v1/collections_controller_test.rb"
Restrict apiserver tests to the given file
sdk/python_test="--test-suite tests.test_keep_locator"
[[ -n "${skip[sanity]}" ]] && return 0
( [[ -n "$WORKSPACE" ]] && [[ -d "$WORKSPACE/services" ]] ) \
|| fatal "WORKSPACE environment variable not set to a source directory (see: $0 --help)"
+ ( [[ -n "$CONFIGSRC" ]] && [[ -s "$CONFIGSRC/config.yml" ]] ) \
+ || fatal "CONFIGSRC environment variable not set to a config file (see: $0 --help)"
echo Checking dependencies:
echo "locale: ${LANG}"
[[ "$(locale charmap)" = "UTF-8" ]] \
echo "WORKSPACE=$WORKSPACE"
- if [[ -z "$CONFIGSRC" ]] && [[ -d "$HOME/arvados-api-server" ]]; then
- # Jenkins expects us to use this by default.
- CONFIGSRC="$HOME/arvados-api-server"
- fi
-
# Clean up .pyc files that may exist in the workspace
cd "$WORKSPACE"
find -name '*.pyc' -delete
keep_web_dl_port = find_available_port()
keep_web_dl_external_port = find_available_port()
- if "CONFIGSRC" in os.environ:
- dbconf = os.path.join(os.environ["CONFIGSRC"], "config.yml")
- else:
- dbconf = "/etc/arvados/config.yml"
+ dbconf = os.path.join(os.environ["CONFIGSRC"], "config.yml")
print("Getting config from %s" % dbconf, file=sys.stderr)
- pgconnection = list(yaml.safe_load(open(dbconf))["Clusters"].values())[0]["PostgreSQL"]["Connection"]
-
- if "test" not in pgconnection["dbname"]:
- pgconnection["dbname"] = "arvados_test"
+ pgconnection = yaml.safe_load(open(dbconf))["Clusters"]["zzzzz"]["PostgreSQL"]["Connection"]
localhost = "127.0.0.1"
services = {
"RailsAPI": {
- "InternalURLs": { }
+ "InternalURLs": {
+ "https://%s:%s"%(localhost, rails_api_port): {}
+ }
},
"Controller": {
"ExternalURL": "https://%s:%s" % (localhost, controller_external_port),
- "InternalURLs": { }
+ "InternalURLs": {
+ "http://%s:%s"%(localhost, controller_port): {}
+ }
},
"Websocket": {
"ExternalURL": "wss://%s:%s/websocket" % (localhost, websocket_external_port),
- "InternalURLs": { }
+ "InternalURLs": {
+ "http://%s:%s"%(localhost, websocket_port): {}
+ }
},
"GitHTTP": {
"ExternalURL": "https://%s:%s" % (localhost, git_httpd_external_port),
- "InternalURLs": { }
+ "InternalURLs": {
+ "http://%s:%s"%(localhost, git_httpd_port): {}
+ }
},
"Keepproxy": {
"ExternalURL": "https://%s:%s" % (localhost, keepproxy_external_port),
- "InternalURLs": { }
+ "InternalURLs": {
+ "http://%s:%s"%(localhost, keepproxy_port): {}
+ }
},
"WebDAV": {
"ExternalURL": "https://%s:%s" % (localhost, keep_web_external_port),
- "InternalURLs": { }
+ "InternalURLs": {
+ "http://%s:%s"%(localhost, keep_web_port): {}
+ }
},
"WebDAVDownload": {
"ExternalURL": "https://%s:%s" % (localhost, keep_web_dl_external_port),
- "InternalURLs": { }
+ "InternalURLs": {
+ "http://%s:%s"%(localhost, keep_web_dl_port): {}
+ }
}
}
- services["RailsAPI"]["InternalURLs"]["https://%s:%s"%(localhost, rails_api_port)] = {}
- services["Controller"]["InternalURLs"]["http://%s:%s"%(localhost, controller_port)] = {}
- services["Websocket"]["InternalURLs"]["http://%s:%s"%(localhost, websocket_port)] = {}
- services["GitHTTP"]["InternalURLs"]["http://%s:%s"%(localhost, git_httpd_port)] = {}
- services["Keepproxy"]["InternalURLs"]["http://%s:%s"%(localhost, keepproxy_port)] = {}
- services["WebDAV"]["InternalURLs"]["http://%s:%s"%(localhost, keep_web_port)] = {}
- services["WebDAVDownload"]["InternalURLs"]["http://%s:%s"%(localhost, keep_web_dl_port)] = {}
config = {
"Clusters": {
yaml.safe_dump(config, f)
ex = "export ARVADOS_CONFIG="+conf
- print(ex, file=sys.stderr)
print(ex)