projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '21055-arvados-server-install-fix'. Closes #21055
[arvados.git]
/
sdk
/
python
/
tests
/
run_test_server.py
diff --git
a/sdk/python/tests/run_test_server.py
b/sdk/python/tests/run_test_server.py
index 2c01b35aeac79b1642b18c7af7d166ef2cffdc3c..eb2784c7145c2701e337e57bd7897e45b711d6f2 100644
(file)
--- a/
sdk/python/tests/run_test_server.py
+++ b/
sdk/python/tests/run_test_server.py
@@
-12,9
+12,9
@@
import errno
import glob
import httplib2
import os
import glob
import httplib2
import os
-import pipes
import random
import re
import random
import re
+import shlex
import shutil
import signal
import socket
import shutil
import signal
import socket
@@
-338,7
+338,7
@@
def run(leave_running_atexit=False):
resdir = subprocess.check_output(['bundle', 'exec', 'passenger-config', 'about', 'resourcesdir']).decode().rstrip()
with open(resdir + '/templates/standalone/config.erb') as f:
template = f.read()
resdir = subprocess.check_output(['bundle', 'exec', 'passenger-config', 'about', 'resourcesdir']).decode().rstrip()
with open(resdir + '/templates/standalone/config.erb') as f:
template = f.read()
- newtemplate = re.sub(
'http
{', 'http {\n passenger_stat_throttle_rate 0;', template)
+ newtemplate = re.sub(
r'http \
{', 'http {\n passenger_stat_throttle_rate 0;', template)
if newtemplate == template:
raise "template edit failed"
with open('tmp/passenger-nginx.conf.erb', 'w') as f:
if newtemplate == template:
raise "template edit failed"
with open('tmp/passenger-nginx.conf.erb', 'w') as f:
@@
-635,7
+635,8
@@
def run_nginx():
return
stop_nginx()
nginxconf = {}
return
stop_nginx()
nginxconf = {}
- nginxconf['LISTENHOST'] = 'localhost'
+ nginxconf['UPSTREAMHOST'] = '127.0.0.1'
+ nginxconf['LISTENHOST'] = '127.0.0.1'
nginxconf['CONTROLLERPORT'] = internal_port_from_config("Controller")
nginxconf['ARVADOS_API_HOST'] = "0.0.0.0:" + str(external_port_from_config("Controller"))
nginxconf['CONTROLLERSSLPORT'] = external_port_from_config("Controller")
nginxconf['CONTROLLERPORT'] = internal_port_from_config("Controller")
nginxconf['ARVADOS_API_HOST'] = "0.0.0.0:" + str(external_port_from_config("Controller"))
nginxconf['CONTROLLERSSLPORT'] = external_port_from_config("Controller")
@@
-659,6
+660,7
@@
def run_nginx():
nginxconf['ACCESSLOG'] = _logfilename('nginx_access')
nginxconf['ERRORLOG'] = _logfilename('nginx_error')
nginxconf['TMPDIR'] = TEST_TMPDIR + '/nginx'
nginxconf['ACCESSLOG'] = _logfilename('nginx_access')
nginxconf['ERRORLOG'] = _logfilename('nginx_error')
nginxconf['TMPDIR'] = TEST_TMPDIR + '/nginx'
+ nginxconf['INTERNALSUBNETS'] = '169.254.0.0/16 0;'
conftemplatefile = os.path.join(MY_DIRNAME, 'nginx.conf')
conffile = os.path.join(TEST_TMPDIR, 'nginx.conf')
conftemplatefile = os.path.join(MY_DIRNAME, 'nginx.conf')
conffile = os.path.join(TEST_TMPDIR, 'nginx.conf')
@@
-790,6
+792,7
@@
def setup_config():
"SystemRootToken": auth_token('system_user'),
"API": {
"RequestTimeout": "30s",
"SystemRootToken": auth_token('system_user'),
"API": {
"RequestTimeout": "30s",
+ "LockBeforeUpdate": True,
},
"Login": {
"Test": {
},
"Login": {
"Test": {
@@
-830,6
+833,10
@@
def setup_config():
"JobsAPI": {
"GitInternalDir": os.path.join(SERVICES_SRC_DIR, 'api', 'tmp', 'internal.git'),
},
"JobsAPI": {
"GitInternalDir": os.path.join(SERVICES_SRC_DIR, 'api', 'tmp', 'internal.git'),
},
+ "LocalKeepBlobBuffersPerVCPU": 0,
+ "Logging": {
+ "SweepInterval": 0, # disable, otherwise test cases can't acquire dblock
+ },
"SupportedDockerImageFormats": {"v1": {}},
"ShellAccess": {
"Admin": True,
"SupportedDockerImageFormats": {"v1": {}},
"ShellAccess": {
"Admin": True,
@@
-923,7
+930,6
@@
class TestCaseWithServers(unittest.TestCase):
cls._orig_config = arvados.config.settings().copy()
cls._cleanup_funcs = []
os.environ.pop('ARVADOS_KEEP_SERVICES', None)
cls._orig_config = arvados.config.settings().copy()
cls._cleanup_funcs = []
os.environ.pop('ARVADOS_KEEP_SERVICES', None)
- os.environ.pop('ARVADOS_EXTERNAL_CLIENT', None)
for server_kwargs, start_func, stop_func in (
(cls.MAIN_SERVER, run, reset),
(cls.WS_SERVER, run_ws, stop_ws),
for server_kwargs, start_func, stop_func in (
(cls.MAIN_SERVER, run, reset),
(cls.WS_SERVER, run_ws, stop_ws),
@@
-983,8
+989,8
@@
if __name__ == "__main__":
host = os.environ['ARVADOS_API_HOST']
if args.auth is not None:
token = auth_token(args.auth)
host = os.environ['ARVADOS_API_HOST']
if args.auth is not None:
token = auth_token(args.auth)
- print("export ARVADOS_API_TOKEN={}".format(
pipes
.quote(token)))
- print("export ARVADOS_API_HOST={}".format(
pipes
.quote(host)))
+ print("export ARVADOS_API_TOKEN={}".format(
shlex
.quote(token)))
+ print("export ARVADOS_API_HOST={}".format(
shlex
.quote(host)))
print("export ARVADOS_API_HOST_INSECURE=true")
else:
print(host)
print("export ARVADOS_API_HOST_INSECURE=true")
else:
print(host)