|
|
@@ -203,15 +203,25 @@ class RazClientTest(unittest.TestCase):
|
|
|
assert_equal(response['access_type'], 'get-status')
|
|
|
assert_equal(response['relative_path'], '/user/csso_hueuser')
|
|
|
|
|
|
- # Create file
|
|
|
- method = 'PUT'
|
|
|
- relative_path = '/user/csso_hueuser/customers.csv'
|
|
|
- url_params = {'resource': 'file'}
|
|
|
+ # Delete path
|
|
|
+ method = 'DELETE'
|
|
|
+ relative_path = '/user/csso_hueuser/test_dir/customer.csv'
|
|
|
+ url_params = {}
|
|
|
|
|
|
response = client.handle_adls_req_mapping(method, url_params, relative_path)
|
|
|
|
|
|
- assert_equal(response['access_type'], 'create-file')
|
|
|
- assert_equal(response['relative_path'], '/user/csso_hueuser/customers.csv')
|
|
|
+ assert_equal(response['access_type'], 'delete')
|
|
|
+ assert_equal(response['relative_path'], '/user/csso_hueuser/test_dir/customer.csv')
|
|
|
+
|
|
|
+ # Delete with recursive as true
|
|
|
+ method = 'DELETE'
|
|
|
+ relative_path = '/user/csso_hueuser/test_dir'
|
|
|
+ url_params = {'recursive': 'true'}
|
|
|
+
|
|
|
+ response = client.handle_adls_req_mapping(method, url_params, relative_path)
|
|
|
+
|
|
|
+ assert_equal(response['access_type'], 'delete-recursive')
|
|
|
+ assert_equal(response['relative_path'], '/user/csso_hueuser/test_dir')
|
|
|
|
|
|
# Create directory
|
|
|
method = 'PUT'
|
|
|
@@ -223,25 +233,35 @@ class RazClientTest(unittest.TestCase):
|
|
|
assert_equal(response['access_type'], 'create-directory')
|
|
|
assert_equal(response['relative_path'], '/user/csso_hueuser/test_dir')
|
|
|
|
|
|
- # Delete path
|
|
|
- method = 'DELETE'
|
|
|
- relative_path = '/user/csso_hueuser/test_dir/customer.csv'
|
|
|
- url_params = {}
|
|
|
+ # Create file
|
|
|
+ method = 'PUT'
|
|
|
+ relative_path = '/user/csso_hueuser/customers.csv'
|
|
|
+ url_params = {'resource': 'file'}
|
|
|
|
|
|
response = client.handle_adls_req_mapping(method, url_params, relative_path)
|
|
|
|
|
|
- assert_equal(response['access_type'], 'delete')
|
|
|
- assert_equal(response['relative_path'], '/user/csso_hueuser/test_dir/customer.csv')
|
|
|
+ assert_equal(response['access_type'], 'create-file')
|
|
|
+ assert_equal(response['relative_path'], '/user/csso_hueuser/customers.csv')
|
|
|
|
|
|
- # Delete with recursive as true
|
|
|
- method = 'DELETE'
|
|
|
- relative_path = '/user/csso_hueuser/test_dir'
|
|
|
- url_params = {'recursive': 'true'}
|
|
|
+ # Append
|
|
|
+ method = 'PATCH'
|
|
|
+ relative_path = '/user/csso_hueuser/customers.csv'
|
|
|
+ url_params = {'action': 'append'}
|
|
|
|
|
|
response = client.handle_adls_req_mapping(method, url_params, relative_path)
|
|
|
|
|
|
- assert_equal(response['access_type'], 'delete-recursive')
|
|
|
- assert_equal(response['relative_path'], '/user/csso_hueuser/test_dir')
|
|
|
+ assert_equal(response['access_type'], 'write')
|
|
|
+ assert_equal(response['relative_path'], '/user/csso_hueuser/customers.csv')
|
|
|
+
|
|
|
+ # Flush
|
|
|
+ method = 'PATCH'
|
|
|
+ relative_path = '/user/csso_hueuser/customers.csv'
|
|
|
+ url_params = {'action': 'flush'}
|
|
|
+
|
|
|
+ response = client.handle_adls_req_mapping(method, url_params, relative_path)
|
|
|
+
|
|
|
+ assert_equal(response['access_type'], 'write')
|
|
|
+ assert_equal(response['relative_path'], '/user/csso_hueuser/customers.csv')
|
|
|
|
|
|
|
|
|
def test_get_raz_client_s3(self):
|