From d7d291b8276c0723a3c85d322de51480c7c3a93d Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 14 Dec 2015 14:11:33 -0500 Subject: [PATCH] 7939: Additional check for bad token. --- services/fuse/tests/test_command_args.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/fuse/tests/test_command_args.py b/services/fuse/tests/test_command_args.py index 1897e8e7aa..2eb73b5a7a 100644 --- a/services/fuse/tests/test_command_args.py +++ b/services/fuse/tests/test_command_args.py @@ -224,6 +224,13 @@ class MountErrorTest(unittest.TestCase): arvados_fuse.command.Mount(args, logger=self.logger).run() self.assertEqual(1, ex.exception.code) + def test_bogus_token(self): + arvados.config._settings["ARVADOS_API_TOKEN"] = "zzzzzzzzzzzzz" + with self.assertRaises(SystemExit) as ex: + args = arvados_fuse.command.ArgumentParser().parse_args([self.mntdir]) + arvados_fuse.command.Mount(args, logger=self.logger).run() + self.assertEqual(1, ex.exception.code) + def test_bogus_mount_dir(self): # All FUSE errors in llfuse.init() are raised as RuntimeError # An easy error to trigger is to supply a nonexistent mount point, -- 2.30.2