Merge branch '8784-dir-listings'
[arvados.git] / services / fuse / tests / test_mount_type.py
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 import logging
6 import subprocess
7
8 from .integration_test import IntegrationTest
9
10 logger = logging.getLogger('arvados.arv-mount')
11
12
13 class MountTypeTest(IntegrationTest):
14     @IntegrationTest.mount(argv=["--subtype=arv-mount-test"])
15     def test_mount_type(self):
16         self.pool_test(self.mnt)
17
18     @staticmethod
19     def _test_mount_type(self, mnt):
20         self.assertEqual(["fuse.arv-mount-test"], [
21             toks[4]
22             for toks in [
23                 line.split(' ')
24                 for line in subprocess.check_output("mount").split("\n")
25             ]
26             if len(toks) > 4 and toks[2] == mnt
27         ])