subprocess.call(['bundle', 'exec', 'rails', 'server', '-d',
'--pid',
os.path.join(os.getcwd(), SERVER_PID_PATH),
- '-p3001'])
- os.environ["ARVADOS_API_HOST"] = "127.0.0.1:3001"
+ '-p3000'])
+ os.environ["ARVADOS_API_HOST"] = "127.0.0.1:3000"
pid = find_server_pid(SERVER_PID_PATH)
_start_keep(0, keep_args)
_start_keep(1, keep_args)
- os.environ["ARVADOS_API_HOST"] = "127.0.0.1:3001"
+ os.environ["ARVADOS_API_HOST"] = "127.0.0.1:3000"
os.environ["ARVADOS_API_HOST_INSECURE"] = "true"
authorize_with("admin")
if not os.path.exists(TEST_TMPDIR):
os.mkdir(TEST_TMPDIR)
- os.environ["ARVADOS_API_HOST"] = "127.0.0.1:3001"
+ os.environ["ARVADOS_API_HOST"] = "127.0.0.1:3000"
os.environ["ARVADOS_API_HOST_INSECURE"] = "true"
os.environ["ARVADOS_API_TOKEN"] = fixture("api_client_authorizations")[auth]["api_token"]
'''load a fixture yaml file'''
with open(os.path.join(SERVICES_SRC_DIR, 'api', "test", "fixtures",
fix + ".yml")) as f:
- return yaml.load(f.read())
+ yaml_file = f.read()
+ try:
+ trim_index = yaml_file.index("# Test Helper trims the rest of the file")
+ yaml_file = yaml_file[0:trim_index]
+ except ValueError:
+ pass
+ return yaml.load(yaml_file)
def authorize_with(token):
'''token is the symbolic name of the token from the api_client_authorizations fixture'''