|
22 | 22 | from webapp import models, topology, vos_data |
23 | 23 | from webapp.common import load_yaml_file, NamespacesFilters |
24 | 24 | from webapp.data_federation import CredentialGeneration, StashCache |
| 25 | +import webapp.exceptions |
25 | 26 | import stashcache |
26 | 27 |
|
27 | 28 | HOST_PORT_RE = re.compile(r"[a-zA-Z0-9.-]{3,63}:[0-9]{2,5}") |
@@ -132,7 +133,13 @@ def test_allowedVO_includes_LIGO_for_ligo_inclusion(self, |
132 | 133 | def test_allowedVO_excludes_LIGO_and_ANY_for_ligo_inclusion(self, client: flask.Flask, mocker: MockerFixture): |
133 | 134 | spy = mocker.spy(global_data, "get_ligo_dn_list") |
134 | 135 |
|
135 | | - stashcache.generate_cache_authfile(global_data, "rds-cache.sdsc.edu") |
| 136 | + try: |
| 137 | + stashcache.generate_cache_authfile(global_data, "rds-cache.sdsc.edu") |
| 138 | + except webapp.exceptions.DataError as err: |
| 139 | + if "Cache does not support any namespaces" in str(err): |
| 140 | + pass |
| 141 | + else: |
| 142 | + raise |
136 | 143 |
|
137 | 144 | assert spy.call_count == 0 |
138 | 145 |
|
@@ -321,7 +328,7 @@ def validate_namespace_schema(ns): |
321 | 328 |
|
322 | 329 | def test_namespaces(self, namespaces): |
323 | 330 | # Have a reasonable number of namespaces |
324 | | - assert len(namespaces) > 15 |
| 331 | + assert len(namespaces) > 5 |
325 | 332 |
|
326 | 333 | found_credgen = False |
327 | 334 | for namespace in namespaces: |
|
0 commit comments