def test_positive_manifest_refresh(self): """upload manifest and refresh :id: 579bbbf7-11cf-4d78-a3b1-16d73bd4ca57 :expectedresults: Manifests can be refreshed :CaseImportance: Critical """ self._upload_manifest(self.org['id'], manifests.original_manifest()) Subscription.list({'organization-id': self.org['id']}, per_page=False) Subscription.refresh_manifest({'organization-id': self.org['id']}) Subscription.delete_manifest({'organization-id': self.org['id']})
def test_positive_manifest_refresh(function_org): """upload manifest and refresh :id: 579bbbf7-11cf-4d78-a3b1-16d73bd4ca57 :expectedresults: Manifests can be refreshed :CaseImportance: Critical """ upload_manifest(function_org.id, manifests.original_manifest().content) Subscription.list({'organization-id': function_org.id}, per_page=False) Subscription.refresh_manifest({'organization-id': function_org.id}) Subscription.delete_manifest({'organization-id': function_org.id})
def test_manifest_refresh(self): """@Test: upload manifest (positive) and refresh @Feature: Subscriptions/Manifest refresh @Assert: Manifests can be refreshed """ self._upload_manifest( manifests.download_manifest_template(), self.org['id']) result = Subscription.list( {'organization-id': self.org['id']}, per_page=False ) self.assertEqual(result.return_code, 0) self.assertEqual(len(result.stderr), 0) result = Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) self.assertEqual(result.return_code, 0) self.assertEqual(len(result.stderr), 0) result = Subscription.delete_manifest({ 'organization-id': self.org['id'], }) self.assertEqual(result.return_code, 0) self.assertEqual(len(result.stderr), 0)
def test_negative_manifest_refresh(self): """manifest refresh must fail with a cloned manifest @Feature: Subscriptions/Manifest refresh @Assert: the refresh command returns a non-zero return code @BZ: 1226425 """ self._upload_manifest(self.org['id']) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) with self.assertRaises(CLIReturnCodeError): Subscription.refresh_manifest({ 'organization-id': self.org['id'], })
def test_positive_manifest_refresh(self): """upload manifest and refresh @Feature: Subscriptions/Manifest refresh @Assert: Manifests can be refreshed """ self._upload_manifest(self.org['id'], manifests.original_manifest()) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) Subscription.delete_manifest({ 'organization-id': self.org['id'], })
def test_negative_manifest_refresh(self): """manifest refresh must fail with a cloned manifest @Feature: Subscriptions/Manifest refresh @Assert: the refresh command returns a non-zero return code @BZ: 1226425 """ self._upload_manifest(self.org['id']) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) with self.assertRaises(CLIReturnCodeError): Subscription.refresh_manifest({ 'organization-id': self.org['id'], })
def test_positive_manifest_refresh(self): """upload manifest and refresh @Feature: Subscriptions/Manifest refresh @Assert: Manifests can be refreshed """ self._upload_manifest( self.org['id'], manifests.original_manifest()) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) Subscription.delete_manifest({ 'organization-id': self.org['id'], })
def test_manifest_refresh(self): """@Test: upload manifest (positive) and refresh @Feature: Subscriptions/Manifest refresh @Assert: Manifests can be refreshed """ self._upload_manifest( manifests.download_manifest_template(), self.org['id']) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) Subscription.delete_manifest({ 'organization-id': self.org['id'], })
def test_positive_manifest_refresh(self): """upload manifest and refresh @id: 579bbbf7-11cf-4d78-a3b1-16d73bd4ca57 @Assert: Manifests can be refreshed """ self._upload_manifest( self.org['id'], manifests.original_manifest()) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) Subscription.delete_manifest({ 'organization-id': self.org['id'], })
def test_negative_manifest_refresh(self): """manifest refresh must fail with a cloned manifest :id: 7f40795f-7841-4063-8a43-de0325c92b1f :expectedresults: the refresh command returns a non-zero return code :BZ: 1226425 :CaseImportance: Critical """ self._upload_manifest(self.org['id']) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) with self.assertRaises(CLIReturnCodeError): Subscription.refresh_manifest({ 'organization-id': self.org['id'], })
def test_negative_manifest_refresh(self): """manifest refresh must fail with a cloned manifest :id: 7f40795f-7841-4063-8a43-de0325c92b1f :expectedresults: the refresh command returns a non-zero return code :BZ: 1226425 :CaseImportance: Critical """ self._upload_manifest(self.org['id']) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) with self.assertRaises(CLIReturnCodeError): Subscription.refresh_manifest({ 'organization-id': self.org['id'], })
def test_positive_manifest_refresh(self): """upload manifest and refresh :id: 579bbbf7-11cf-4d78-a3b1-16d73bd4ca57 :expectedresults: Manifests can be refreshed :CaseImportance: Critical """ self._upload_manifest( self.org['id'], manifests.original_manifest()) Subscription.list( {'organization-id': self.org['id']}, per_page=False, ) Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) Subscription.delete_manifest({ 'organization-id': self.org['id'], })
def test_manifest_refresh(self): """@Test: upload manifest (positive) and refresh @Feature: Subscriptions/Manifest refresh @Assert: Manifests can be refreshed @BZ 1147559 """ upload_file(self.manifest, remote_file=self.manifest) result = Subscription.upload({ 'file': self.manifest, 'organization-id': self.org['id'], }) self.assertEqual(result.return_code, 0, "return code must be 0, instead got {0}" ''.format(result.return_code)) self.assertEqual( len(result.stderr), 0, "There should not be an exception while uploading manifest.") result = Subscription.list( {'organization-id': self.org['id']}, per_page=False) self.assertEqual(result.return_code, 0, "return code must be 0, instead got {0}" ''.format(result.return_code)) self.assertEqual( len(result.stderr), 0, "There should not be an exception while listing the manifest.") self.assertGreater(len(result.stdout), 0) result = Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) self.assertEqual(result.return_code, 0, "return code must be 0, instead got {0}" ''.format(result.return_code)) self.assertEqual( len(result.stderr), 0, "There should not be an exception while refreshing the manifest .")
def test_manifest_refresh(self): """@Test: upload manifest (positive) and refresh @Feature: Subscriptions/Manifest refresh @Assert: Manifests can be refreshed """ upload_file(self.manifest, remote_file=self.manifest) result = Subscription.upload({ 'file': self.manifest, 'organization-id': self.org['id'], }) self.assertEqual(result.return_code, 0, "return code must be 0, instead got {0}" ''.format(result.return_code)) self.assertEqual( len(result.stderr), 0, "There should not be an exception while uploading manifest.") result = Subscription.list( {'organization-id': self.org['id']}, per_page=False) self.assertEqual(result.return_code, 0, "return code must be 0, instead got {0}" ''.format(result.return_code)) self.assertEqual( len(result.stderr), 0, "There should not be an exception while listing the manifest.") self.assertGreater(len(result.stdout), 0) result = Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) self.assertEqual(result.return_code, 0, "return code must be 0, instead got {0}" ''.format(result.return_code)) self.assertEqual( len(result.stderr), 0, "There should not be an exception while refreshing the manifest .")
def test_invalid_manifest_refresh(self): """@Test: manifest refresh must fail with a cloned manifest @Feature: Subscriptions/Manifest refresh @Assert: the refresh command returns a non-zero return code @BZ: 1226425 """ self._upload_manifest(self.manifest, self.org['id']) result = Subscription.list( {'organization-id': self.org['id']}, per_page=False ) self.assertEqual(result.return_code, 0) self.assertEqual(len(result.stderr), 0) result = Subscription.refresh_manifest({ 'organization-id': self.org['id'], }) self.assertNotEqual(result.return_code, 0) self.assertNotEqual(len(result.stderr), 0)