tests.test_filesystem ===================== .. py:module:: tests.test_filesystem Attributes ---------- .. autoapisummary:: tests.test_filesystem.CURR_DIR Classes ------- .. autoapisummary:: tests.test_filesystem.BaseTestFileSystem tests.test_filesystem.TestFileSystemBasic tests.test_filesystem.TestFileSystemWpsOutputsUser Module Contents --------------- .. py:data:: CURR_DIR .. py:class:: BaseTestFileSystem(methodName='runTest') Bases: :py:obj:`tests.utils.TestConfig`, :py:obj:`unittest.TestCase` Base test FileSystem parent class, containing some utility functions and common setup/teardown operations. Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name. .. py:method:: setUpClass() :classmethod: Hook method for setting up class fixture before running tests in the class. .. py:method:: tearDownClass() :classmethod: Hook method for deconstructing the class fixture after running all tests in the class. .. py:method:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: tearDown() Hook method for deconstructing the test fixture after testing it. .. py:method:: get_test_app(cfg_data: cowbird.typedefs.JSON) -> webtest.app.TestApp .. py:method:: check_created_test_cases(output_path, hardlink_path) :staticmethod: Runs multiple test cases, common to the public and user files, for the creation of hardlinks. .. py:class:: TestFileSystemBasic(methodName='runTest') Bases: :py:obj:`BaseTestFileSystem` Test FileSystem generic operations. Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name. .. py:method:: test_manage_user_workspace(mock_head_request) Tests creating and deleting a user workspace. .. py:method:: test_create_user_missing_workspace_dir(mock_head_request) Tests creating a user directory with a missing workspace directory. .. py:method:: test_public_wps_output_created() Tests creating a public wps output file. .. py:method:: test_public_wps_output_deleted() Tests deleting a public wps output path. .. py:method:: test_resync() Tests resync operation for the handler. .. py:method:: test_resync_no_src_wps_outputs() Tests the resync operation when the source WPS outputs folder does not exist. .. py:class:: TestFileSystemWpsOutputsUser(methodName='runTest') Bases: :py:obj:`BaseTestFileSystem` FileSystem tests specific to the user wps outputs data. These tests can include verifications on the different path permissions. Note that ``others`` permissions are used instead of the ``user``/``group`` permissions, to manage the user's data access. See :ref:`Components - Usage of 'others' permissions ` for more details on the usage of ``others`` permissions. .. seealso:: - :func:`cowbird.utils.update_filesystem_permissions` Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name. .. py:method:: setUp() Hook method for setting up the test fixture before exercising it. .. py:method:: create_secure_data_proxy_service() Generates a new secure-data-proxy service in Magpie app. .. py:method:: check_path_perms_and_hardlink(src_path: str, hardlink_path: str, perms: int) :staticmethod: Checks if a path has the expected permissions, and if a hardlink exists, according to the `other` permissions. .. py:method:: test_user_wps_output_created() Tests creating wps outputs for a user. .. py:method:: test_user_created() Tests if creating a user generates the hardlinks to the pre-existing user WPS outputs data. .. py:method:: test_user_wps_output_created_secure_data_proxy() Tests creating wps outputs for a user when Magpie uses a secure-data-proxy service to manage access permissions to the wps output data. .. py:method:: test_user_wps_output_deleted() Tests deleting wps outputs for a user. .. py:method:: test_resync() Tests resync operation on WPS outputs user data. .. py:method:: test_permission_updates_user_data() Tests updating permissions on data found directly in a specific user directory. .. py:method:: test_permission_updates_wps_outputs_data() Tests updating permissions on data found outside of the user directories, including testing permissions on a user and on a group. .. py:method:: test_permission_updates_other_svc() Tests permission updates on a WPS outputs resource from a service other than the secure-data-proxy, which should not be processed by the filesystem handler.