Ejemplo n.º 1
0
    def test_pre_manifest_scenario_refresh(self, request):
        """Before upgrade, upload & refresh the manifest.

        :id: preupgrade-29b246aa-2c7f-49f4-870a-7a0075e184b1

        :steps:
            1. Before Satellite upgrade, upload and refresh manifest.

        :expectedresults: Manifest should be uploaded and refreshed successfully.
        """
        org = entities.Organization(name=f"{request.node.name}_org").create()
        upload_manifest(settings.fake_manifest.url['default'], org.name)
        history = entities.Subscription(organization=org).manifest_history(
            data={'organization_id': org.id}
        )
        assert f"{org.name} file imported successfully." == history[0]['statusMessage']
        sub = entities.Subscription(organization=org)
        sub.refresh_manifest(data={'organization_id': org.id})
        assert len(sub.search()) > 0
Ejemplo n.º 2
0
    def test_pre_manifest_scenario_refresh(self):
        """Pre-upgrade scenario that upload and refresh manifest in satellite
         which will be refreshed in post upgrade scenario.


        :id: preupgrade-29b246aa-2c7f-49f4-870a-7a0075e184b1

        :steps:
            1. Before Satellite upgrade, upload and refresh manifest.

        :expectedresults: Manifest should upload and refresh successfully.
         """
        org = entities.Organization(name=self.org_name).create()
        upload_manifest(self.manifest_url, org.name)
        history = hammer.hammer('subscription manifest-history'
                                ' --organization {0}'.format(org.name))
        self.assertIn("{0} file imported successfully.".format(org.name),
                      history[0]['status message'])
        sub = entities.Subscription(organization=org)
        sub.refresh_manifest(data={'organization_id': org.id})
        self.assertGreater(len(sub.search()), 0)
Ejemplo n.º 3
0
    def test_pre_manifest_scenario_refresh(self):
        """Pre-upgrade scenario that upload and refresh manifest in satellite
         which will be refreshed in post upgrade scenario.


        :id: preupgrade-29b246aa-2c7f-49f4-870a-7a0075e184b1

        :steps:
            1. Before Satellite upgrade, upload and refresh manifest.

        :expectedresults: Manifest should upload and refresh successfully.
         """
        org = entities.Organization(name=self.org_name).create()
        upload_manifest(self.manifest_url, org.name)
        history = entities.Subscription(organization=org).manifest_history(
            data={'organization_id': org.id})
        self.assertEqual(
            "{0} file imported successfully.".format(org.name),
            history[0]['statusMessage'])
        sub = entities.Subscription(organization=org)
        sub.refresh_manifest(data={'organization_id': org.id})
        self.assertGreater(len(sub.search()), 0)