Skip to content

Commit f5c1621

Browse files
committed
Tweak tests failing due to data removal:
Assert that rds-cache.sdsc.edu no longer supports any namespaces Expect a lot fewer namespaces
1 parent 876ebd9 commit f5c1621

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/tests/test_stashcache.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from webapp import models, topology, vos_data
2323
from webapp.common import load_yaml_file, NamespacesFilters
2424
from webapp.data_federation import CredentialGeneration, StashCache
25+
import webapp.exceptions
2526
import stashcache
2627

2728
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,
132133
def test_allowedVO_excludes_LIGO_and_ANY_for_ligo_inclusion(self, client: flask.Flask, mocker: MockerFixture):
133134
spy = mocker.spy(global_data, "get_ligo_dn_list")
134135

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
136143

137144
assert spy.call_count == 0
138145

@@ -321,7 +328,7 @@ def validate_namespace_schema(ns):
321328

322329
def test_namespaces(self, namespaces):
323330
# Have a reasonable number of namespaces
324-
assert len(namespaces) > 15
331+
assert len(namespaces) > 5
325332

326333
found_credgen = False
327334
for namespace in namespaces:

0 commit comments

Comments
 (0)