From c9cb3a1bad2b50c4e9bc34a6ff22fbba27e536fa Mon Sep 17 00:00:00 2001 From: siarhei_hrabko Date: Tue, 19 Dec 2023 18:52:28 +0300 Subject: [PATCH] EPMRPP-87515 merge conflicts with organizations --- project-properties.gradle | 144 +++++++++--------- .../dao/ProjectUserRepositoryTest.java | 5 +- 2 files changed, 77 insertions(+), 72 deletions(-) diff --git a/project-properties.gradle b/project-properties.gradle index 12a41c18e..2ec012230 100755 --- a/project-properties.gradle +++ b/project-properties.gradle @@ -9,79 +9,81 @@ project.ext { dependencyRepos = ["commons", "commons-rules", "commons-model", "commons-bom"] releaseMode = project.hasProperty("releaseMode") scriptsUrl = commonScriptsUrl + (releaseMode ? getProperty('scripts.version') : 'master') - migrationsUrl = migrationsScriptsUrl + (releaseMode ? getProperty('migrations.version') : 'feature/settings') + migrationsUrl = migrationsScriptsUrl + (releaseMode ? getProperty('migrations.version') : 'EPMRPP-57515') //TODO refactor with archive download testScriptsSrc = [ - (migrationsUrl + '/migrations/0_extensions.up.sql') : 'V001__extensions.sql', - (migrationsUrl + '/migrations/1_initialize_schema.up.sql') : 'V002__initialize_schema.sql', - (migrationsUrl + '/migrations/3_default_data.up.sql') : 'V003__default_data.sql', - (migrationsUrl + '/migrations/4_size_limitations.up.sql') : 'V004__size_limitations.sql', - (migrationsUrl + '/migrations/5_test_case_id_type.up.sql') : 'V005__test_case_id_type.sql', - (migrationsUrl + '/migrations/6_retries_handling.up.sql') : 'V006__retries_handling.sql', - (migrationsUrl + '/migrations/7_auth_integration.up.sql') : 'V007__auth_integration.sql', - (migrationsUrl + '/migrations/8_sender_case_enabled_field.up.sql') : 'V008__sender_case_enabled_field.sql', - (migrationsUrl + '/migrations/9_analyzer_params.up.sql') : 'V009__analyzer_params.sql', - (migrationsUrl + '/migrations/10_attachment_size.up.sql') : 'V010__attachment_size.sql', - (migrationsUrl + '/migrations/11_password_encoding.up.sql') : 'V011__password_encoding.sql', - (migrationsUrl + '/migrations/12_remove_ticket_duplicates.up.sql') : 'V012__remove_ticket_duplicates.sql', - (migrationsUrl + '/migrations/13_add_allocated_storage_per_project.up.sql'): 'V013__add_allocated_storage_per_project.sql', - (migrationsUrl + '/migrations/14_test_case_id_size_increase.up.sql') : 'V014__test_case_id_size_increase.sql', - (migrationsUrl + '/migrations/15_statistics_decreasing.up.sql') : 'V015__statistics_decreasing.sql', - (migrationsUrl + '/migrations/16_remove_unused_indexes.up.sql') : 'V016__remove_unused_indexes.sql', - (migrationsUrl + '/migrations/17_status_enum_extension.up.sql') : 'V017__status_enum_extension.sql', - (migrationsUrl + '/migrations/18_job_attributes.up.sql') : 'V018__job_attributes.sql', - (migrationsUrl + '/migrations/19_retries_handling_extension.up.sql') : 'V019__retries_handling_extension.sql', - (migrationsUrl + '/migrations/20_deep_merge_statistics_handling.up.sql') : 'V020__deep_merge_statistics_handling.sql', - (migrationsUrl + '/migrations/21_deep_merge_retries_fix.up.sql') : 'V021__deep_merge_retries_fix.sql', - (migrationsUrl + '/migrations/22_deep_merge_nested_steps_fix.up.sql') : 'V022__deep_merge_nested_steps_fix.sql', - (migrationsUrl + '/migrations/23_rerun_item_statistics_fix.up.sql') : 'V023__rerun_item_statistics_fix.sql', - (migrationsUrl + '/migrations/24_widget_views_cleanup.up.sql') : 'V024__widget_views_cleanup.sql', - (migrationsUrl + '/migrations/25_deep_merge_nested_steps_path_fix.up.sql') : 'V025__deep_merge_nested_steps_path_fix.sql', - (migrationsUrl + '/migrations/26_retries_lock_fix.up.sql') : 'V026__retries_lock_fix.sql', - (migrationsUrl + '/migrations/27_add_project_id_log.up.sql') : 'V027__add_project_id_log.sql', - (migrationsUrl + '/migrations/28_create_log_project_idx.up.sql') : 'V028__create_log_project_idx.sql', - (migrationsUrl + '/migrations/29_create_table_item_project.up.sql') : 'V029__create_table_item_project.sql', - (migrationsUrl + '/migrations/30_item_project_fill_part1.up.sql') : 'V030__item_project_fill_part1.sql', - (migrationsUrl + '/migrations/31_item_project_fill_part2.up.sql') : 'V031__item_project_fill_part2.sql', - (migrationsUrl + '/migrations/32_create_item_idx.up.sql') : 'V032__create_item_idx.sql', - (migrationsUrl + '/migrations/33_drop_log_message_trgm_idx.up.sql') : 'V033__drop_log_message_trgm_idx.sql', - (migrationsUrl + '/migrations/34_fill_project_id_part1.up.sql') : 'V034__fill_project_id_part1.sql', - (migrationsUrl + '/migrations/35_fill_project_id_part2.up.sql') : 'V035__fill_project_id_part2.sql', - (migrationsUrl + '/migrations/36_drop_item_project.up.sql') : 'V036__drop_item_project.sql', - (migrationsUrl + '/migrations/37_create_log_message_trgm_idx.up.sql') : 'V037__create_log_message_trgm_idx.sql', - (migrationsUrl + '/migrations/38_add_not_null_log_project_id.up.sql') : 'V038__add_not_null_log_project_id.sql', - (migrationsUrl + '/migrations/39_attachment_creation_date.up.sql') : 'V039__attachment_creation_date.sql', - // NTV instead V for avoid transaction wrapping from flyway(workaround, to avoid psql specific error) - (migrationsUrl + '/migrations/40_attachment_creation_date_fill.up.sql') : 'NTV040__attachment_creation_date_fill.sql', - (migrationsUrl + '/migrations/41_attachment_creation_date_not_null.up.sql'): 'V041__attachment_creation_date_not_null.sql', - (migrationsUrl + '/migrations/42_shedlock_table.up.sql') : 'V042__shedlock_table.sql', - (migrationsUrl + '/migrations/43_attachment_for_deletion_table.up.sql') : 'V043__attachment_for_deletion_table.sql', - (migrationsUrl + '/migrations/44_remove_triggers.up.sql') : 'V044__remove_triggers.sql', - (migrationsUrl + '/migrations/45_add_jobs_indexes.up.sql') : 'V045__add_jobs_indexes.sql', - (migrationsUrl + '/migrations/46_job_values_bound.up.sql') : 'V046__job_values_bound.sql', - (migrationsUrl + '/migrations/48_composite_attribute.up.sql') : 'V048__composite_attribute.sql', - (migrationsUrl + '/migrations/51_cluster.up.sql') : 'V051__cluster.sql', - (migrationsUrl + '/migrations/52_analyzer_search_attribute.up.sql') : 'V052__analyzer_search_attribute.sql', - (migrationsUrl + '/migrations/54_analyzer_unique_error_attribute.up.sql') : 'V054__analyzer_unique_error_attribute.sql', - (migrationsUrl + '/migrations/58_alter_ticket.up.sql') : 'V058__alter_ticket.sql', - (migrationsUrl + '/migrations/59_stale_materialized_view.up.sql') : 'V059__stale_materialized_view.sql', - (migrationsUrl + '/migrations/60_sender_case_operator.up.sql') : 'V060__sender_case_operator.sql', - (migrationsUrl + '/migrations/61_remove_acl.up.sql') : 'V061__remove_acl.sql', - (migrationsUrl + '/migrations/62_remove_dashboard_cascade_drop.up.sql') : 'V062__remove_dashboard_cascade_drop.sql', - (migrationsUrl + '/migrations/65_launch_attribute_rules_length.up.sql') : 'V065__launch_attribute_rules_length.sql', - (migrationsUrl + '/migrations/67_api_keys.up.sql') : 'V067__api_keys.sql', - (migrationsUrl + '/migrations/68_api_key_last_used_at.up.sql') : 'V068__api_key_last_used_at.sql', - (migrationsUrl + '/migrations/69_replace_activity_table.up.sql') : 'V069__replace_activity_table.sql', - (migrationsUrl + '/migrations/71_user_bid_inviting_user_id.up.sql') : 'V071__user_bid_inviting_user_id.sql', - (migrationsUrl + '/migrations/72_add_attachment_name.up.sql') : 'V072__add_attachment_name.sql', - (migrationsUrl + '/migrations/73_sender_case_rule_name.up.sql') : 'V073__sender_case_rule_name.sql', - (migrationsUrl + '/migrations/76_user_bid_extension.up.sql') : 'V076__user_bid_extension.sql', - (migrationsUrl + '/migrations/77_email_server_documentation_link.up.sql') : 'V077__email_server_documentation_link.sql', - (migrationsUrl + '/migrations/78_drop_redundant_index.up.sql') : 'V078__drop_redundant_index.sql', - (migrationsUrl + '/migrations/64_add_organization_user_ref.up.sql') : 'V064__64_add_organization_user_ref.up.sql', - (migrationsUrl + '/migrations/64_add_organization_user_ref.up.sql') : 'V064__64_add_organization_user_ref.up.sql', - (migrationsUrl + '/migrations/65_organization_slug_project_key.up.sql') : 'V065__65_organization_slug_project_key.up.sql', - (migrationsUrl + '/migrations/67_remove_customer_and_operator_roles.up.sql') : 'V067__remove_customer_and_operator_roles.up.sql', + (migrationsUrl + '/migrations/0_extensions.up.sql') : 'V001__extensions.sql', + (migrationsUrl + '/migrations/1_initialize_schema.up.sql') : 'V002__initialize_schema.sql', + (migrationsUrl + '/migrations/3_default_data.up.sql') : 'V003__default_data.sql', + (migrationsUrl + '/migrations/4_size_limitations.up.sql') : 'V004__size_limitations.sql', + (migrationsUrl + '/migrations/5_test_case_id_type.up.sql') : 'V005__test_case_id_type.sql', + (migrationsUrl + '/migrations/6_retries_handling.up.sql') : 'V006__retries_handling.sql', + (migrationsUrl + '/migrations/7_auth_integration.up.sql') : 'V007__auth_integration.sql', + (migrationsUrl + '/migrations/8_sender_case_enabled_field.up.sql') : 'V008__sender_case_enabled_field.sql', + (migrationsUrl + '/migrations/9_analyzer_params.up.sql') : 'V009__analyzer_params.sql', + (migrationsUrl + '/migrations/10_attachment_size.up.sql') : 'V010__attachment_size.sql', + (migrationsUrl + '/migrations/11_password_encoding.up.sql') : 'V011__password_encoding.sql', + (migrationsUrl + '/migrations/12_remove_ticket_duplicates.up.sql') : 'V012__remove_ticket_duplicates.sql', + (migrationsUrl + '/migrations/13_add_allocated_storage_per_project.up.sql') : 'V013__add_allocated_storage_per_project.sql', + (migrationsUrl + '/migrations/14_test_case_id_size_increase.up.sql') : 'V014__test_case_id_size_increase.sql', + (migrationsUrl + '/migrations/15_statistics_decreasing.up.sql') : 'V015__statistics_decreasing.sql', + (migrationsUrl + '/migrations/16_remove_unused_indexes.up.sql') : 'V016__remove_unused_indexes.sql', + (migrationsUrl + '/migrations/17_status_enum_extension.up.sql') : 'V017__status_enum_extension.sql', + (migrationsUrl + '/migrations/18_job_attributes.up.sql') : 'V018__job_attributes.sql', + (migrationsUrl + '/migrations/19_retries_handling_extension.up.sql') : 'V019__retries_handling_extension.sql', + (migrationsUrl + '/migrations/20_deep_merge_statistics_handling.up.sql') : 'V020__deep_merge_statistics_handling.sql', + (migrationsUrl + '/migrations/21_deep_merge_retries_fix.up.sql') : 'V021__deep_merge_retries_fix.sql', + (migrationsUrl + '/migrations/22_deep_merge_nested_steps_fix.up.sql') : 'V022__deep_merge_nested_steps_fix.sql', + (migrationsUrl + '/migrations/23_rerun_item_statistics_fix.up.sql') : 'V023__rerun_item_statistics_fix.sql', + (migrationsUrl + '/migrations/24_widget_views_cleanup.up.sql') : 'V024__widget_views_cleanup.sql', + (migrationsUrl + '/migrations/25_deep_merge_nested_steps_path_fix.up.sql') : 'V025__deep_merge_nested_steps_path_fix.sql', + (migrationsUrl + '/migrations/26_retries_lock_fix.up.sql') : 'V026__retries_lock_fix.sql', + (migrationsUrl + '/migrations/27_add_project_id_log.up.sql') : 'V027__add_project_id_log.sql', + (migrationsUrl + '/migrations/28_create_log_project_idx.up.sql') : 'V028__create_log_project_idx.sql', + (migrationsUrl + '/migrations/29_create_table_item_project.up.sql') : 'V029__create_table_item_project.sql', + (migrationsUrl + '/migrations/30_item_project_fill_part1.up.sql') : 'V030__item_project_fill_part1.sql', + (migrationsUrl + '/migrations/31_item_project_fill_part2.up.sql') : 'V031__item_project_fill_part2.sql', + (migrationsUrl + '/migrations/32_create_item_idx.up.sql') : 'V032__create_item_idx.sql', + (migrationsUrl + '/migrations/33_drop_log_message_trgm_idx.up.sql') : 'V033__drop_log_message_trgm_idx.sql', + (migrationsUrl + '/migrations/34_fill_project_id_part1.up.sql') : 'V034__fill_project_id_part1.sql', + (migrationsUrl + '/migrations/35_fill_project_id_part2.up.sql') : 'V035__fill_project_id_part2.sql', + (migrationsUrl + '/migrations/36_drop_item_project.up.sql') : 'V036__drop_item_project.sql', + (migrationsUrl + '/migrations/37_create_log_message_trgm_idx.up.sql') : 'V037__create_log_message_trgm_idx.sql', + (migrationsUrl + '/migrations/38_add_not_null_log_project_id.up.sql') : 'V038__add_not_null_log_project_id.sql', + (migrationsUrl + '/migrations/39_attachment_creation_date.up.sql') : 'V039__attachment_creation_date.sql', + // NTV instead V for avoid transaction wrapping from flyway(workaround, to avoid psql specific error) + (migrationsUrl + '/migrations/40_attachment_creation_date_fill.up.sql') : 'NTV040__attachment_creation_date_fill.sql', + (migrationsUrl + '/migrations/41_attachment_creation_date_not_null.up.sql') : 'V041__attachment_creation_date_not_null.sql', + (migrationsUrl + '/migrations/42_shedlock_table.up.sql') : 'V042__shedlock_table.sql', + (migrationsUrl + '/migrations/43_attachment_for_deletion_table.up.sql') : 'V043__attachment_for_deletion_table.sql', + (migrationsUrl + '/migrations/44_remove_triggers.up.sql') : 'V044__remove_triggers.sql', + (migrationsUrl + '/migrations/45_add_jobs_indexes.up.sql') : 'V045__add_jobs_indexes.sql', + (migrationsUrl + '/migrations/46_job_values_bound.up.sql') : 'V046__job_values_bound.sql', + (migrationsUrl + '/migrations/48_composite_attribute.up.sql') : 'V048__composite_attribute.sql', + (migrationsUrl + '/migrations/51_cluster.up.sql') : 'V051__cluster.sql', + (migrationsUrl + '/migrations/52_analyzer_search_attribute.up.sql') : 'V052__analyzer_search_attribute.sql', + (migrationsUrl + '/migrations/54_analyzer_unique_error_attribute.up.sql') : 'V054__analyzer_unique_error_attribute.sql', + (migrationsUrl + '/migrations/58_alter_ticket.up.sql') : 'V058__alter_ticket.sql', + (migrationsUrl + '/migrations/59_stale_materialized_view.up.sql') : 'V059__stale_materialized_view.sql', + (migrationsUrl + '/migrations/60_sender_case_operator.up.sql') : 'V060__sender_case_operator.sql', + (migrationsUrl + '/migrations/61_remove_acl.up.sql') : 'V061__remove_acl.sql', + (migrationsUrl + '/migrations/62_remove_dashboard_cascade_drop.up.sql') : 'V062__remove_dashboard_cascade_drop.sql', + (migrationsUrl + '/migrations/65_launch_attribute_rules_length.up.sql') : 'V065__launch_attribute_rules_length.sql', + (migrationsUrl + '/migrations/67_api_keys.up.sql') : 'V067__api_keys.sql', + (migrationsUrl + '/migrations/68_api_key_last_used_at.up.sql') : 'V068__api_key_last_used_at.sql', + (migrationsUrl + '/migrations/69_replace_activity_table.up.sql') : 'V069__replace_activity_table.sql', + (migrationsUrl + '/migrations/71_user_bid_inviting_user_id.up.sql') : 'V071__user_bid_inviting_user_id.sql', + (migrationsUrl + '/migrations/72_add_attachment_name.up.sql') : 'V072__add_attachment_name.sql', + (migrationsUrl + '/migrations/73_sender_case_rule_name.up.sql') : 'V073__sender_case_rule_name.sql', + (migrationsUrl + '/migrations/76_user_bid_extension.up.sql') : 'V076__user_bid_extension.sql', + (migrationsUrl + '/migrations/77_email_server_documentation_link.up.sql') : 'V077__email_server_documentation_link.sql', + (migrationsUrl + '/migrations/78_drop_redundant_index.up.sql') : 'V078__drop_redundant_index.sql', + + (migrationsUrl + '/migrations/82_organization_tables.up.sql') : 'V082__organization_tables.up.sql', + (migrationsUrl + '/migrations/83_add_organization_user_ref.up.sql') : 'V083__add_organization_user_ref.up.sql', + (migrationsUrl + '/migrations/84_organization_migration.up.sql') : 'V084__organization_migration.up.sql', + (migrationsUrl + '/migrations/85_organization_slug_project_key.up.sql') : 'V085__organization_slug_project_key.up.sql', + (migrationsUrl + '/migrations/86_remove_customer_and_operator_roles.up.sql') : 'V086__add_organization_user_ref.up.sql' ] excludeTests = [ diff --git a/src/test/java/com/epam/ta/reportportal/dao/ProjectUserRepositoryTest.java b/src/test/java/com/epam/ta/reportportal/dao/ProjectUserRepositoryTest.java index 9f22e7dc6..401d7bae7 100644 --- a/src/test/java/com/epam/ta/reportportal/dao/ProjectUserRepositoryTest.java +++ b/src/test/java/com/epam/ta/reportportal/dao/ProjectUserRepositoryTest.java @@ -1,10 +1,13 @@ package com.epam.ta.reportportal.dao; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import com.epam.ta.reportportal.BaseTest; import com.epam.ta.reportportal.commons.ReportPortalUser; import com.epam.ta.reportportal.entity.project.ProjectRole; import java.util.Optional; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired;