14198: Federation feature and testing
[arvados.git] / sdk / cwl / tests / federation / framework / check_exist.py
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 import arvados
6 import json
7
8 api = arvados.api()
9
10 with open("config.json") as f:
11     config = json.load(f)
12
13 success = True
14 for c in config["check_collections"]:
15     try:
16         api.collections().get(uuid=c).execute()
17     except Exception as e:
18         print("Checking for %s got exception %s" % (c, e))
19         success = False
20
21 with open("success", "w") as f:
22     if success:
23         f.write("true")
24     else:
25         f.write("false")