Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#63518] remove message from check result

Eric Schubertd9289c213e91
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rb b/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rb
index 4d90c3af82f..0cb08d92694 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/base_validator_group.rb
@@ -67,19 +67,15 @@ module Storages
update_result(key, CheckResult.success(key))
end
- def fail_check(key, code, message)
- update_result(key, CheckResult.failure(key, code, message))
+ def fail_check(key, code)
+ update_result(key, CheckResult.failure(key, code))
throw :interrupted
end
- def warn_check(key, code, message, halt_validation: false)
- update_result(key, CheckResult.warning(key, code, message))
+ def warn_check(key, code, halt_validation: false)
+ update_result(key, CheckResult.warning(key, code))
throw :interrupted if halt_validation
end
-
- def message(key, context = {})
- I18n.t("storages.health.connection_validation.#{key}", **context)
- end
end
end
end
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/check_result.rb b/modules/storages/app/common/storages/peripherals/connection_validators/check_result.rb
index 9a1050267b8..f0065f32a89 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/check_result.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/check_result.rb
@@ -31,23 +31,23 @@
module Storages
module Peripherals
module ConnectionValidators
- CheckResult = Data.define(:key, :state, :code, :message, :timestamp) do
+ CheckResult = Data.define(:key, :state, :code, :timestamp) do
private_class_method :new
def self.skipped(key)
- new(key:, state: :skipped, code: nil, message: nil, timestamp: nil)
+ new(key:, state: :skipped, code: nil, timestamp: nil)
end
- def self.failure(key, code, message)
- new(key:, state: :failure, code:, message:, timestamp: Time.zone.now)
+ def self.failure(key, code)
+ new(key:, state: :failure, code:, timestamp: Time.zone.now)
end
def self.success(key)
- new(key:, state: :success, code: nil, message: nil, timestamp: Time.zone.now)
+ new(key:, state: :success, code: nil, timestamp: Time.zone.now)
end
- def self.warning(key, code, message)
- new(key:, state: :warning, code:, message:, timestamp: Time.zone.now)
+ def self.warning(key, code)
+ new(key:, state: :warning, code:, timestamp: Time.zone.now)
end
def success? = state == :success
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator.rb
index ac2cbe38594..e9d20df81cf 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator.rb
@@ -50,7 +50,7 @@ module Storages
def userless_access_denied
if files.result == :unauthorized
- fail_check(:userless_access, :userless_access_denied, message(:userless_access_denied))
+ fail_check(:userless_access, :nc_userless_access_denied)
else
pass_check(:userless_access)
end
@@ -58,7 +58,7 @@ module Storages
def group_folder_not_found
if files.result == :not_found
- fail_check(:group_folder_presence, :group_folder_not_found, message(:group_folder_not_found))
+ fail_check(:group_folder_presence, :nc_group_folder_not_found)
else
pass_check(:group_folder_presence)
end
@@ -72,7 +72,7 @@ module Storages
"\tstatus: #{files.result}\n" \
"\tresponse: #{files.error_payload}"
- fail_check(:files_request, :unknown_error, message(:unknown_error))
+ fail_check(:files_request, :unknown_error)
else
pass_check(:files_request)
end
@@ -83,8 +83,7 @@ module Storages
return pass_check(:group_folder_contents) if unexpected_files.empty?
log_extraneous_files(unexpected_files)
- code = :unexpected_content
- warn_check(:group_folder_contents, code, message("nextcloud.#{code}"))
+ warn_check(:group_folder_contents, :nc_unexpected_content)
end
def log_extraneous_files(unexpected_files)
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rb
index 2ecdd111077..4c130a5edd2 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/authentication_validator.rb
@@ -55,15 +55,13 @@ module Storages
if OAuthClientToken.for_user_and_client(@user, @storage.oauth_client).exists?
pass_check(:existing_token)
else
- code = :oauth_token_missing
- warn_check(:existing_token, code, message("nextcloud.#{code}"), halt_validation: true)
+ warn_check(:existing_token, :nc_oauth_token_missing, halt_validation: true)
end
end
def user_bound_request
Registry["nextcloud.queries.user"].call(storage: @storage, auth_strategy:).on_failure do
- code = "oauth_request_#{it.result}"
- fail_check(:user_bound_request, code, message("nextcloud.#{code}"))
+ fail_check(:user_bound_request, :"nc_oauth_request_#{it.result}")
end
pass_check(:user_bound_request)
@@ -84,12 +82,7 @@ module Storages
if @user.identity_url.present?
pass_check(:non_provisioned_user)
else
- warn_check(
- :non_provisioned_user,
- :oidc_non_provisioned_user,
- message(:oidc_non_provisioned_user),
- halt_validation: true
- )
+ warn_check(:non_provisioned_user, :oidc_non_provisioned_user, halt_validation: true)
end
end
@@ -97,12 +90,7 @@ module Storages
if @user.authentication_provider.is_a?(OpenIDConnect::Provider)
pass_check(:provisioned_user_provider)
else
- warn_check(
- :provisioned_user_provider,
- :oidc_non_oidc_user,
- message(:oidc_non_oidc_user),
- halt_validation: true
- )
+ warn_check(:provisioned_user_provider, :oidc_non_oidc_user, halt_validation: true)
end
end
@@ -124,7 +112,7 @@ module Storages
:unknown_error
end
- fail_check(:token_negotiable, error_code, message(error_code))
+ fail_check(:token_negotiable, error_code)
end
end
end
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator.rb
index 28ff4f3f798..fc9dde5e3ef 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator.rb
@@ -50,13 +50,13 @@ module Storages
if @storage.configured?
pass_check(:storage_configured)
else
- fail_check(:storage_configured, :not_configured, message(:not_configured))
+ fail_check(:storage_configured, :not_configured)
end
end
def capabilities_request_status
if capabilities.failure? && capabilities.result != :not_found
- fail_check(:capabilities_request, :unknown_error, message(:unknown_error))
+ fail_check(:capabilities_request, :unknown_error)
else
pass_check(:capabilities_request)
end
@@ -67,7 +67,7 @@ module Storages
capabilities_result = capabilities.result
if capabilities_result.app_version < min_app_version
- fail_check(:dependencies_versions, :app_version_mismatch, message(:app_version_mismatch))
+ fail_check(:dependencies_versions, :nc_integration_app_version_mismatch)
else
pass_check(:dependencies_versions)
end
@@ -75,11 +75,9 @@ module Storages
def missing_dependencies
capabilities_result = capabilities.result
- app_name = I18n.t("storages.dependencies.nextcloud.integration_app")
if capabilities_result.app_disabled?
- message = message(:missing_dependencies, dependency: app_name)
- fail_check(:dependencies_check, :missing_dependencies, message)
+ fail_check(:dependencies_check, :nc_integration_app_missing)
else
pass_check(:dependencies_check)
end
@@ -87,7 +85,7 @@ module Storages
def host_url_not_found
if capabilities.result == :not_found
- fail_check(:host_url_accessible, :host_not_found, message(:host_not_found))
+ fail_check(:host_url_accessible, :nc_host_not_found)
else
pass_check(:host_url_accessible)
end
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator.rb
index 270b1fc029a..a3adada855c 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator.rb
@@ -33,7 +33,7 @@ module Storages
module ConnectionValidators
module OneDrive
class AmpfConfigurationValidator < BaseValidatorGroup
- TEST_FOLDER_NAME = "ConnectionValidatorFolder"
+ TEST_FOLDER_NAME = "OpenProjectConnectionValidationFolder"
private
@@ -46,15 +46,14 @@ module Storages
def unexpected_content
unexpected_files = files_query
- .on_failure { fail_check(:drive_contents, :unknown_error, message(:unknown_error)) }
+ .on_failure { fail_check(:drive_contents, :unknown_error) }
.result.files.reject { managed_project_folder_ids.include?(it.id) }
if unexpected_files.empty?
pass_check(:drive_contents)
else
log_extraneous_files(unexpected_files)
- code = :unexpected_content
- warn_check(:drive_contents, code, message("one_drive.#{code}"))
+ warn_check(:drive_contents, :od_unexpected_content)
end
end
@@ -67,10 +66,9 @@ module Storages
end
def delete_folder(folder)
- failure_message = message("one_drive.client_cant_delete_folder")
Registry["one_drive.commands.delete_folder"]
.call(storage: @storage, auth_strategy:, location: folder.id)
- .on_failure { fail_check(:client_folder_removal, :client_cant_delete_folder, failure_message) }
+ .on_failure { fail_check(:client_folder_removal, :od_client_cant_delete_folder) }
.on_success { pass_check(:client_folder_removal) }
end
@@ -79,9 +77,8 @@ module Storages
.call(storage: @storage, auth_strategy:, folder_name: TEST_FOLDER_NAME, parent_location: ParentFolder.root)
.on_success { pass_check(:client_folder_creation) }
.on_failure do
- code = it.result == :already_exists ? :existing_test_folder : :client_write_permission_missing
- message = message("one_drive.#{code}", folder_name: TEST_FOLDER_NAME)
- fail_check(:client_folder_creation, code, message)
+ code = it.result == :already_exists ? :od_existing_test_folder : :od_client_write_permission_missing
+ fail_check(:client_folder_creation, code)
end
end
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/authentication_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/authentication_validator.rb
index 1dc648de7af..c7b1ecd3738 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/authentication_validator.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/authentication_validator.rb
@@ -51,19 +51,13 @@ module Storages
if OAuthClientToken.for_user_and_client(@user, @storage.oauth_client).exists?
pass_check(:existing_token)
else
- warn_check(
- :existing_token,
- :oauth_token_missing,
- message("one_drive.oauth_token_missing"),
- halt_validation: true
- )
+ warn_check(:existing_token, :od_oauth_token_missing, halt_validation: true)
end
end
def user_bound_request
Registry["one_drive.queries.user"].call(storage: @storage, auth_strategy:).on_failure do
- code = "oauth_request_#{it.result}"
- fail_check(:user_bound_request, code, message("one_drive.#{code}"))
+ fail_check(:user_bound_request, :"od_oauth_request_#{it.result}")
end
pass_check(:user_bound_request)
diff --git a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator.rb b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator.rb
index 699a803d665..684511a49eb 100644
--- a/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator.rb
+++ b/modules/storages/app/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator.rb
@@ -59,8 +59,7 @@ module Storages
return pass_check(:drive_id_format) if query_result.success?
if error_payload.dig(:error, :code) == "invalidRequest"
- code = :drive_id_wrong
- fail_check(:drive_id_format, code, message("one_drive.#{code}"))
+ fail_check(:drive_id_format, :od_drive_id_invalid)
else
pass_check(:drive_id_format)
end
@@ -68,8 +67,7 @@ module Storages
def drive_not_found
if query_result.result == :not_found
- code = :drive_id_not_found
- fail_check(:drive_id_exists, code, message("one_drive.#{code}"))
+ fail_check(:drive_id_exists, :od_drive_id_not_found)
else
pass_check(:drive_id_exists)
end
@@ -81,7 +79,7 @@ module Storages
tenant_id_regex = /tenant (?:identifier )?'#{@storage.tenant_id}' (?:not found|is neither)/i
if error_payload[:error] == "invalid_request" && error_payload[:error_description].match?(tenant_id_regex)
- fail_check(:tenant_id, :tenant_id_wrong, message(:tenant_id_wrong))
+ fail_check(:tenant_id, :od_tenant_id_invalid)
else
pass_check(:tenant_id)
end
@@ -91,7 +89,7 @@ module Storages
return pass_check(:client_id) if query_result.success?
if error_payload[:error] == "unauthorized_client"
- fail_check(:client_id, :client_id_wrong, message(:client_id_wrong))
+ fail_check(:client_id, :client_id_invalid)
else
pass_check(:client_id)
end
@@ -101,7 +99,7 @@ module Storages
return pass_check(:client_secret) if query_result.success?
if error_payload[:error] == "invalid_client"
- fail_check(:client_secret, :client_secret_wrong, message(:client_secret_wrong))
+ fail_check(:client_secret, :client_secret_invalid)
else
pass_check(:client_secret)
end
@@ -114,7 +112,7 @@ module Storages
"\tstatus: #{query_result.result}\n" \
"\tresponse: #{query_result.error_payload}"
- fail_check(:diagnostic_request, :unknown_error, message(:unknown_error))
+ fail_check(:diagnostic_request, :unknown_error)
else
pass_check :diagnostic_request
end
@@ -124,7 +122,7 @@ module Storages
if @storage.configured?
pass_check(:storage_configured)
else
- fail_check(:storage_configured, :not_configured, message(:not_configured))
+ fail_check(:storage_configured, :not_configured)
end
end
diff --git a/modules/storages/app/components/storages/admin/health/check_result_component.html.erb b/modules/storages/app/components/storages/admin/health/check_result_component.html.erb
index 3c6e5019015..4cdc1214ba8 100644
--- a/modules/storages/app/components/storages/admin/health/check_result_component.html.erb
+++ b/modules/storages/app/components/storages/admin/health/check_result_component.html.erb
@@ -38,14 +38,14 @@ See COPYRIGHT and LICENSE files for more details.
text.with_column(ml: 2) do
render(Primer::Beta::Text.new(font_size: :small, color: data[:status_color])) { data[:status_text] }
end
- if data[:error_code]
+ if data[:error_code].present?
text.with_column(ml: 2) do
render(Primer::Beta::Label.new(scheme: data[:status_color])) { data[:error_code] }
end
end
end
- if data[:error_text].present?
+ if data[:error_code].present?
row.with_column do
render(Primer::Beta::Link.new(href: data[:docs_href])) do |link|
link.with_trailing_visual_icon(icon: :"link-external")
diff --git a/modules/storages/app/components/storages/admin/health/check_result_component.rb b/modules/storages/app/components/storages/admin/health/check_result_component.rb
index dca81827d60..11077439173 100644
--- a/modules/storages/app/components/storages/admin/health/check_result_component.rb
+++ b/modules/storages/app/components/storages/admin/health/check_result_component.rb
@@ -47,7 +47,7 @@ module Storages
status_color:,
status_text:,
error_code:,
- error_text: model.message,
+ error_text:,
docs_href: ::OpenProject::Static::Links.url_for(:storage_docs, :health_status)
}
end
@@ -60,6 +60,12 @@ module Storages
end
end
+ def error_text
+ return nil if model.success? || model.skipped?
+
+ I18n.t("storages.health.connection_validation.#{model.code}")
+ end
+
def status_color
if model.success?
:success
diff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.yml
index 33db14dc98c..57a35649422 100644
--- a/modules/storages/config/locales/en.yml
+++ b/modules/storages/config/locales/en.yml
@@ -269,40 +269,36 @@ en:
one: "%{count} check returned a warning"
other: "%{count} checks returned a warning"
connection_validation:
- app_version_mismatch: The Integration OpenProject app version is not supported. Please update your Nextcloud server.
- client_id_wrong: The configured OAuth 2 client id is invalid. Please check the configuration.
- client_secret_wrong: The configured OAuth 2 client secret is invalid. Please check the configuration.
- drive_id_wrong: The configured drive id could not be found. Please check the configuration.
- group_folder_not_found: The group folder could not be found.
- group_folder_version_mismatch: The Group Folder version is not supported. Please update your Nextcloud server.
- host_not_found: No Nextcloud server found at the configured host url. Please check the configuration.
- missing_dependencies: 'A required dependency is missing on the file storage. Please add the following dependency: %{dependency}.'
- nextcloud:
- oauth_request_not_found: OpenProject couldn't find the root folder of Nextcloud using the current logged-in user. Please check the server logs for further information.
- oauth_request_unauthorized: The current user isn't authorized to see the main folder of Nextcloud or we couldn't acquire a token. Please check the server logs for further information.
- oauth_token_missing: OpenProject cannot test the user level communication with Nextcloud as the user did not yet link their Nextcloud account.
- unexpected_content: Unexpected content found in the managed group folder.
+ client_id_invalid: The configured OAuth 2 client id is invalid. Please check the configuration.
+ client_secret_invalid: The configured OAuth 2 client secret is invalid. Please check the configuration.
+ nc_group_folder_not_found: The group folder could not be found.
+ nc_group_folder_version_mismatch: The Group folders app version is not supported. Please update your Nextcloud server.
+ nc_host_not_found: No Nextcloud server found at the configured host url. Please check the configuration.
+ nc_group_folder_app_missing: "A required dependency is missing on the file storage. Please add 'Group folders' to your installation."
+ nc_integration_app_missing: "A required dependency is missing on the file storage. Please add 'Integration OpenProject' to your installation."
+ nc_integration_app_version_mismatch: The Integration OpenProject app version is not supported. Please update your Nextcloud server.
+ nc_oauth_request_not_found: OpenProject couldn't find the root folder of Nextcloud using the current logged-in user. Please check the server logs for further information.
+ nc_oauth_request_unauthorized: The current user isn't authorized to see the main folder of Nextcloud or we couldn't acquire a token. Please check the server logs for further information.
+ nc_oauth_token_missing: OpenProject cannot test the user level communication with Nextcloud as the user did not yet link their Nextcloud account.
+ nc_unexpected_content: Unexpected content found in the managed group folder.
+ nc_userless_access_denied: The configured app password is invalid.
not_configured: The connection could not be validated. Please finish configuration first.
oidc_cant_acquire_token: Your OpenID Connect setup doesn't provide the necessary audience, nor provides token exchange capabilities. Please check out our documentation for more information.
oidc_cant_exchange_token: There seems to be a problem with the Token Exchange setup on your OpenID Connect Provider. Please check its configuration and try again.
oidc_cant_refresh_token: There was an error while trying to check your access to the storage. Please check the server logs for further information.
oidc_non_oidc_user: The current user, while provisioned, wasn't provisioned by an OpenID Connect (OIDC) Identity Provider. Please re-run the check with an OIDC provisioned user.
oidc_non_provisioned_user: The current user isn't provided by an OpenID Connect Identity Provider. Please re-run the check with a provided user.
- one_drive:
- client_cant_delete_folder: The client is having trouble deleting folders. Please check the setup documentation for your storage.
- client_write_permission_missing: The client seems to have write permissions missing. Please check the setup documentation for your storage.
- drive_id_not_found: The configured drive id could not be found. Please check the configuration.
- drive_id_wrong: The configured drive id seems invalid. Please check the configuration.
- existing_test_folder: The folder %{folder_name} needed for testing already exists. Please delete it and try again.
- oauth_request_not_found: OpenProject couldn't find the root folder in the drive using the current logged-in user. Please check the server logs for further information.
- oauth_request_unauthorized: The current user isn't authorized to see the root folder of OneDrive or we couldn't acquire a token. Please check the server logs for further information.
- oauth_token_missing: OpenProject cannot test the user level communication with OneDrive/SharePoint as the user did not yet link their Microsoft account.
- unexpected_content: Unexpected content found in the drive.
- placeholder: Check your connection against the server.
- subtitle: Connection validation
- tenant_id_wrong: The configured directory (tenant) id is invalid. Please check the configuration.
+ od_client_cant_delete_folder: The client is having trouble deleting folders. Please check the setup documentation for your storage.
+ od_client_write_permission_missing: The client seems to have write permissions missing. Please check the setup documentation for your storage.
+ od_drive_id_invalid: The configured drive id seems invalid. Please check the configuration.
+ od_drive_id_not_found: The configured drive id could not be found. Please check the configuration.
+ od_existing_test_folder: The folder name needed for testing already exists. Please delete it and try again.
+ od_oauth_request_not_found: OpenProject couldn't find the root folder in the drive using the current logged-in user. Please check the server logs for further information.
+ od_oauth_request_unauthorized: The current user isn't authorized to see the root folder of OneDrive/SharePoint or we couldn't acquire a token. Please check the server logs for further information.
+ od_oauth_token_missing: OpenProject cannot test the user level communication with OneDrive/SharePoint as the user did not yet link their Microsoft account.
+ od_tenant_id_wrong: The configured directory (tenant) id is invalid. Please check the configuration.
+ od_unexpected_content: Unexpected content found in the drive.
unknown_error: The connection could not be validated. An unknown error occurred. Please check the server logs for further information.
- userless_access_denied: The configured app password is invalid.
label_error: Error
label_failed: Failed
label_healthy: Healthy
diff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator_spec.rb
index 0c8b4f5000d..7b645a9f92f 100644
--- a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/ampf_configuration_validator_spec.rb
@@ -69,7 +69,7 @@ module Storages
states = results.tally
expect(states).to eq({ success: 1, failure: 1, skipped: 2 })
expect(results[:userless_access]).to be_failure
- expect(results[:userless_access].message).to eq(i18n_message(:userless_access_denied))
+ expect(results[:userless_access].code).to eq(:nc_userless_access_denied)
end
end
@@ -80,7 +80,7 @@ module Storages
results = validator.call
expect(results[:group_folder_presence]).to be_failure
- expect(results[:group_folder_presence].message).to eq(i18n_message(:group_folder_not_found))
+ expect(results[:group_folder_presence].code).to eq(:nc_group_folder_not_found)
end
end
@@ -93,8 +93,7 @@ module Storages
results = validator.call
expect(results[:files_request]).to be_failure
- expect(results[:files_request].message)
- .to eq(i18n_message(:unknown_error))
+ expect(results[:files_request].code).to eq(:unknown_error)
expect(Rails.logger).to have_received(:error).with(/Connection validation failed with unknown error/)
end
@@ -116,14 +115,12 @@ module Storages
results = validator.call
expect(results[:group_folder_contents]).to be_a_warning
- expect(results[:group_folder_contents].message).to eq(i18n_message("nextcloud.unexpected_content"))
+ expect(results[:group_folder_contents].code).to eq(:nc_unexpected_content)
end
end
private
- def i18n_message(key, context = {}) = I18n.t("storages.health.connection_validation.#{key}", **context)
-
def build_failure(code:, payload:)
data = StorageErrorData.new(source: "query", payload:)
error = StorageError.new(code:, data:)
diff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/authentication_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/authentication_validator_spec.rb
index 70efd10f9d3..75325c958f9 100644
--- a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/authentication_validator_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/authentication_validator_spec.rb
@@ -56,7 +56,7 @@ module Storages
result = validator.call
expect(result[:existing_token]).to be_a_warning
- expect(result[:existing_token].message).to eq(I18n.t(i18n_key("nextcloud.oauth_token_missing")))
+ expect(result[:existing_token].code).to eq(:nc_oauth_token_missing)
expect(result[:user_bound_request]).to be_skipped
end
@@ -65,7 +65,7 @@ module Storages
result = validator.call
expect(result[:user_bound_request]).to be_a_failure
- expect(result[:user_bound_request].message).to eq(I18n.t(i18n_key("nextcloud.oauth_request_unauthorized")))
+ expect(result[:user_bound_request].code).to eq(:nc_oauth_request_unauthorized)
end
end
@@ -94,7 +94,7 @@ module Storages
result = validator.call
expect(result[:non_provisioned_user]).to be_warning
- expect(result[:non_provisioned_user].message).to eq(I18n.t(i18n_key(:oidc_non_provisioned_user)))
+ expect(result[:non_provisioned_user].code).to eq(:oidc_non_provisioned_user)
state_count = result.tally
expect(state_count).to eq({ skipped: 3, warning: 1 })
@@ -105,7 +105,7 @@ module Storages
result = validator.call
expect(result[:provisioned_user_provider]).to be_warning
- expect(result[:provisioned_user_provider].message).to eq(I18n.t(i18n_key(:oidc_non_oidc_user)))
+ expect(result[:provisioned_user_provider].code).to eq(:oidc_non_oidc_user)
state_count = result.tally
expect(state_count).to eq({ success: 1, skipped: 2, warning: 1 })
@@ -119,7 +119,7 @@ module Storages
result = validator.call
expect(result[:token_negotiable]).to be_failure
- expect(result[:token_negotiable].message).to eq(I18n.t(i18n_key(:oidc_cant_acquire_token)))
+ expect(result[:token_negotiable].code).to eq(:oidc_cant_acquire_token)
end
end
@@ -146,7 +146,7 @@ module Storages
result = validator.call
expect(result[:token_negotiable]).to be_failure
- expect(result[:token_negotiable].message).to eq(I18n.t(i18n_key(:oidc_cant_refresh_token)))
+ expect(result[:token_negotiable].code).to eq(:oidc_cant_refresh_token)
end
it "fails when refresh fails" do
@@ -157,7 +157,7 @@ module Storages
result = validator.call
expect(result[:token_negotiable]).to be_failure
- expect(result[:token_negotiable].message).to eq(I18n.t(i18n_key(:oidc_cant_refresh_token)))
+ expect(result[:token_negotiable].code).to eq(:oidc_cant_refresh_token)
end
context "when the server supports token exchange" do
@@ -183,7 +183,7 @@ module Storages
result = validator.call
expect(result[:token_negotiable]).to be_failure
- expect(result[:token_negotiable].message).to eq(I18n.t(i18n_key(:oidc_cant_exchange_token)))
+ expect(result[:token_negotiable].code).to eq(:oidc_cant_exchange_token)
expect(exchange_request).to have_been_requested.once
end
@@ -196,17 +196,13 @@ module Storages
result = validator.call
expect(result[:token_negotiable]).to be_failure
- expect(result[:token_negotiable].message).to eq(I18n.t(i18n_key(:oidc_cant_exchange_token)))
+ expect(result[:token_negotiable].code).to eq(:oidc_cant_exchange_token)
expect(exchange_request).to have_been_requested.once
end
end
end
end
end
-
- private
-
- def i18n_key(key) = "storages.health.connection_validation.#{key}"
end
end
end
diff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator_spec.rb
index be25efca2ae..a33185b96dc 100644
--- a/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/nextcloud/storage_configuration_validator_spec.rb
@@ -54,7 +54,7 @@ module Storages
it "the check fails" do
results = validator.call
expect(results[:storage_configured]).to be_a_failure
- expect(results[:storage_configured].message).to eq(I18n.t(i18n_key(:not_configured)))
+ expect(results[:storage_configured].code).to eq(:not_configured)
end
end
@@ -64,7 +64,7 @@ module Storages
results = validator.call
expect(results[:host_url_accessible]).to be_a_failure
- expect(results[:host_url_accessible].message).to eq(I18n.t(i18n_key(:host_not_found)))
+ expect(results[:host_url_accessible].code).to eq(:nc_host_not_found)
end
it "integration app version mismatch", vcr: "nextcloud/capabilities_success" do
@@ -73,21 +73,16 @@ module Storages
results = validator.call
expect(results[:dependencies_versions]).to be_a_failure
- expect(results[:dependencies_versions].message).to eq(I18n.t(i18n_key(:app_version_mismatch)))
+ expect(results[:dependencies_versions].code).to eq(:nc_integration_app_version_mismatch)
end
it "integration app disabled / missing", vcr: "nextcloud/capabilities_success_app_disabled" do
results = validator.call
expect(results[:dependencies_check]).to be_a_failure
- expect(results[:dependencies_check].message)
- .to eq(I18n.t(i18n_key(:missing_dependencies), dependency: "Integration OpenProject"))
+ expect(results[:dependencies_check].code).to eq(:nc_integration_app_missing)
end
end
-
- private
-
- def i18n_key(key) = "storages.health.connection_validation.#{key}"
end
end
end
diff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator_spec.rb
index 67f994a943b..7345a5bfc4f 100644
--- a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/ampf_configuration_validator_spec.rb
@@ -54,7 +54,7 @@ module Storages
results = validator.call
expect(results[:drive_contents]).to be_a_warning
- expect(results[:drive_contents].message).to eq(I18n.t(i18n_key("one_drive.unexpected_content")))
+ expect(results[:drive_contents].code).to eq(:od_unexpected_content)
end
it "fails when folders can't be created" do
@@ -68,8 +68,7 @@ module Storages
results = validator.call
expect(results[:client_folder_creation]).to be_a_failure
- expect(results[:client_folder_creation].message)
- .to eq(I18n.t(i18n_key("one_drive.client_write_permission_missing")))
+ expect(results[:client_folder_creation].code).to eq(:od_client_write_permission_missing)
end
it "fails when the test folder already exists on the remote", vcr: "one_drive/validator_test_folder_already_exists" do
@@ -78,8 +77,7 @@ module Storages
result = validator.call
expect(result[:client_folder_creation]).to be_a_failure
- expect(result[:client_folder_creation].message)
- .to eq(I18n.t(i18n_key("one_drive.existing_test_folder"), folder_name:))
+ expect(result[:client_folder_creation].code).to eq(:od_existing_test_folder)
ensure
StorageInteraction::OneDrive::DeleteFolderCommand.call(storage:, auth_strategy:, location: created_folder)
end
@@ -94,7 +92,7 @@ module Storages
results = validator.call
expect(results[:client_folder_removal]).to be_a_failure
- expect(results[:client_folder_removal].message).to eq(I18n.t(i18n_key("one_drive.client_cant_delete_folder")))
+ expect(results[:client_folder_removal].code).to eq(:od_client_cant_delete_folder)
ensure
StorageInteraction::OneDrive::DeleteFolderCommand.call(storage:, auth_strategy:, location: created_folder)
end
@@ -109,8 +107,6 @@ module Storages
return folder.id
end
end
-
- def i18n_key(key) = "storages.health.connection_validation.#{key}"
end
end
end
diff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/authentication_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/authentication_validator_spec.rb
index c479d9b47b6..b8018b90460 100644
--- a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/authentication_validator_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/authentication_validator_spec.rb
@@ -53,7 +53,7 @@ module Storages
result = validator.call
expect(result[:existing_token]).to be_a_warning
- expect(result[:existing_token].message).to eq(I18n.t(i18n_key("one_drive.oauth_token_missing")))
+ expect(result[:existing_token].code).to eq(:od_oauth_token_missing)
expect(result[:user_bound_request]).to be_skipped
end
@@ -62,13 +62,9 @@ module Storages
result = validator.call
expect(result[:user_bound_request]).to be_a_failure
- expect(result[:user_bound_request].message).to eq(I18n.t(i18n_key("one_drive.oauth_request_unauthorized")))
+ expect(result[:user_bound_request].code).to eq(:od_oauth_request_unauthorized)
end
end
-
- private
-
- def i18n_key(key) = "storages.health.connection_validation.#{key}"
end
end
end
diff --git a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator_spec.rb
index 11a18dcba43..88eaf1ce6d1 100644
--- a/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator_spec.rb
+++ b/modules/storages/spec/common/storages/peripherals/connection_validators/one_drive/storage_configuration_validator_spec.rb
@@ -62,7 +62,7 @@ module Storages
it "the check fails" do
results = validator.call
expect(results[:storage_configured]).to be_a_failure
- expect(results[:storage_configured].message).to eq(I18n.t(i18n_key(:not_configured)))
+ expect(results[:storage_configured].code).to eq(:not_configured)
end
end
@@ -75,7 +75,7 @@ module Storages
results = validator.call
expect(results[:diagnostic_request]).to be_a_failure
- expect(results[:diagnostic_request].message).to eq(I18n.t(i18n_key(:unknown_error)))
+ expect(results[:diagnostic_request].code).to eq(:unknown_error)
end
it "logs an error" do
@@ -92,7 +92,7 @@ module Storages
results = described_class.new(storage).call
expect(results[:tenant_id]).to be_a_failure
- expect(results[:tenant_id].message).to eq(I18n.t(i18n_key(:tenant_id_wrong)))
+ expect(results[:tenant_id].code).to eq(:od_tenant_id_invalid)
end
it "but is blatantly wrong", vcr: "one_drive/validation_absurd_tenant_id" do
@@ -100,7 +100,7 @@ module Storages
results = described_class.new(storage).call
expect(results[:tenant_id]).to be_a_failure
- expect(results[:tenant_id].message).to eq(I18n.t(i18n_key(:tenant_id_wrong)))
+ expect(results[:tenant_id].code).to eq(:od_tenant_id_invalid)
end
end
@@ -110,7 +110,7 @@ module Storages
results = described_class.new(storage).call
expect(results[:client_secret]).to be_a_failure
- expect(results[:client_secret].message).to eq(I18n.t(i18n_key(:client_secret_wrong)))
+ expect(results[:client_secret].code).to eq(:client_secret_invalid)
end
end
@@ -120,7 +120,7 @@ module Storages
results = described_class.new(storage).call
expect(results[:client_id]).to be_a_failure
- expect(results[:client_id].message).to eq(I18n.t(i18n_key(:client_id_wrong)))
+ expect(results[:client_id].code).to eq(:client_id_invalid)
end
end
@@ -130,22 +130,18 @@ module Storages
results = described_class.new(storage).call
expect(results[:drive_id_format]).to be_a_failure
- expect(results[:drive_id_format].message).to eq(I18n.t(i18n_key("one_drive.drive_id_wrong")))
+ expect(results[:drive_id_format].code).to eq(:od_drive_id_invalid)
end
it "fails when is not found", vcr: "one_drive/validation_drive_id_not_found" do
storage.drive_id = "#{storage.drive_id[0..-2]}0"
results = described_class.new(storage).call
- expect(results[:drive_id_not_found]).to be_a_failure
- expect(results[:drive_id_not_found].message).to eq(I18n.t(i18n_key("one_drive.drive_id_not_found")))
+ expect(results[:drive_id_exists]).to be_a_failure
+ expect(results[:drive_id_exists].code).to eq(:od_drive_id_not_found)
end
end
end
-
- private
-
- def i18n_key(key) = "storages.health.connection_validation.#{key}"
end
end
end
diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_ampf_clean_run.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_ampf_clean_run.yml
index 4fe63906717..7f6acc9d71a 100644
--- a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_ampf_clean_run.yml
+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_ampf_clean_run.yml
@@ -69,7 +69,7 @@ http_interactions:
uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children
body:
encoding: UTF-8
- string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
+ string: '{"name":"OpenProjectConnectionValidationFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
headers:
Content-Type:
- application/json
@@ -114,7 +114,7 @@ http_interactions:
- Tue, 08 Apr 2025 14:11:48 GMT
body:
encoding: UTF-8
- string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX'')/root/children/$entity","@odata.etag":"\"{DB39CBFF-7643-4C26-801D-7C3E22B888BA},1\"","createdDateTime":"2025-04-08T14:11:49Z","eTag":"\"{DB39CBFF-7643-4C26-801D-7C3E22B888BA},1\"","id":"01ANJ53W77ZM45WQ3WEZGIAHL4HYRLRCF2","lastModifiedDateTime":"2025-04-08T14:11:49Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/ConnectionValidatorFolder","cTag":"\"c:{DB39CBFF-7643-4C26-801D-7C3E22B888BA},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX'')/root/children/$entity","@odata.etag":"\"{DB39CBFF-7643-4C26-801D-7C3E22B888BA},1\"","createdDateTime":"2025-04-08T14:11:49Z","eTag":"\"{DB39CBFF-7643-4C26-801D-7C3E22B888BA},1\"","id":"01ANJ53W77ZM45WQ3WEZGIAHL4HYRLRCF2","lastModifiedDateTime":"2025-04-08T14:11:49Z","name":"OpenProjectConnectionValidationFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/OpenProjectConnectionValidationFolder","cTag":"\"c:{DB39CBFF-7643-4C26-801D-7C3E22B888BA},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"87d67c02-fdaf-4504-8b39-920984585ad7","listItemUniqueId":"458e6945-3722-40b1-946f-4743a2d480f2","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-08T14:11:49Z","lastModifiedDateTime":"2025-04-08T14:11:49Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'
diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_create_folder.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_create_folder.yml
index e0549cc064c..c1ab5be5f5a 100644
--- a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_create_folder.yml
+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_create_folder.yml
@@ -69,7 +69,7 @@ http_interactions:
uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children
body:
encoding: UTF-8
- string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
+ string: '{"name":"OpenProjectConnectionValidationFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
headers:
Content-Type:
- application/json
@@ -114,7 +114,7 @@ http_interactions:
- Tue, 08 Apr 2025 13:57:33 GMT
body:
encoding: UTF-8
- string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},1\"","createdDateTime":"2025-04-08T13:57:34Z","eTag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},1\"","id":"01ANJ53W74LTFTHDTOJFFZKA46PGTC2B7N","lastModifiedDateTime":"2025-04-08T13:57:34Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/ConnectionValidatorFolder","cTag":"\"c:{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},1\"","createdDateTime":"2025-04-08T13:57:34Z","eTag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},1\"","id":"01ANJ53W74LTFTHDTOJFFZKA46PGTC2B7N","lastModifiedDateTime":"2025-04-08T13:57:34Z","name":"OpenProjectConnectionValidationFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/OpenProjectConnectionValidationFolder","cTag":"\"c:{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","listItemUniqueId":"6bc8b02c-f419-4bec-8531-be5b69948a7d","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-08T13:57:34Z","lastModifiedDateTime":"2025-04-08T13:57:34Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'
@@ -160,8 +160,8 @@ http_interactions:
encoding: UTF-8
string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{33CB5CFC-6E8E-4B49-9503-9E79A62D07ED},2\"","createdBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP
Auth"},"user":{"displayName":"SharePoint App"}},"id":"01ANJ53W74LTFTHDTOJFFZKA46PGTC2B7N","lastModifiedBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP
- Auth"},"user":{"displayName":"SharePoint App"}},"name":"ConnectionValidatorFolder","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello
- VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/ConnectionValidatorFolder","fileSystemInfo":{"createdDateTime":"2025-04-08T13:57:34Z","lastModifiedDateTime":"2025-04-08T13:57:34Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{8DA9DCAF-43E4-419C-B52E-F1303A0D3372},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric
+ Auth"},"user":{"displayName":"SharePoint App"}},"name":"OpenProjectConnectionValidationFolder","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello
+ VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/OpenProjectConnectionValidationFolder","fileSystemInfo":{"createdDateTime":"2025-04-08T13:57:34Z","lastModifiedDateTime":"2025-04-08T13:57:34Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{8DA9DCAF-43E4-419C-B52E-F1303A0D3372},1\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric
Schubert"}},"id":"01ANJ53W5P3SUY3ZCDTRA3KLXRGA5A2M3S","lastModifiedBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric
Schubert"}},"name":"data","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello
VCR","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/data","fileSystemInfo":{"createdDateTime":"2025-04-07T12:02:26Z","lastModifiedDateTime":"2025-04-07T12:02:26Z"},"folder":{"childCount":0},"size":0},{"@odata.etag":"\"{992C5835-AA54-4B71-B3AF-197B1F4578E8},2\"","createdBy":{"user":{"email":"[email protected]","id":"5b5a7dc4-4539-41ba-9fa9-100f0a26acb7","displayName":"Eric
diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_extraneous_files.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_extraneous_files.yml
index aec24c49724..1108c4321af 100644
--- a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_extraneous_files.yml
+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_extraneous_files.yml
@@ -69,7 +69,7 @@ http_interactions:
uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children
body:
encoding: UTF-8
- string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
+ string: '{"name":"OpenProjectConnectionValidationFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
headers:
Content-Type:
- application/json
@@ -114,7 +114,7 @@ http_interactions:
- Tue, 08 Apr 2025 14:04:34 GMT
body:
encoding: UTF-8
- string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{610A0BB0-1141-4B56-A0A3-15CB69398698},1\"","createdDateTime":"2025-04-08T14:04:35Z","eTag":"\"{610A0BB0-1141-4B56-A0A3-15CB69398698},1\"","id":"01ANJ53W5QBMFGCQIRKZF2BIYVZNUTTBUY","lastModifiedDateTime":"2025-04-08T14:04:35Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/ConnectionValidatorFolder","cTag":"\"c:{610A0BB0-1141-4B56-A0A3-15CB69398698},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY9jo6leJDqrT7muzvmiWjFW'')/root/children/$entity","@odata.etag":"\"{610A0BB0-1141-4B56-A0A3-15CB69398698},1\"","createdDateTime":"2025-04-08T14:04:35Z","eTag":"\"{610A0BB0-1141-4B56-A0A3-15CB69398698},1\"","id":"01ANJ53W5QBMFGCQIRKZF2BIYVZNUTTBUY","lastModifiedDateTime":"2025-04-08T14:04:35Z","name":"OpenProjectConnectionValidationFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20VCR/OpenProjectConnectionValidationFolder","cTag":"\"c:{610A0BB0-1141-4B56-A0A3-15CB69398698},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"5ea9a363-3a24-4fab-b9ae-cef9a25a3156","listItemUniqueId":"6bc8b02c-f419-4bec-8531-be5b69948a7d","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-08T14:04:35Z","lastModifiedDateTime":"2025-04-08T14:04:35Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'
diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_test_folder_already_exists.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_test_folder_already_exists.yml
index 72b661cacff..b561422fe57 100644
--- a/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_test_folder_already_exists.yml
+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/one_drive/validator_test_folder_already_exists.yml
@@ -69,7 +69,7 @@ http_interactions:
uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children
body:
encoding: UTF-8
- string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
+ string: '{"name":"OpenProjectConnectionValidationFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
headers:
Content-Type:
- application/json
@@ -114,7 +114,7 @@ http_interactions:
- Wed, 09 Apr 2025 16:01:57 GMT
body:
encoding: UTF-8
- string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX'')/root/children/$entity","@odata.etag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},1\"","createdDateTime":"2025-04-09T16:01:58Z","eTag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},1\"","id":"01ANJ53W7PCKQBI3UPUNFLCN7RF3ECYE6C","lastModifiedDateTime":"2025-04-09T16:01:58Z","name":"ConnectionValidatorFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/ConnectionValidatorFolder","cTag":"\"c:{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
+ string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives(''b%21FeOZEMfQx0eGQKqVBLcP__BG8mq-4-9FuRqOyk3MXY8CfNaHr_0ERYs5kgmEWFrX'')/root/children/$entity","@odata.etag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},1\"","createdDateTime":"2025-04-09T16:01:58Z","eTag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},1\"","id":"01ANJ53W7PCKQBI3UPUNFLCN7RF3ECYE6C","lastModifiedDateTime":"2025-04-09T16:01:58Z","name":"OpenProjectConnectionValidationFolder","size":0,"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/OpenProjectConnectionValidationFolder","cTag":"\"c:{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},0\"","commentSettings":{"commentingDisabled":{"isDisabled":false}},"createdBy":{"application":{"displayName":"OP
Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"lastModifiedBy":{"application":{"displayName":"OP Auth","id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff"},"user":{"displayName":"SharePoint
App"}},"parentReference":{"driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","driveType":"documentLibrary","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","sharepointIds":{"listId":"87d67c02-fdaf-4504-8b39-920984585ad7","listItemUniqueId":"458e6945-3722-40b1-946f-4743a2d480f2","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff","siteUrl":"https://ymt6d.sharepoint.com/sites/OPTest","tenantId":"4d44bf36-9b56-45c0-8807-bbf386dd047f","webId":"6af246f0-e3be-45ef-b91a-8eca4dcc5d8f"}},"fileSystemInfo":{"createdDateTime":"2025-04-09T16:01:58Z","lastModifiedDateTime":"2025-04-09T16:01:58Z"},"folder":{"childCount":0,"view":{"sortBy":"name","sortOrder":"ascending","viewType":"thumbnails"}},"shared":{"scope":"unknown"}}'
@@ -124,7 +124,7 @@ http_interactions:
uri: https://graph.microsoft.com/v1.0/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root/children
body:
encoding: UTF-8
- string: '{"name":"ConnectionValidatorFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
+ string: '{"name":"OpenProjectConnectionValidationFolder","folder":{},"@microsoft.graph.conflictBehavior":"fail"}'
headers:
Content-Type:
- application/json
@@ -206,8 +206,8 @@ http_interactions:
encoding: UTF-8
string: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)","value":[{"@odata.etag":"\"{14A012EF-8F6E-4AA3-B137-F12EC82C13C2},2\"","createdBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP
Auth"},"user":{"displayName":"SharePoint App"}},"id":"01ANJ53W7PCKQBI3UPUNFLCN7RF3ECYE6C","lastModifiedBy":{"application":{"id":"b8a5bb54-5fb2-4e0e-9427-9d24dbac32ff","displayName":"OP
- Auth"},"user":{"displayName":"SharePoint App"}},"name":"ConnectionValidatorFolder","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello
- AMPF","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/ConnectionValidatorFolder","fileSystemInfo":{"createdDateTime":"2025-04-09T16:01:58Z","lastModifiedDateTime":"2025-04-09T16:01:58Z"},"folder":{"childCount":0},"size":0}]}'
+ Auth"},"user":{"displayName":"SharePoint App"}},"name":"OpenProjectConnectionValidationFolder","parentReference":{"driveType":"documentLibrary","driveId":"b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs","id":"01ANJ53W56Y2GOVW7725BZO354PWSELRRZ","name":"Marcello
+ AMPF","path":"/drives/b!dmVLG22QlE2PSW0AqVB7UOhZ8n7tjkVGkgqLNnuw2OBb-brzKzZAR4DYT1k9KPXs/root:","siteId":"1099e315-d0c7-47c7-8640-aa9504b70fff"},"webUrl":"https://ymt6d.sharepoint.com/sites/OPTest/Marcello%20AMPF/OpenProjectConnectionValidationFolder","fileSystemInfo":{"createdDateTime":"2025-04-09T16:01:58Z","lastModifiedDateTime":"2025-04-09T16:01:58Z"},"folder":{"childCount":0},"size":0}]}'
recorded_at: Wed, 09 Apr 2025 16:01:58 GMT
- request:
method: delete