Run the CephFS test cases. Run everything in tasks/cephfs/test_*.py: :: tasks: - install: - ceph: - ceph-fuse: - cephfs_test_runner: `modules` argument allows running only some specific modules: :: tasks:
(ctx, config)
| 84 | |
| 85 | @contextlib.contextmanager |
| 86 | def task(ctx, config): |
| 87 | """ |
| 88 | Run the CephFS test cases. |
| 89 | |
| 90 | Run everything in tasks/cephfs/test_*.py: |
| 91 | |
| 92 | :: |
| 93 | |
| 94 | tasks: |
| 95 | - install: |
| 96 | - ceph: |
| 97 | - ceph-fuse: |
| 98 | - cephfs_test_runner: |
| 99 | |
| 100 | `modules` argument allows running only some specific modules: |
| 101 | |
| 102 | :: |
| 103 | |
| 104 | tasks: |
| 105 | ... |
| 106 | - cephfs_test_runner: |
| 107 | modules: |
| 108 | - tasks.cephfs.test_sessionmap |
| 109 | - tasks.cephfs.test_auto_repair |
| 110 | |
| 111 | By default, any cases that can't be run on the current cluster configuration |
| 112 | will generate a failure. When the optional `fail_on_skip` argument is set |
| 113 | to false, any tests that can't be run on the current configuration will |
| 114 | simply be skipped: |
| 115 | |
| 116 | :: |
| 117 | tasks: |
| 118 | ... |
| 119 | - cephfs_test_runner: |
| 120 | fail_on_skip: false |
| 121 | |
| 122 | """ |
| 123 | |
| 124 | ceph_cluster = CephCluster(ctx) |
| 125 | |
| 126 | if len(list(misc.all_roles_of_type(ctx.cluster, 'mds'))): |
| 127 | mds_cluster = MDSCluster(ctx) |
| 128 | fs = Filesystem(ctx) |
| 129 | else: |
| 130 | mds_cluster = None |
| 131 | fs = None |
| 132 | |
| 133 | if len(list(misc.all_roles_of_type(ctx.cluster, 'mgr'))): |
| 134 | mgr_cluster = MgrCluster(ctx) |
| 135 | else: |
| 136 | mgr_cluster = None |
| 137 | |
| 138 | # Mount objects, sorted by ID |
| 139 | if hasattr(ctx, 'mounts'): |
| 140 | mounts = [v for k, v in sorted(ctx.mounts.items(), key=lambda mount: mount[0])] |
| 141 | else: |
| 142 | # The test configuration has a filesystem but no fuse/kclient mounts |
| 143 | mounts = [] |
nothing calls this directly
no test coverage detected