diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Add-Fastly-account-returns-CREATED-response.json b/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Add-Fastly-account-returns-CREATED-response.json deleted file mode 100644 index 0affacb28..000000000 --- a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Add-Fastly-account-returns-CREATED-response.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "http_interactions": [ - { - "recorded_at": "Thu, 19 Jan 2023 15:15:56 GMT", - "request": { - "body": { - "encoding": null, - "string": "{\"data\":{\"attributes\":{\"api_key\":\"TestAddFastlyaccountreturnsCREATEDresponse1674141356\",\"name\":\"Test-Add_Fastly_account_returns_CREATED_response-1674141356\",\"services\":[]},\"type\":\"fastly-accounts\"}}" - }, - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json" - ] - }, - "method": "post", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts" - }, - "response": { - "body": { - "encoding": null, - "string": "{\"data\":{\"attributes\":{\"services\":[],\"name\":\"Test-Add_Fastly_account_returns_CREATED_response-1674141356\"},\"type\":\"fastly-accounts\",\"id\":\"0427b05b6f56f454ca1477aa8df5e75d\"}}\n" - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "status": { - "code": 201, - "message": "Created" - } - } - }, - { - "recorded_at": "Thu, 19 Jan 2023 15:15:56 GMT", - "request": { - "body": "", - "headers": { - "Accept": [ - "*/*" - ] - }, - "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/0427b05b6f56f454ca1477aa8df5e75d" - }, - "response": { - "body": { - "encoding": null, - "string": "" - }, - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "status": { - "code": 204, - "message": "No Content" - } - } - } - ], - "recorded_with": "VCR 6.0.0" -} diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Get-Fastly-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Get-Fastly-account-returns-OK-response.json deleted file mode 100644 index d3c4aaef2..000000000 --- a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Get-Fastly-account-returns-OK-response.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "http_interactions": [ - { - "recorded_at": "Mon, 13 Mar 2023 10:11:14 GMT", - "request": { - "body": { - "encoding": null, - "string": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetFastlyaccountreturnsOKresponse1678702274\",\"name\":\"Test-Get_Fastly_account_returns_OK_response-1678702274\",\"services\":[]},\"type\":\"fastly-accounts\"}}" - }, - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json" - ] - }, - "method": "post", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts" - }, - "response": { - "body": { - "encoding": null, - "string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"6d8f2860f9f3e953fb46d554b9a19627\",\"attributes\":{\"services\":[],\"name\":\"Test-Get_Fastly_account_returns_OK_response-1678702274\"}}}\n" - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "status": { - "code": 201, - "message": "Created" - } - } - }, - { - "recorded_at": "Mon, 13 Mar 2023 10:11:14 GMT", - "request": { - "body": "", - "headers": { - "Accept": [ - "application/json" - ] - }, - "method": "get", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/6d8f2860f9f3e953fb46d554b9a19627" - }, - "response": { - "body": { - "encoding": null, - "string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"6d8f2860f9f3e953fb46d554b9a19627\",\"attributes\":{\"name\":\"Test-Get_Fastly_account_returns_OK_response-1678702274\",\"services\":[]}}}\n" - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "status": { - "code": 200, - "message": "OK" - } - } - }, - { - "recorded_at": "Mon, 13 Mar 2023 10:11:14 GMT", - "request": { - "body": "", - "headers": { - "Accept": [ - "*/*" - ] - }, - "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/6d8f2860f9f3e953fb46d554b9a19627" - }, - "response": { - "body": { - "encoding": null, - "string": "" - }, - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "status": { - "code": 204, - "message": "No Content" - } - } - } - ], - "recorded_with": "VCR 6.0.0" -} diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/List-Fastly-accounts-returns-OK-response.json b/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/List-Fastly-accounts-returns-OK-response.json deleted file mode 100644 index 622732efb..000000000 --- a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/List-Fastly-accounts-returns-OK-response.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "http_interactions": [ - { - "recorded_at": "Mon, 13 Mar 2023 10:10:50 GMT", - "request": { - "body": { - "encoding": null, - "string": "{\"data\":{\"attributes\":{\"api_key\":\"TestListFastlyaccountsreturnsOKresponse1678702250\",\"name\":\"Test-List_Fastly_accounts_returns_OK_response-1678702250\",\"services\":[]},\"type\":\"fastly-accounts\"}}" - }, - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json" - ] - }, - "method": "post", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts" - }, - "response": { - "body": { - "encoding": null, - "string": "{\"data\":{\"type\":\"fastly-accounts\",\"attributes\":{\"name\":\"Test-List_Fastly_accounts_returns_OK_response-1678702250\",\"services\":[]},\"id\":\"07ec97dd43cd794c847ecf15cb25eb1c\"}}\n" - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "status": { - "code": 201, - "message": "Created" - } - } - }, - { - "recorded_at": "Mon, 13 Mar 2023 10:10:50 GMT", - "request": { - "body": "", - "headers": { - "Accept": [ - "application/json" - ] - }, - "method": "get", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts" - }, - "response": { - "body": { - "encoding": null, - "string": "{\"data\":[{\"type\":\"fastly-accounts\",\"attributes\":{\"name\":\"Test-List_Fastly_accounts_returns_OK_response-1678702250\",\"services\":[]},\"id\":\"07ec97dd43cd794c847ecf15cb25eb1c\"}]}\n" - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "status": { - "code": 200, - "message": "OK" - } - } - }, - { - "recorded_at": "Mon, 13 Mar 2023 10:10:50 GMT", - "request": { - "body": "", - "headers": { - "Accept": [ - "*/*" - ] - }, - "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/07ec97dd43cd794c847ecf15cb25eb1c" - }, - "response": { - "body": { - "encoding": null, - "string": "" - }, - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "status": { - "code": 204, - "message": "No Content" - } - } - } - ], - "recorded_with": "VCR 6.0.0" -} diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Update-Fastly-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Update-Fastly-account-returns-OK-response.json deleted file mode 100644 index 74a2bd6f1..000000000 --- a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Update-Fastly-account-returns-OK-response.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "http_interactions": [ - { - "recorded_at": "Mon, 13 Mar 2023 10:10:17 GMT", - "request": { - "body": { - "encoding": null, - "string": "{\"data\":{\"attributes\":{\"api_key\":\"TestUpdateFastlyaccountreturnsOKresponse1678702217\",\"name\":\"Test-Update_Fastly_account_returns_OK_response-1678702217\",\"services\":[]},\"type\":\"fastly-accounts\"}}" - }, - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json" - ] - }, - "method": "post", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts" - }, - "response": { - "body": { - "encoding": null, - "string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"e37e834ae856fa24a2924973fdc7c276\",\"attributes\":{\"services\":[],\"name\":\"Test-Update_Fastly_account_returns_OK_response-1678702217\"}}}\n" - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "status": { - "code": 201, - "message": "Created" - } - } - }, - { - "recorded_at": "Mon, 13 Mar 2023 10:10:17 GMT", - "request": { - "body": { - "encoding": null, - "string": "{\"data\":{\"attributes\":{\"api_key\":\"update-secret\"},\"type\":\"fastly-accounts\"}}" - }, - "headers": { - "Accept": [ - "application/json" - ], - "Content-Type": [ - "application/json" - ] - }, - "method": "patch", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/e37e834ae856fa24a2924973fdc7c276" - }, - "response": { - "body": { - "encoding": null, - "string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"e37e834ae856fa24a2924973fdc7c276\",\"attributes\":{\"services\":[],\"name\":\"Test-Update_Fastly_account_returns_OK_response-1678702217\"}}}\n" - }, - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "status": { - "code": 200, - "message": "OK" - } - } - }, - { - "recorded_at": "Mon, 13 Mar 2023 10:10:17 GMT", - "request": { - "body": "", - "headers": { - "Accept": [ - "*/*" - ] - }, - "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/e37e834ae856fa24a2924973fdc7c276" - }, - "response": { - "body": { - "encoding": null, - "string": "" - }, - "headers": { - "Content-Type": [ - "text/html; charset=utf-8" - ] - }, - "status": { - "code": 204, - "message": "No Content" - } - } - } - ], - "recorded_with": "VCR 6.0.0" -} diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Add-Fastly-account-returns-CREATED-response.frozen b/tests/scenarios/cassettes/v2/fastly_integration/Add-Fastly-account-returns-CREATED-response.frozen similarity index 100% rename from tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Add-Fastly-account-returns-CREATED-response.frozen rename to tests/scenarios/cassettes/v2/fastly_integration/Add-Fastly-account-returns-CREATED-response.frozen diff --git a/tests/scenarios/cassettes/v2/fastly_integration/Add-Fastly-account-returns-CREATED-response.json b/tests/scenarios/cassettes/v2/fastly_integration/Add-Fastly-account-returns-CREATED-response.json new file mode 100644 index 000000000..fa365e20b --- /dev/null +++ b/tests/scenarios/cassettes/v2/fastly_integration/Add-Fastly-account-returns-CREATED-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"api_key\":\"TestAddFastlyaccountreturnsCREATEDresponse1674141356\",\"name\":\"Test-Add_Fastly_account_returns_CREATED_response-1674141356\",\"services\":[]},\"type\":\"fastly-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts"}, "response": {"body": {"string": "{\"data\":{\"attributes\":{\"services\":[],\"name\":\"Test-Add_Fastly_account_returns_CREATED_response-1674141356\"},\"type\":\"fastly-accounts\",\"id\":\"0427b05b6f56f454ca1477aa8df5e75d\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 19 Jan 2023 15:15:56 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/0427b05b6f56f454ca1477aa8df5e75d"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 19 Jan 2023 15:15:56 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Get-Fastly-account-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/fastly_integration/Get-Fastly-account-returns-OK-response.frozen similarity index 100% rename from tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Get-Fastly-account-returns-OK-response.frozen rename to tests/scenarios/cassettes/v2/fastly_integration/Get-Fastly-account-returns-OK-response.frozen diff --git a/tests/scenarios/cassettes/v2/fastly_integration/Get-Fastly-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/fastly_integration/Get-Fastly-account-returns-OK-response.json new file mode 100644 index 000000000..1af728d7a --- /dev/null +++ b/tests/scenarios/cassettes/v2/fastly_integration/Get-Fastly-account-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetFastlyaccountreturnsOKresponse1678702274\",\"name\":\"Test-Get_Fastly_account_returns_OK_response-1678702274\",\"services\":[]},\"type\":\"fastly-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"6d8f2860f9f3e953fb46d554b9a19627\",\"attributes\":{\"services\":[],\"name\":\"Test-Get_Fastly_account_returns_OK_response-1678702274\"}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 13 Mar 2023 10:11:14 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/6d8f2860f9f3e953fb46d554b9a19627"}, "response": {"body": {"string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"6d8f2860f9f3e953fb46d554b9a19627\",\"attributes\":{\"name\":\"Test-Get_Fastly_account_returns_OK_response-1678702274\",\"services\":[]}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 13 Mar 2023 10:11:14 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/6d8f2860f9f3e953fb46d554b9a19627"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 13 Mar 2023 10:11:14 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/List-Fastly-accounts-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/fastly_integration/List-Fastly-accounts-returns-OK-response.frozen similarity index 100% rename from tests/scenarios/cassettes/v2/Feature_Fastly_Integration/List-Fastly-accounts-returns-OK-response.frozen rename to tests/scenarios/cassettes/v2/fastly_integration/List-Fastly-accounts-returns-OK-response.frozen diff --git a/tests/scenarios/cassettes/v2/fastly_integration/List-Fastly-accounts-returns-OK-response.json b/tests/scenarios/cassettes/v2/fastly_integration/List-Fastly-accounts-returns-OK-response.json new file mode 100644 index 000000000..e322e188a --- /dev/null +++ b/tests/scenarios/cassettes/v2/fastly_integration/List-Fastly-accounts-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"api_key\":\"TestListFastlyaccountsreturnsOKresponse1678702250\",\"name\":\"Test-List_Fastly_accounts_returns_OK_response-1678702250\",\"services\":[]},\"type\":\"fastly-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"fastly-accounts\",\"attributes\":{\"name\":\"Test-List_Fastly_accounts_returns_OK_response-1678702250\",\"services\":[]},\"id\":\"07ec97dd43cd794c847ecf15cb25eb1c\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 13 Mar 2023 10:10:50 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"fastly-accounts\",\"attributes\":{\"name\":\"Test-List_Fastly_accounts_returns_OK_response-1678702250\",\"services\":[]},\"id\":\"07ec97dd43cd794c847ecf15cb25eb1c\"}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 13 Mar 2023 10:10:50 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/07ec97dd43cd794c847ecf15cb25eb1c"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 13 Mar 2023 10:10:50 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Update-Fastly-account-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/fastly_integration/Update-Fastly-account-returns-OK-response.frozen similarity index 100% rename from tests/scenarios/cassettes/v2/Feature_Fastly_Integration/Update-Fastly-account-returns-OK-response.frozen rename to tests/scenarios/cassettes/v2/fastly_integration/Update-Fastly-account-returns-OK-response.frozen diff --git a/tests/scenarios/cassettes/v2/fastly_integration/Update-Fastly-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/fastly_integration/Update-Fastly-account-returns-OK-response.json new file mode 100644 index 000000000..f7b1c27d3 --- /dev/null +++ b/tests/scenarios/cassettes/v2/fastly_integration/Update-Fastly-account-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"api_key\":\"TestUpdateFastlyaccountreturnsOKresponse1678702217\",\"name\":\"Test-Update_Fastly_account_returns_OK_response-1678702217\",\"services\":[]},\"type\":\"fastly-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"e37e834ae856fa24a2924973fdc7c276\",\"attributes\":{\"services\":[],\"name\":\"Test-Update_Fastly_account_returns_OK_response-1678702217\"}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 13 Mar 2023 10:10:17 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"api_key\":\"update-secret\"},\"type\":\"fastly-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/e37e834ae856fa24a2924973fdc7c276"}, "response": {"body": {"string": "{\"data\":{\"type\":\"fastly-accounts\",\"id\":\"e37e834ae856fa24a2924973fdc7c276\",\"attributes\":{\"services\":[],\"name\":\"Test-Update_Fastly_account_returns_OK_response-1678702217\"}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 13 Mar 2023 10:10:17 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/fastly/accounts/e37e834ae856fa24a2924973fdc7c276"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 13 Mar 2023 10:10:17 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/fixtures.rs b/tests/scenarios/fixtures.rs index a0ecc03cb..fd7869500 100644 --- a/tests/scenarios/fixtures.rs +++ b/tests/scenarios/fixtures.rs @@ -81,9 +81,9 @@ pub async fn before_scenario(feature: &Feature, _rule: Option<&Rule>, scenario: let mut prefix = "Test".to_string(); let mut cassette_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); cassette_dir.push(format!( - "tests/scenarios/cassettes/v{}/Feature_{}", + "tests/scenarios/cassettes/v{}/{}", world.api_version, - feature.name.replace(' ', "_") + feature.name.replace(' ', "_").to_lowercase() )); create_dir_all(&cassette_dir).expect("failed to create cassette directory"); let mut cassette = cassette_dir.clone();