katello 4.6.2.1 → 4.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/common/vendor.js +0 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
- data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +4 -4
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +5 -0
- data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/organizations_controller.rb +1 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +78 -12
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +7 -1
- data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +1 -0
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -9
- data/app/helpers/katello/content_source_helper.rb +9 -0
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +31 -0
- data/app/lib/actions/katello/activation_key/destroy.rb +1 -0
- data/app/lib/actions/katello/agent_action.rb +1 -0
- data/app/lib/actions/katello/alternate_content_source/create.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/update.rb +2 -2
- data/app/lib/actions/katello/capsule_content/sync.rb +10 -2
- data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
- data/app/lib/actions/katello/content_view/promote.rb +1 -0
- data/app/lib/actions/katello/content_view/publish.rb +5 -2
- data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +7 -3
- data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +4 -2
- data/app/lib/actions/katello/content_view_version/import.rb +22 -10
- data/app/lib/actions/katello/product/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/katello/repository/errata_mail.rb +9 -6
- data/app/lib/actions/katello/repository/refresh_repository.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +13 -6
- data/app/lib/actions/katello/repository_set/enable_repository.rb +6 -2
- data/app/lib/actions/pulp3/alternate_content_source/refresh_remote.rb +16 -0
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh.rb +1 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +10 -2
- data/app/lib/katello/concerns/renderer_extensions.rb +2 -1
- data/app/lib/katello/errors.rb +2 -2
- data/app/lib/katello/resources/candlepin.rb +7 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -13
- data/app/lib/katello/resources/cdn.rb +14 -9
- data/app/lib/katello/util/candlepin_repository_checker.rb +73 -0
- data/app/models/katello/activation_key.rb +12 -1
- data/app/models/katello/alternate_content_source.rb +15 -4
- data/app/models/katello/alternate_content_source_product.rb +1 -1
- data/app/models/katello/authorization/repository.rb +2 -2
- data/app/models/katello/cdn_configuration.rb +12 -3
- data/app/models/katello/concerns/host_managed_extensions.rb +15 -2
- data/app/models/katello/concerns/http_proxy_extensions.rb +5 -10
- data/app/models/katello/concerns/smart_proxy_extensions.rb +30 -15
- data/app/models/katello/content.rb +15 -0
- data/app/models/katello/content_credential.rb +8 -9
- data/app/models/katello/content_view.rb +7 -3
- data/app/models/katello/content_view_component.rb +4 -0
- data/app/models/katello/content_view_version.rb +1 -1
- data/app/models/katello/erratum.rb +6 -2
- data/app/models/katello/host/content_facet.rb +13 -3
- data/app/models/katello/repository.rb +15 -1
- data/app/models/katello/root_repository.rb +0 -2
- data/app/overrides/add_smart_proxy_form.rb +5 -0
- data/app/presenters/katello/content_view_version_compare_presenter.rb +5 -0
- data/app/presenters/katello/host_package_presenter.rb +4 -4
- data/app/services/katello/pulp3/alternate_content_source.rb +23 -15
- data/app/services/katello/pulp3/ansible_collection.rb +7 -10
- data/app/services/katello/pulp3/content_view_version/export.rb +19 -6
- data/app/services/katello/pulp3/content_view_version/import.rb +2 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +21 -5
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +11 -1
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +38 -9
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +12 -5
- data/app/services/katello/pulp3/content_view_version/metadata_map.rb +13 -2
- data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +5 -1
- data/app/services/katello/pulp3/pulp_content_unit.rb +3 -0
- data/app/services/katello/pulp3/repository.rb +18 -6
- data/app/services/katello/pulp3/repository_mirror.rb +0 -1
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
- data/app/services/katello/pulp3/task_group.rb +18 -1
- data/app/services/katello/repository_type.rb +5 -2
- data/app/services/katello/repository_type_manager.rb +4 -3
- data/app/views/dashboard/_content_views_widget.html.erb +1 -1
- data/app/views/foreman/job_templates/change_content_source.erb +6 -0
- data/app/views/foreman/job_templates/update_packages_by_search_query.erb +7 -1
- data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +4 -4
- data/app/views/katello/api/v2/alternate_content_sources/index.json.rabl +1 -0
- data/app/views/katello/api/v2/alternate_content_sources/permissions.rabl +11 -0
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +12 -0
- data/app/views/katello/api/v2/content_views/permissions.rabl +1 -0
- data/app/views/katello/api/v2/host_packages/base.json.rabl +1 -1
- data/app/views/katello/api/v2/module_streams/show.json.rabl +7 -0
- data/app/views/katello/api/v2/repositories/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +1 -0
- data/app/views/katello/hosts/_errata_counts.html.erb +46 -0
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +1 -0
- data/app/views/overrides/smart_proxies/_acs_http_proxy.html.erb +6 -0
- data/config/initializers/monkeys.rb +1 -0
- data/config/routes/api/v2.rb +2 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20220730033504_update_custom_cdn.rb +13 -0
- data/db/migrate/20220920173656_add_http_proxy_to_smart_proxy.rb +7 -0
- data/db/migrate/20220920180858_remove_http_proxy_from_katello_alternate_content_sources.rb +6 -0
- data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +5 -5
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credential.factory.js +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.routes.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-acs.controller.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-details.controller.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-acs.html +38 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-details.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +14 -1392
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -1
- data/lib/katello/permission_creator.rb +1 -0
- data/lib/katello/plugin.rb +34 -11
- data/lib/katello/repository_types/deb.rb +1 -1
- data/lib/katello/repository_types/docker.rb +1 -1
- data/lib/katello/repository_types/python.rb +3 -3
- data/lib/katello/tasks/check_candlepin_content.rake +16 -0
- data/lib/katello/tasks/reset.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/try_pulp_container_path.rb +35 -0
- data/locale/action_names.rb +7 -7
- data/locale/bn/katello.po +395 -63
- data/locale/cs/katello.po +396 -64
- data/locale/de/katello.po +399 -67
- data/locale/en/katello.po +395 -63
- data/locale/es/katello.po +399 -67
- data/locale/fr/katello.po +400 -68
- data/locale/gu/katello.po +395 -63
- data/locale/hi/katello.po +395 -63
- data/locale/it/katello.po +396 -64
- data/locale/ja/katello.po +400 -68
- data/locale/katello.pot +1916 -1213
- data/locale/kn/katello.po +395 -63
- data/locale/ko/katello.po +396 -64
- data/locale/mr/katello.po +395 -63
- data/locale/or/katello.po +395 -63
- data/locale/pa/katello.po +395 -63
- data/locale/pt/katello.po +395 -63
- data/locale/pt_BR/katello.po +399 -67
- data/locale/ru/katello.po +396 -64
- data/locale/ta/katello.po +395 -63
- data/locale/te/katello.po +395 -63
- data/locale/zh_CN/katello.po +400 -68
- data/locale/zh_TW/katello.po +396 -64
- data/webpack/components/Bookmark/index.js +5 -1
- data/webpack/components/Content/Details/ContentDetails.js +1 -1
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +6 -0
- data/webpack/components/EditableSwitch.js +1 -0
- data/webpack/components/EditableTextInput/EditableTextInput.js +3 -3
- data/webpack/components/Errata/errataHelpers.js +33 -0
- data/webpack/components/Errata/index.js +45 -12
- data/webpack/components/Loading.js +18 -8
- data/webpack/components/Packages/index.js +8 -24
- data/webpack/components/RoutedTabs/index.js +1 -0
- data/webpack/components/Search/Search.js +20 -2
- data/webpack/components/Search/__tests__/search.test.js +3 -3
- data/webpack/components/Table/EmptyStateMessage.js +1 -1
- data/webpack/components/Table/PageControls.js +1 -0
- data/webpack/components/Table/TableHooks.js +4 -0
- data/webpack/components/Table/TableWrapper.js +7 -7
- data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +1 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +2 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +3 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +2 -1
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +124 -68
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.scss +5 -0
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.js +30 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.scss +23 -0
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +5 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js +25 -10
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +3 -3
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +6 -0
- data/webpack/components/extensions/HostDetails/Cards/__tests__/errataOverviewCard.test.js +145 -32
- data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +3 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +2 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +78 -26
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +23 -10
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +9 -4
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +141 -23
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.scss +6 -1
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +9 -8
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +24 -3
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/EnableTracerModal.js +7 -2
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +2 -1
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +20 -4
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +56 -38
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +3 -3
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +5 -4
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +3 -3
- data/webpack/containers/Application/config.js +2 -2
- data/webpack/containers/Application/overrides.scss +12 -0
- data/webpack/global_test_setup.js +19 -1
- data/webpack/ouia_id_check.js +0 -2
- data/webpack/redux/actions/RedHatRepositories/helpers.js +4 -8
- data/webpack/scenes/AlternateContentSources/ACSActions.js +37 -6
- data/webpack/scenes/AlternateContentSources/ACSConstants.js +2 -0
- data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +1 -1
- data/webpack/scenes/AlternateContentSources/ACSSelectors.js +6 -6
- data/webpack/scenes/AlternateContentSources/Acs.scss +3 -0
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +24 -3
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +10 -8
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +25 -4
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSReview.js +22 -11
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +27 -2
- data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +49 -17
- data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +76 -23
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +159 -11
- data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +83 -29
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +9 -8
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +2 -2
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +2 -2
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +39 -7
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +27 -11
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +58 -55
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js +35 -32
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +323 -150
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsIndex.fixtures.json +5 -1
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +10 -11
- data/webpack/scenes/AlternateContentSources/helpers.js +26 -0
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +1 -0
- data/webpack/scenes/ContentViews/ContentViewsPage.js +1 -1
- data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +1 -0
- data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +1 -0
- data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +10 -5
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +30 -7
- data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +1 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +21 -6
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +3 -3
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignActivationKeysForm.js +1 -0
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +1 -0
- data/webpack/scenes/ContentViews/Delete/__tests__/CvData.fixtures.json +2 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +4 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +1 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +14 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +11 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +1 -1
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +5 -0
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositorySelection.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +8 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +22 -6
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +19 -9
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +9 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +9 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +8 -2
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +3 -2
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -2
- data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReviewEnvironments.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.js +9 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +83 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +32 -8
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +56 -3
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/cvCompareRepositories.fixtures.json +175 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +6 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +4 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +5 -4
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +5 -1
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -3
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +10 -5
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +2 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +81 -19
- data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +1 -1
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -0
- data/webpack/scenes/ContentViews/components/InactiveText.js +9 -1
- data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +4 -2
- data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +3 -2
- data/webpack/scenes/Hosts/ChangeContentSource/actions.js +18 -11
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +15 -8
- data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +3 -4
- data/webpack/scenes/Hosts/ChangeContentSource/components/Hosts.js +55 -0
- data/webpack/scenes/Hosts/ChangeContentSource/components/HostsModal.js +59 -0
- data/webpack/scenes/Hosts/ChangeContentSource/constants.js +1 -0
- data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -5
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +46 -41
- data/webpack/scenes/Hosts/ChangeContentSource/selectors.js +5 -5
- data/webpack/scenes/ModuleStreams/Details/ModuleDetailsSchema.js +10 -1
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +1 -1
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +97 -2
- data/webpack/scenes/Organizations/OrganizationSelectors.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnConfigurationConstants.js +2 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +10 -25
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +154 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/ExportSyncForm.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js +59 -44
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CdnTypeForm.test.js +3 -28
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CustomCdnTypeForm.test.js +97 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/ExportSyncForm.test.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/NetworkSyncForm.test.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/index.js +23 -10
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +2 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +5 -5
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +3 -3
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +3 -3
- data/webpack/scenes/Tasks/helpers.js +14 -7
- metadata +54 -35
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh_remote.rb +0 -18
- data/db/migrate/20221206170122_update_ignore_srpm_to_false_for_mirror_complete.rb +0 -5
- data/vendor/assets/javascripts/katello/jquery.trunk8.js +0 -203
@@ -1,16 +1,32 @@
|
|
1
1
|
import React, { useContext } from 'react';
|
2
2
|
import { translate as __ } from 'foremanReact/common/I18n';
|
3
|
-
import {
|
3
|
+
import {
|
4
|
+
Alert,
|
5
|
+
ClipboardCopy,
|
6
|
+
Grid,
|
7
|
+
GridItem,
|
8
|
+
Form,
|
9
|
+
FormGroup,
|
10
|
+
FormSelect,
|
11
|
+
FormSelectOption,
|
12
|
+
Tile,
|
13
|
+
} from '@patternfly/react-core';
|
14
|
+
import { FormattedMessage } from 'react-intl';
|
4
15
|
import ACSCreateContext from '../ACSCreateContext';
|
5
16
|
import WizardHeader from '../../../ContentViews/components/WizardHeader';
|
6
17
|
|
7
18
|
const SelectSource = () => {
|
8
19
|
const {
|
9
|
-
acsType, setAcsType, contentType, setContentType,
|
20
|
+
acsType, setAcsType, contentType, setContentType, setAuthentication,
|
10
21
|
} = useContext(ACSCreateContext);
|
11
22
|
|
12
23
|
const onSelect = (event) => {
|
13
24
|
setAcsType(event.currentTarget.id);
|
25
|
+
if (event.currentTarget.id === 'rhui') {
|
26
|
+
setAuthentication('content_credentials');
|
27
|
+
} else {
|
28
|
+
setAuthentication('');
|
29
|
+
}
|
14
30
|
};
|
15
31
|
const onKeyDown = (event) => {
|
16
32
|
if (event.key === ' ' || event.key === 'Enter') {
|
@@ -19,16 +35,21 @@ const SelectSource = () => {
|
|
19
35
|
}
|
20
36
|
};
|
21
37
|
|
22
|
-
const typeOptions = [
|
23
|
-
|
24
|
-
{ value: 'file', label: __('File') }
|
25
|
-
|
38
|
+
const typeOptions = [{ value: 'yum', label: __('Yum') }];
|
39
|
+
if (acsType !== 'rhui') {
|
40
|
+
typeOptions.push({ value: 'file', label: __('File') });
|
41
|
+
}
|
26
42
|
|
27
43
|
return (
|
28
44
|
<>
|
29
45
|
<WizardHeader
|
30
46
|
title={__('Select source type')}
|
31
|
-
description={__('
|
47
|
+
description={__('Alternate content sources define new locations to download content from at repository or smart proxy sync time.')}
|
48
|
+
/>
|
49
|
+
<FormattedMessage
|
50
|
+
className="acs-blurb"
|
51
|
+
id="acs-blurb"
|
52
|
+
defaultMessage={__('Content will be synced from the alternate content source first, then the original source if the ACS is not reachable.')}
|
32
53
|
/>
|
33
54
|
<Form>
|
34
55
|
<FormGroup
|
@@ -37,28 +58,47 @@ const SelectSource = () => {
|
|
37
58
|
fieldId="source_type"
|
38
59
|
isRequired
|
39
60
|
>
|
40
|
-
<
|
41
|
-
<
|
61
|
+
<Grid hasGutter>
|
62
|
+
<GridItem span={4} rowSpan={2}>
|
42
63
|
<Tile
|
43
64
|
title={__('Custom')}
|
44
65
|
isStacked
|
45
66
|
id="custom"
|
46
67
|
onClick={onSelect}
|
47
68
|
onKeyDown={onKeyDown}
|
69
|
+
style={{ height: '100%' }}
|
48
70
|
isSelected={acsType === 'custom'}
|
49
|
-
|
50
|
-
|
51
|
-
|
71
|
+
>
|
72
|
+
{__('Define repositories structured under a common web or filesystem path.')}
|
73
|
+
</Tile>
|
74
|
+
</GridItem>
|
75
|
+
<GridItem span={4} rowSpan={2}>
|
52
76
|
<Tile
|
53
77
|
title={__('Simplified')}
|
54
78
|
isStacked
|
55
79
|
id="simplified"
|
56
80
|
onClick={onSelect}
|
57
81
|
onKeyDown={onKeyDown}
|
82
|
+
style={{ height: '100%' }}
|
58
83
|
isSelected={acsType === 'simplified'}
|
59
|
-
|
60
|
-
|
61
|
-
|
84
|
+
>
|
85
|
+
{__('Sync smart proxy content directly from upstream repositories by selecting the desired products.')}
|
86
|
+
</Tile>
|
87
|
+
</GridItem>
|
88
|
+
<GridItem span={4} rowSpan={2}>
|
89
|
+
<Tile
|
90
|
+
title={__('RHUI')}
|
91
|
+
isStacked
|
92
|
+
id="rhui"
|
93
|
+
onClick={onSelect}
|
94
|
+
onKeyDown={onKeyDown}
|
95
|
+
style={{ height: '100%' }}
|
96
|
+
isSelected={acsType === 'rhui'}
|
97
|
+
>
|
98
|
+
{__('Define RHUI repository paths with guided steps.')}
|
99
|
+
</Tile>
|
100
|
+
</GridItem>
|
101
|
+
</Grid>
|
62
102
|
</FormGroup>
|
63
103
|
<FormGroup
|
64
104
|
label={__('Content type')}
|
@@ -68,6 +108,7 @@ const SelectSource = () => {
|
|
68
108
|
>
|
69
109
|
<FormSelect
|
70
110
|
isRequired
|
111
|
+
isDisabled={acsType === 'rhui'}
|
71
112
|
value={contentType}
|
72
113
|
onChange={(value) => {
|
73
114
|
setContentType(value);
|
@@ -75,16 +116,28 @@ const SelectSource = () => {
|
|
75
116
|
aria-label="FormSelect Input"
|
76
117
|
>
|
77
118
|
{
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
119
|
+
typeOptions.map(option => (
|
120
|
+
<FormSelectOption
|
121
|
+
key={option.value}
|
122
|
+
value={option.value}
|
123
|
+
label={option.label}
|
124
|
+
/>
|
125
|
+
))
|
126
|
+
}
|
86
127
|
</FormSelect>
|
87
128
|
</FormGroup>
|
129
|
+
{acsType === 'rhui' &&
|
130
|
+
<>
|
131
|
+
<Alert variant="info" title={__('Generate RHUI certificates for the desired repositories as necessary.')} />
|
132
|
+
<ClipboardCopy hoverTip="Copy" clickTip="Copied" variant="inline-compact" isBlock>
|
133
|
+
rhui-manager client cert --name rhui-acs-certs --days 365 --dir /root
|
134
|
+
--repo_label rhui-repo-1,rhui-repo-2
|
135
|
+
</ClipboardCopy>
|
136
|
+
<a href="/content_credentials">
|
137
|
+
{__('Create content credentials with the generated SSL certificate and key.')}
|
138
|
+
</a>
|
139
|
+
</>
|
140
|
+
}
|
88
141
|
</Form>
|
89
142
|
</>
|
90
143
|
);
|
@@ -9,7 +9,7 @@ import contentCredentialResult from './contentCredentials.fixtures';
|
|
9
9
|
import smartProxyResult from './smartProxy.fixtures';
|
10
10
|
import productsResult from './products.fixtures.json';
|
11
11
|
|
12
|
-
const withACSRoute = component => <Route path="/
|
12
|
+
const withACSRoute = component => <Route path="/alternate_content_sources/">{component}</Route>;
|
13
13
|
const ACSIndexPath = api.getApiUrl('/alternate_content_sources');
|
14
14
|
const ACSCreatePath = api.getApiUrl('/alternate_content_sources');
|
15
15
|
const contentCredentialPath = api.getApiUrl('/content_credentials');
|
@@ -28,6 +28,7 @@ const createCustomACSDetails = {
|
|
28
28
|
content_type: 'yum',
|
29
29
|
alternate_content_source_type: 'custom',
|
30
30
|
verify_ssl: false,
|
31
|
+
use_http_proxies: false,
|
31
32
|
ssl_ca_cert_id: '',
|
32
33
|
};
|
33
34
|
|
@@ -38,6 +39,20 @@ const createSimplifiedACSDetails = {
|
|
38
39
|
product_ids: [340, 19, 341],
|
39
40
|
content_type: 'yum',
|
40
41
|
alternate_content_source_type: 'simplified',
|
42
|
+
use_http_proxies: false,
|
43
|
+
};
|
44
|
+
|
45
|
+
const createRHUIACSDetails = {
|
46
|
+
name: 'acs_rhui_test',
|
47
|
+
description: '',
|
48
|
+
base_url: 'https://test_url.com/',
|
49
|
+
subpaths: ['test/repo1/', 'test/repo2/'],
|
50
|
+
smart_proxy_names: ['centos7-katello-devel-stable.example.com'],
|
51
|
+
content_type: 'yum',
|
52
|
+
alternate_content_source_type: 'rhui',
|
53
|
+
verify_ssl: false,
|
54
|
+
use_http_proxies: false,
|
55
|
+
ssl_ca_cert_id: '',
|
41
56
|
};
|
42
57
|
|
43
58
|
const noResults = {
|
@@ -46,11 +61,12 @@ const noResults = {
|
|
46
61
|
page: 1,
|
47
62
|
per_page: 20,
|
48
63
|
results: [],
|
64
|
+
can_create: true,
|
49
65
|
};
|
50
66
|
|
51
67
|
const renderOptions = {
|
52
68
|
routerParams: {
|
53
|
-
initialEntries: [{ pathname: '/
|
69
|
+
initialEntries: [{ pathname: '/alternate_content_sources/' }],
|
54
70
|
},
|
55
71
|
};
|
56
72
|
|
@@ -66,7 +82,7 @@ afterEach(() => {
|
|
66
82
|
assertNockRequest(autoSearchScope);
|
67
83
|
});
|
68
84
|
|
69
|
-
test('Can show add ACS button', async (done) => {
|
85
|
+
test('Can show add ACS button if can_create is true', async (done) => {
|
70
86
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
71
87
|
const scope = nockInstance
|
72
88
|
.get(ACSIndexPath)
|
@@ -83,11 +99,31 @@ test('Can show add ACS button', async (done) => {
|
|
83
99
|
act(done);
|
84
100
|
});
|
85
101
|
|
102
|
+
test('Can hide add ACS button if can_create is false', async (done) => {
|
103
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
104
|
+
noResults.can_create = false;
|
105
|
+
const scope = nockInstance
|
106
|
+
.get(ACSIndexPath)
|
107
|
+
.query(true)
|
108
|
+
.reply(200, noResults);
|
109
|
+
|
110
|
+
const { queryByText } = renderWithRedux(<ACSTable />);
|
111
|
+
|
112
|
+
expect(queryByText("You currently don't have any alternate content sources.")).toBeNull();
|
113
|
+
await patientlyWaitFor(() => expect(queryByText("You currently don't have any alternate content sources.")).toBeInTheDocument());
|
114
|
+
expect(queryByText('Add source')).not.toBeInTheDocument();
|
115
|
+
noResults.can_create = true;
|
116
|
+
assertNockRequest(autocompleteScope);
|
117
|
+
assertNockRequest(scope);
|
118
|
+
act(done);
|
119
|
+
});
|
120
|
+
|
86
121
|
test('Can display create wizard and create custom ACS', async (done) => {
|
87
122
|
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
88
123
|
const scope = nockInstance
|
89
124
|
.get(ACSIndexPath)
|
90
125
|
.query(true)
|
126
|
+
.times(2)
|
91
127
|
.reply(200, noResults);
|
92
128
|
|
93
129
|
const contentCredentialScope = nockInstance
|
@@ -121,21 +157,24 @@ test('Can display create wizard and create custom ACS', async (done) => {
|
|
121
157
|
// First step: Select source
|
122
158
|
await patientlyWaitFor(() => {
|
123
159
|
expect(getByText('Add an alternate content source')).toBeInTheDocument();
|
124
|
-
expect(queryByText('
|
160
|
+
expect(queryByText('Alternate content sources define new locations to download content from at repository or smart proxy sync time.')).toBeInTheDocument();
|
125
161
|
});
|
126
162
|
|
127
|
-
//
|
163
|
+
// Check that next is disabled until type is selected
|
164
|
+
expect(getByText('Next')).toHaveAttribute('disabled');
|
128
165
|
fireEvent.click(getByText('Custom'));
|
129
|
-
|
166
|
+
expect(getByText('Next')).not.toHaveAttribute('disabled');
|
130
167
|
// Go to next step: Name source
|
131
168
|
fireEvent.click(getByText('Next'));
|
132
169
|
|
133
170
|
await patientlyWaitFor(() => {
|
134
171
|
expect(getByText('Enter a name for your source.')).toBeInTheDocument();
|
135
172
|
});
|
173
|
+
// Check that next is disabled until name is entered
|
174
|
+
expect(getByText('Next')).toHaveAttribute('disabled');
|
136
175
|
// Enter Name
|
137
176
|
fireEvent.change(getByLabelText('acs_name_field'), { target: { value: 'acs_test' } });
|
138
|
-
|
177
|
+
expect(getByText('Next')).not.toHaveAttribute('disabled');
|
139
178
|
// Mock smart proxy selector to go to next page
|
140
179
|
const useSmartProxySelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
141
180
|
useSmartProxySelectorMock.mockReturnValue(smartProxyResult);
|
@@ -143,11 +182,25 @@ test('Can display create wizard and create custom ACS', async (done) => {
|
|
143
182
|
await patientlyWaitFor(() => {
|
144
183
|
expect(getByText('centos7-katello-devel-stable.example.com')).toBeInTheDocument();
|
145
184
|
});
|
185
|
+
|
186
|
+
// Check that next is disabled until proxies are selected
|
187
|
+
expect(getByText('Next')).toHaveAttribute('disabled');
|
146
188
|
fireEvent.click(getByLabelText('Add all'));
|
147
189
|
useSmartProxySelectorMock.mockRestore();
|
148
190
|
// Go to URL and subpath step
|
149
191
|
fireEvent.click(getByText('Next'));
|
150
192
|
|
193
|
+
// Check that next is disabled until URL is entered
|
194
|
+
expect(getByText('Next')).toHaveAttribute('disabled');
|
195
|
+
|
196
|
+
// Test url/subpath validations
|
197
|
+
fireEvent.change(getByLabelText('acs_base_url_field'), { target: { value: 'ivalidUrlWithoutProtocol' } });
|
198
|
+
expect(getByText('http://, https:// or file://')).toBeInTheDocument();
|
199
|
+
fireEvent.change(getByLabelText('acs_subpath_field'), { target: { value: 'invalid/noTrailingSlash' } });
|
200
|
+
expect(getByText('Comma-separated list of subpaths. All subpaths must have a slash at the end and none at the front.')).toBeInTheDocument();
|
201
|
+
// Test that next is still diabled with invalid values
|
202
|
+
expect(getByText('Next')).toHaveAttribute('disabled');
|
203
|
+
|
151
204
|
fireEvent.change(getByLabelText('acs_base_url_field'), { target: { value: 'https://test_url.com/' } });
|
152
205
|
expect(getByLabelText('acs_base_url_field')).toHaveAttribute('value', 'https://test_url.com/');
|
153
206
|
fireEvent.change(getByLabelText('acs_subpath_field'), { target: { value: 'test/repo1/,test/repo2/' } });
|
@@ -166,7 +219,100 @@ test('Can display create wizard and create custom ACS', async (done) => {
|
|
166
219
|
fireEvent.change(getByLabelText('acs_password_field'), { target: { value: 'password' } });
|
167
220
|
useContentCredentialSelectorMock.mockRestore();
|
168
221
|
fireEvent.click(getByText('Next'));
|
169
|
-
|
222
|
+
const addAcsButton = getAllByRole('button', { name: 'Add' })[0];
|
223
|
+
fireEvent.click(addAcsButton);
|
224
|
+
|
225
|
+
assertNockRequest(autocompleteScope);
|
226
|
+
assertNockRequest(scope);
|
227
|
+
assertNockRequest(contentCredentialScope);
|
228
|
+
assertNockRequest(productScope);
|
229
|
+
assertNockRequest(smartProxyScope);
|
230
|
+
assertNockRequest(createScope, done);
|
231
|
+
act(done);
|
232
|
+
});
|
233
|
+
|
234
|
+
test('Can display create wizard and create RHUI ACS', async (done) => {
|
235
|
+
const autocompleteScope = mockAutocomplete(nockInstance, autocompleteUrl);
|
236
|
+
const scope = nockInstance
|
237
|
+
.get(ACSIndexPath)
|
238
|
+
.query(true)
|
239
|
+
.times(2)
|
240
|
+
.reply(200, noResults);
|
241
|
+
|
242
|
+
const contentCredentialScope = nockInstance
|
243
|
+
.get(contentCredentialPath)
|
244
|
+
.query(true)
|
245
|
+
.reply(200, contentCredentialResult);
|
246
|
+
|
247
|
+
const productScope = nockInstance
|
248
|
+
.get(productsPath)
|
249
|
+
.query(true)
|
250
|
+
.reply(200, productsResult);
|
251
|
+
|
252
|
+
const smartProxyScope = nockInstance
|
253
|
+
.get(smartProxyPath)
|
254
|
+
.query(true)
|
255
|
+
.reply(200, smartProxyResult);
|
256
|
+
|
257
|
+
const createScope = nockInstance
|
258
|
+
.post(ACSCreatePath, createRHUIACSDetails)
|
259
|
+
.reply(201, { id: 22 });
|
260
|
+
|
261
|
+
const {
|
262
|
+
getByLabelText, getByText, getAllByRole, queryByText,
|
263
|
+
} = renderWithRedux(withACSRoute(<ACSTable />), renderOptions);
|
264
|
+
|
265
|
+
expect(queryByText("You currently don't have any alternate content sources.")).toBeNull();
|
266
|
+
await patientlyWaitFor(() => expect(queryByText("You currently don't have any alternate content sources.")).toBeInTheDocument());
|
267
|
+
expect(queryByText('Add source')).toBeInTheDocument();
|
268
|
+
fireEvent.click(getByText('Add source'));
|
269
|
+
|
270
|
+
// First step: Select source
|
271
|
+
await patientlyWaitFor(() => {
|
272
|
+
expect(getByText('Add an alternate content source')).toBeInTheDocument();
|
273
|
+
expect(getByText('Alternate content sources define new locations to download content from at repository or smart proxy sync time.')).toBeInTheDocument();
|
274
|
+
});
|
275
|
+
|
276
|
+
// Choose ACS type, content_type defaults to yum
|
277
|
+
fireEvent.click(getByText('RHUI'));
|
278
|
+
|
279
|
+
// Go to next step: Name source
|
280
|
+
fireEvent.click(getByText('Next'));
|
281
|
+
|
282
|
+
await patientlyWaitFor(() => {
|
283
|
+
expect(getByText('Enter a name for your source.')).toBeInTheDocument();
|
284
|
+
});
|
285
|
+
// Enter Name
|
286
|
+
fireEvent.change(getByLabelText('acs_name_field'), { target: { value: 'acs_rhui_test' } });
|
287
|
+
|
288
|
+
// Mock smart proxy selector to go to next page
|
289
|
+
const useSmartProxySelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
290
|
+
useSmartProxySelectorMock.mockReturnValue(smartProxyResult);
|
291
|
+
fireEvent.click(getByText('Next'));
|
292
|
+
await patientlyWaitFor(() => {
|
293
|
+
expect(getByText('centos7-katello-devel-stable.example.com')).toBeInTheDocument();
|
294
|
+
});
|
295
|
+
fireEvent.click(getByLabelText('Add all'));
|
296
|
+
useSmartProxySelectorMock.mockRestore();
|
297
|
+
// Go to URL and subpath step
|
298
|
+
fireEvent.click(getByText('Next'));
|
299
|
+
|
300
|
+
fireEvent.change(getByLabelText('acs_base_url_field'), { target: { value: 'https://test_url.com/' } });
|
301
|
+
expect(getByLabelText('acs_base_url_field')).toHaveAttribute('value', 'https://test_url.com/');
|
302
|
+
fireEvent.change(getByLabelText('acs_subpath_field'), { target: { value: 'test/repo1/,test/repo2/' } });
|
303
|
+
|
304
|
+
// Mock content credential data
|
305
|
+
const useContentCredentialSelectorMock = jest.spyOn(reactRedux, 'useSelector');
|
306
|
+
useContentCredentialSelectorMock.mockReturnValue(contentCredentialResult.results);
|
307
|
+
fireEvent.click(getByText('Next'));
|
308
|
+
expect(queryByText('Manual authentication')).not.toBeInTheDocument();
|
309
|
+
expect(queryByText('Content credentials')).toBeInTheDocument();
|
310
|
+
const noAuthRadio = getAllByRole('radio', { name: 'None' })[0];
|
311
|
+
fireEvent.click(noAuthRadio);
|
312
|
+
useContentCredentialSelectorMock.mockRestore();
|
313
|
+
fireEvent.click(getByText('Next'));
|
314
|
+
const addAcsButton = getAllByRole('button', { name: 'Add' })[0];
|
315
|
+
fireEvent.click(addAcsButton);
|
170
316
|
|
171
317
|
assertNockRequest(autocompleteScope);
|
172
318
|
assertNockRequest(scope);
|
@@ -182,6 +328,7 @@ test('Can display create wizard and create simplified ACS', async (done) => {
|
|
182
328
|
const scope = nockInstance
|
183
329
|
.get(ACSIndexPath)
|
184
330
|
.query(true)
|
331
|
+
.times(2)
|
185
332
|
.reply(200, noResults);
|
186
333
|
|
187
334
|
const contentCredentialScope = nockInstance
|
@@ -204,7 +351,7 @@ test('Can display create wizard and create simplified ACS', async (done) => {
|
|
204
351
|
.reply(201, { id: 22 });
|
205
352
|
|
206
353
|
const {
|
207
|
-
getByLabelText, getByText, queryByText,
|
354
|
+
getByLabelText, getByText, queryByText, getAllByRole,
|
208
355
|
} = renderWithRedux(withACSRoute(<ACSTable />), renderOptions);
|
209
356
|
|
210
357
|
expect(queryByText("You currently don't have any alternate content sources.")).toBeNull();
|
@@ -215,7 +362,7 @@ test('Can display create wizard and create simplified ACS', async (done) => {
|
|
215
362
|
// First step: Select source
|
216
363
|
await patientlyWaitFor(() => {
|
217
364
|
expect(getByText('Add an alternate content source')).toBeInTheDocument();
|
218
|
-
expect(queryByText('
|
365
|
+
expect(queryByText('Alternate content sources define new locations to download content from at repository or smart proxy sync time.')).toBeInTheDocument();
|
219
366
|
});
|
220
367
|
|
221
368
|
// Choose ACS type, content_type defaults to yum
|
@@ -244,7 +391,8 @@ test('Can display create wizard and create simplified ACS', async (done) => {
|
|
244
391
|
|
245
392
|
fireEvent.click(getByText('Next'));
|
246
393
|
useProductSelectorMock.mockClear();
|
247
|
-
|
394
|
+
const addAcsButton = getAllByRole('button', { name: 'Add' })[0];
|
395
|
+
fireEvent.click(addAcsButton);
|
248
396
|
|
249
397
|
assertNockRequest(autocompleteScope);
|
250
398
|
assertNockRequest(scope);
|