From be96a3c2c86d6dcca3185f27f1d5879c96e90757 Mon Sep 17 00:00:00 2001 From: Eric Schubert Date: Wed, 2 Oct 2024 13:47:02 +0200 Subject: [PATCH] [#57707] added unit test for group users query --- .../nextcloud/group_users_query.rb | 22 +- .../storages/peripherals/registry_spec.rb | 50 -- .../nextcloud/group_users_query_spec.rb | 102 ++++ .../group_users_not_existing_group.yml | 89 ++++ .../nextcloud/group_users_success.yml | 450 ++++++++++++++++++ 5 files changed, 658 insertions(+), 55 deletions(-) create mode 100644 modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/group_users_query_spec.rb create mode 100644 modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_not_existing_group.yml create mode 100644 modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_success.yml diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/group_users_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/group_users_query.rb index 19cf94f9bf39..fa8b9fef8b8f 100644 --- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/group_users_query.rb +++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/group_users_query.rb @@ -60,15 +60,12 @@ def http_options Util.ocs_api_request end - # rubocop:disable Metrics/AbcSize def handle_response(response) error_data = StorageErrorData.new(source: self.class, payload: response) case response in { status: 200..299 } - group_users = Nokogiri::XML(response.body.to_s).xpath("/ocs/data/users/element").map(&:text) - info "#{group_users.size} users found" - ServiceResult.success(result: group_users) + handle_success_response(response) in { status: 405 } Util.error(:not_allowed, "Outbound request method not allowed", error_data) in { status: 401 } @@ -82,7 +79,22 @@ def handle_response(response) end end - # rubocop:enable Metrics/AbcSize + def handle_success_response(response) + error_data = StorageErrorData.new(source: self.class, payload: response) + xml = Nokogiri::XML(response.body.to_s) + statuscode = xml.xpath("/ocs/meta/statuscode").text + + case statuscode + when "100" + group_users = xml.xpath("/ocs/data/users/element").map(&:text) + info "#{group_users.size} users found" + ServiceResult.success(result: group_users) + when "404" + Util.error(:group_does_not_exist, "Group does not exist", error_data) + else + Util.error(:error, "Unknown response body", error_data) + end + end end end end diff --git a/modules/storages/spec/common/storages/peripherals/registry_spec.rb b/modules/storages/spec/common/storages/peripherals/registry_spec.rb index 4130e22f4db7..3e2e5c6e24f9 100644 --- a/modules/storages/spec/common/storages/peripherals/registry_spec.rb +++ b/modules/storages/spec/common/storages/peripherals/registry_spec.rb @@ -56,56 +56,6 @@ end end - describe "#group_users_query" do - let(:expected_response_body) do - <<~XML - - - - ok - 100 - OK - - - - - - admin - OpenProject - reader - TestUser - TestUser34 - - - - XML - end - let(:expected_response) do - { - status: 200, - body: expected_response_body, - headers: {} - } - end - - before do - stub_request(:get, "https://example.com/ocs/v1.php/cloud/groups/#{storage.group}") - .with( - headers: { - "Authorization" => "Basic T3BlblByb2plY3Q6T3BlblByb2plY3RTZWN1cmVQYXNzd29yZA==", - "OCS-APIRequest" => "true" - } - ) - .to_return(expected_response) - end - - it "responds with a strings array with group users" do - result = registry.resolve("nextcloud.queries.group_users").call(storage:) - expect(result).to be_success - expect(result.result).to eq(%w[admin OpenProject reader TestUser TestUser34]) - end - end - describe "#delete_folder_command" do let(:auth_strategy) { Storages::Peripherals::StorageInteraction::AuthenticationStrategies::BasicAuth.strategy } diff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/group_users_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/group_users_query_spec.rb new file mode 100644 index 000000000000..ab395e98327a --- /dev/null +++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/group_users_query_spec.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) the OpenProject GmbH +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See COPYRIGHT and LICENSE files for more details. +#++ + +require "spec_helper" +require_module_spec_helper + +RSpec.describe Storages::Peripherals::StorageInteraction::Nextcloud::GroupUsersQuery, :webmock do + include NextcloudGroupUserHelper + + let(:storage) { create(:nextcloud_storage_with_local_connection, :as_automatically_managed, username: "vcr") } + let(:auth_strategy) { Storages::Peripherals::Registry.resolve("nextcloud.authentication.userless").call } + + describe "basic command setup" do + it "is registered as queries.group_users" do + expect(Storages::Peripherals::Registry + .resolve("#{storage}.queries.group_users")).to eq(described_class) + end + + it "responds to #call with correct parameters" do + expect(described_class).to respond_to(:call) + + method = described_class.method(:call) + expect(method.parameters).to contain_exactly(%i[keyreq storage], + %i[keyreq auth_strategy], + %i[keyreq group]) + end + end + + context "if group exists", vcr: "nextcloud/group_users_success" do + let(:user1) { "m.jade@death.star" } + let(:user2) { "d.vader@death.star" } + let(:user3) { "l.organa@filthy.rebels" } + let(:group) { "Sith Assassins" } + + before do + create_group(auth, storage, group) + add_user_to_group(user1, group) + add_user_to_group(user2, group) + end + + after do + remove_group(auth, storage, group) + end + + it "returns a success" do + result = described_class.call(storage:, auth_strategy:, group:) + expect(result).to be_success + expect(result.result).to include(user1, user2) + expect(result.result).not_to include(user3) + end + end + + context "if group does not exist", vcr: "nextcloud/group_users_not_existing_group" do + let(:user) { "m.jade@death.star" } + let(:group) { "Sith Assassins" } + + it "returns a failure" do + result = described_class.call(storage:, auth_strategy:, group:) + expect(result).to be_failure + + error = result.errors + expect(error.code).to eq(:group_does_not_exist) + expect(error.data.source).to eq(described_class) + end + end + + private + + def auth = Storages::Peripherals::StorageInteraction::Authentication[auth_strategy] + + def add_user_to_group(user, group) + Storages::Peripherals::StorageInteraction::Nextcloud::AddUserToGroupCommand + .call(storage:, auth_strategy:, user:, group:) + end +end diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_not_existing_group.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_not_existing_group.yml new file mode 100644 index 000000000000..6321ce5581db --- /dev/null +++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_not_existing_group.yml @@ -0,0 +1,89 @@ +--- +http_interactions: +- request: + method: get + uri: https://nextcloud.local/ocs/v1.php/cloud/groups/Sith%20Assassins + body: + encoding: US-ASCII + string: '' + headers: + Authorization: + - Basic + Ocs-Apirequest: + - 'true' + User-Agent: + - httpx.rb/1.3.1 + Accept: + - "*/*" + Accept-Encoding: + - gzip, deflate + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none' + Content-Type: + - application/xml; charset=utf-8 + Date: + - Wed, 02 Oct 2024 11:37:31 GMT + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Feature-Policy: + - autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone + 'none';payment 'none' + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - Apache/2.4.59 (Debian) + Set-Cookie: + - oc07ul6b4oaw=da8fba064c5eb040e7f63faa8e827fa2; path=/; secure; HttpOnly; SameSite=Lax, + oc_sessionPassphrase=eykNjTStsb51pc7TuGFtDdmqp%2BHuyJesisxZszV96MQSQJygR3EX%2Fpprct4M1XdwwtAKdrZtc6iRDHIz9WruBbwpn6vYx6qfcz4sCBotcqW6TGlTOz2PJ%2Bx1oZIvso5H; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=da8fba064c5eb040e7f63faa8e827fa2; + path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true; + path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax, + __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, + 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=da8fba064c5eb040e7f63faa8e827fa2; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=da8fba064c5eb040e7f63faa8e827fa2; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=ccf722de75faf24fc171f76ac35e006d; + path=/; secure; HttpOnly; SameSite=Lax, cookie_test=test; expires=Wed, 02 + Oct 2024 12:37:31 GMT; Max-Age=3600 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Powered-By: + - PHP/8.2.21 + X-Request-Id: + - HtGPLtBQkP2zcNT1t7r8 + X-Robots-Tag: + - noindex, nofollow + X-Xss-Protection: + - 1; mode=block + Content-Length: + - '168' + body: + encoding: UTF-8 + string: | + + + + failure + 404 + The requested group could not be found + + + + + + recorded_at: Wed, 02 Oct 2024 11:37:31 GMT +recorded_with: VCR 6.3.1 diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_success.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_success.yml new file mode 100644 index 000000000000..6d4a8c1cb4e1 --- /dev/null +++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/group_users_success.yml @@ -0,0 +1,450 @@ +--- +http_interactions: +- request: + method: post + uri: https://nextcloud.local/ocs/v1.php/cloud/groups + body: + encoding: ASCII-8BIT + string: groupid=Sith+Assassins + headers: + Authorization: + - Basic + Ocs-Apirequest: + - 'true' + User-Agent: + - httpx.rb/1.3.1 + Accept: + - "*/*" + Accept-Encoding: + - gzip, deflate + Content-Type: + - application/x-www-form-urlencoded + Content-Length: + - '22' + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none' + Content-Type: + - application/xml; charset=utf-8 + Date: + - Wed, 02 Oct 2024 11:37:28 GMT + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Feature-Policy: + - autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone + 'none';payment 'none' + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - Apache/2.4.59 (Debian) + Set-Cookie: + - oc07ul6b4oaw=d3d0d217d5bb83669107a7af1768d511; path=/; secure; HttpOnly; SameSite=Lax, + oc_sessionPassphrase=0IfRnDsfWIewXWOxAJNjKVf1kXPyBq5q4RUNFu492ivgcc7LOJf4wvI2IDtzzzj41u5FkvJm%2BtGhGWZ0kVs%2BLO5ZMKzdS2ElCLHZBVMnkvo9UlkXNPAKi9GXGvziT0HA; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=d3d0d217d5bb83669107a7af1768d511; + path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true; + path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax, + __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, + 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=d3d0d217d5bb83669107a7af1768d511; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=d3d0d217d5bb83669107a7af1768d511; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=b739dd17c3e98b74ceb2b819a48d86b8; + path=/; secure; HttpOnly; SameSite=Lax, cookie_test=test; expires=Wed, 02 + Oct 2024 12:37:28 GMT; Max-Age=3600 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Powered-By: + - PHP/8.2.21 + X-Request-Id: + - rQbpRUHcN5tTMCMJKt9b + X-Robots-Tag: + - noindex, nofollow + X-Xss-Protection: + - 1; mode=block + Content-Length: + - '140' + body: + encoding: UTF-8 + string: | + + + + ok + 100 + OK + + + + + + recorded_at: Wed, 02 Oct 2024 11:37:28 GMT +- request: + method: post + uri: https://nextcloud.local/ocs/v1.php/cloud/users/m.jade@death.star/groups + body: + encoding: ASCII-8BIT + string: groupid=Sith+Assassins + headers: + Authorization: + - Basic + Ocs-Apirequest: + - 'true' + User-Agent: + - httpx.rb/1.3.1 + Accept: + - "*/*" + Accept-Encoding: + - gzip, deflate + Content-Type: + - application/x-www-form-urlencoded + Content-Length: + - '22' + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none' + Content-Type: + - application/xml; charset=utf-8 + Date: + - Wed, 02 Oct 2024 11:37:28 GMT + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Feature-Policy: + - autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone + 'none';payment 'none' + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - Apache/2.4.59 (Debian) + Set-Cookie: + - oc07ul6b4oaw=4d3e270b2f7851695595129476d704f3; path=/; secure; HttpOnly; SameSite=Lax, + oc_sessionPassphrase=YbQtouAmLRvUMd104HIjo9%2BXNZFhs9AaP6SRvFdmcaxXfyQ%2FRCEoCfD%2BweWDwvsB14dE7Vsge%2FVumkiCnPD9OXnMH3ysQJ2wYGVWh7VAXkSoTK6DeGaMyvPE%2BDQi3c2j; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=4d3e270b2f7851695595129476d704f3; + path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true; + path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax, + __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, + 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=4d3e270b2f7851695595129476d704f3; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=4d3e270b2f7851695595129476d704f3; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=e8611297116a71fffa4d4d5d5f4f70fd; + path=/; secure; HttpOnly; SameSite=Lax, cookie_test=test; expires=Wed, 02 + Oct 2024 12:37:29 GMT; Max-Age=3600 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Powered-By: + - PHP/8.2.21 + X-Request-Id: + - ptyREbL5R011FSpQjqqG + X-Robots-Tag: + - noindex, nofollow + X-Xss-Protection: + - 1; mode=block + Content-Length: + - '140' + body: + encoding: UTF-8 + string: | + + + + ok + 100 + OK + + + + + + recorded_at: Wed, 02 Oct 2024 11:37:29 GMT +- request: + method: post + uri: https://nextcloud.local/ocs/v1.php/cloud/users/d.vader@death.star/groups + body: + encoding: ASCII-8BIT + string: groupid=Sith+Assassins + headers: + Authorization: + - Basic + Ocs-Apirequest: + - 'true' + User-Agent: + - httpx.rb/1.3.1 + Accept: + - "*/*" + Accept-Encoding: + - gzip, deflate + Content-Type: + - application/x-www-form-urlencoded + Content-Length: + - '22' + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none' + Content-Type: + - application/xml; charset=utf-8 + Date: + - Wed, 02 Oct 2024 11:37:29 GMT + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Feature-Policy: + - autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone + 'none';payment 'none' + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - Apache/2.4.59 (Debian) + Set-Cookie: + - oc07ul6b4oaw=4b7eb4676a39d127db1c931b9fe4752a; path=/; secure; HttpOnly; SameSite=Lax, + oc_sessionPassphrase=eimv6KWlmI9CuNVvyuxk57mkh8L7HrZe1Vkh2QwTg8Rli6x7%2Fnw6hPYmnAHouEyrPnktiKAgpqpWnDq8QsNKzeaPLzyIqDN88Q%2B80llJVYH5XSybe3aPon1L%2FuJZqv9f; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=4b7eb4676a39d127db1c931b9fe4752a; + path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true; + path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax, + __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, + 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=4b7eb4676a39d127db1c931b9fe4752a; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=4b7eb4676a39d127db1c931b9fe4752a; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=4571c00d1196e4a66a2f43d93f73252a; + path=/; secure; HttpOnly; SameSite=Lax, cookie_test=test; expires=Wed, 02 + Oct 2024 12:37:29 GMT; Max-Age=3600 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Powered-By: + - PHP/8.2.21 + X-Request-Id: + - wFSZMQeNwyjGaNVGyDUc + X-Robots-Tag: + - noindex, nofollow + X-Xss-Protection: + - 1; mode=block + Content-Length: + - '140' + body: + encoding: UTF-8 + string: | + + + + ok + 100 + OK + + + + + + recorded_at: Wed, 02 Oct 2024 11:37:29 GMT +- request: + method: get + uri: https://nextcloud.local/ocs/v1.php/cloud/groups/Sith%20Assassins + body: + encoding: US-ASCII + string: '' + headers: + Authorization: + - Basic + Ocs-Apirequest: + - 'true' + User-Agent: + - httpx.rb/1.3.1 + Accept: + - "*/*" + Accept-Encoding: + - gzip, deflate + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none' + Content-Type: + - application/xml; charset=utf-8 + Date: + - Wed, 02 Oct 2024 11:37:29 GMT + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Feature-Policy: + - autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone + 'none';payment 'none' + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - Apache/2.4.59 (Debian) + Set-Cookie: + - oc07ul6b4oaw=fcd02ba4e46f7404443e0c3935bfcac6; path=/; secure; HttpOnly; SameSite=Lax, + oc_sessionPassphrase=8v2pd3DRVea6gOjg9%2B0%2F1GJrT1jC2Xj6z3sWQP%2B7ZZFJbk5mhERPPkGKjEA6OLKXgEHPfGFgo9zFCWm8sIYZuPiQzafeTV7DkAyR0rAKwSofHa6U%2Bt8ekj2adKsNG3ur; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=fcd02ba4e46f7404443e0c3935bfcac6; + path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true; + path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax, + __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, + 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=fcd02ba4e46f7404443e0c3935bfcac6; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=fcd02ba4e46f7404443e0c3935bfcac6; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=ab506622b7a32efa9ff8cb303913c901; + path=/; secure; HttpOnly; SameSite=Lax, cookie_test=test; expires=Wed, 02 + Oct 2024 12:37:30 GMT; Max-Age=3600 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Powered-By: + - PHP/8.2.21 + X-Request-Id: + - Bv2HXv8aIk6xf5SlKMSJ + X-Robots-Tag: + - noindex, nofollow + X-Xss-Protection: + - 1; mode=block + Content-Length: + - '181' + body: + encoding: UTF-8 + string: | + + + + ok + 100 + OK + + + + + + d.vader@death.star + m.jade@death.star + + + + recorded_at: Wed, 02 Oct 2024 11:37:30 GMT +- request: + method: delete + uri: https://nextcloud.local/ocs/v1.php/cloud/groups/Sith%20Assassins + body: + encoding: US-ASCII + string: '' + headers: + Authorization: + - Basic + Ocs-Apirequest: + - 'true' + User-Agent: + - httpx.rb/1.3.1 + Accept: + - "*/*" + Accept-Encoding: + - gzip, deflate + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none' + Content-Type: + - application/xml; charset=utf-8 + Date: + - Wed, 02 Oct 2024 11:37:30 GMT + Expires: + - Thu, 19 Nov 1981 08:52:00 GMT + Feature-Policy: + - autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone + 'none';payment 'none' + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Server: + - Apache/2.4.59 (Debian) + Set-Cookie: + - oc07ul6b4oaw=2a746d27bc7a1d5f95b186384202ed93; path=/; secure; HttpOnly; SameSite=Lax, + oc_sessionPassphrase=k4xgvDa7ByqF2ywFCAmdxPHgmKwjUC1Iuy44lDbFPwpGCrL9Znyi3hDGqdxXSAGiH2PjyXh48wZdiJNKfAt084h5l4C2fASyQttqpvAwwepiZvBr3FdPVIADEO6%2FoPpI; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=2a746d27bc7a1d5f95b186384202ed93; + path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true; + path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax, + __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, + 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=2a746d27bc7a1d5f95b186384202ed93; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=2a746d27bc7a1d5f95b186384202ed93; + path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=b447774bea742aa1bb34f38fac4b4814; + path=/; secure; HttpOnly; SameSite=Lax, cookie_test=test; expires=Wed, 02 + Oct 2024 12:37:30 GMT; Max-Age=3600 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Powered-By: + - PHP/8.2.21 + X-Request-Id: + - ZkM9A9ZbefVCG7sM7fb7 + X-Robots-Tag: + - noindex, nofollow + X-Xss-Protection: + - 1; mode=block + Content-Length: + - '140' + body: + encoding: UTF-8 + string: | + + + + ok + 100 + OK + + + + + + recorded_at: Wed, 02 Oct 2024 11:37:30 GMT +recorded_with: VCR 6.3.1