Skip to content

Commit

Permalink
fix travis errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey committed Aug 2, 2018
1 parent 3cd8246 commit 236cd2e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,19 @@ def test_auth(self):
for k in acl_keys:
self.assertEqual(file_acl[k], True)

# Should always be able to get default acl
default_acl = f.getACL("default")
# for h5serv a default acl should be available
# hsds does not create one initially
try:
default_acl = f.getACL("default")
except IOError as ioe:
if ioe.errno == 404:
# create public-read ACL
default_acl = {}
for key in acl_keys:
if key == "read":
default_acl[key] = True
else:
default_acl[key] = False
for k in acl_keys:
if k == "read" or not is_hsds:
self.assertEqual(default_acl[k], True)
Expand Down

0 comments on commit 236cd2e

Please sign in to comment.