Search in sources :

Example 1 with Repo

use of rhsm.data.Repo in project rhsm-qe by RedHatQE.

the class SKULevelContentOverrideTests method testContentOverrideAtSKULevel.

@// update=true,	// uncomment to make TestDefinition changes update Polarion testcases through the polarize testcase importer
TestDefinition(projectID = { Project.RHEL6, Project.RedHatEnterpriseLinux7 }, testCaseID = { "RHEL6-37020", "RHEL7-54835" }, level = DefTypes.Level.COMPONENT, component = "subscription-manager", testtype = @TestType(testtype = DefTypes.TestTypes.FUNCTIONAL, subtype1 = DefTypes.Subtypes.RELIABILITY, subtype2 = DefTypes.Subtypes.EMPTY), posneg = PosNeg.POSITIVE, importance = DefTypes.Importance.HIGH, automation = DefTypes.Automation.AUTOMATED, tags = "Tier3")
@Test(description = "Verify content can be overriden at SKU level,content overriden at sku level can be enabled/disabled by using subscription-manager repos --enable/--disable commands and enabled repo is given prefrence over disabled repo", groups = { "Tier3Tests", "OverrideAtSKULevelTest", "blockedByBug-1403160" }, dataProvider = "getSubscriptions", enabled = true)
public void testContentOverrideAtSKULevel(Object Bugzilla, SubscriptionPool subscriptionpool) throws JSONException, Exception {
    String resourcePath = null;
    String requestBody = null;
    String consumerId = clienttasks.getCurrentConsumerId(clienttasks.register(sm_clientUsername, sm_clientPassword, sm_clientOrg, null, null, null, null, null, null, null, (String) null, null, null, null, true, null, null, null, null, null));
    String ownerKey = CandlepinTasks.getOwnerKeyOfConsumerId(sm_clientUsername, sm_clientPassword, sm_serverUrl, consumerId);
    clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
    List<Repo> availableRepos = clienttasks.getCurrentlySubscribedRepos();
    List<String> repoIdsDisabledByDefault = new ArrayList<String>();
    List<String> repoIdsEnabledbyDefault = new ArrayList<String>();
    Map<String, String> attributesMap = new HashMap<String, String>();
    String contentIDToEnable = "999999999999999";
    String contentIDToDisable = "00000000000000";
    // entitled by the subscriptionpool
    for (Repo repo : availableRepos) {
        if (repo.enabled) {
            repoIdsEnabledbyDefault.add(repo.repoId);
        } else {
            repoIdsDisabledByDefault.add(repo.repoId);
        }
    }
    log.info("VERIFICATION 1: Verify that adding a content id for a default disabled" + " repo to a content_override_enabled attribute at the SKU level will make the repo enabled for the consumer" + "To override(enable) a disabled repo");
    if (repoIdsDisabledByDefault.isEmpty()) {
        requestBody = CandlepinTasks.createContentRequestBody("fooname (DisabledByDefault)", contentIDToEnable, "foolabel_DisabledByDefault", "yum", "Foo Vendor", "/foo/path", "/foo/path/gpg", null, null, null, null).toString();
        resourcePath = "/content";
        if (SubscriptionManagerTasks.isVersion(servertasks.statusVersion, ">=", "2.0.0"))
            resourcePath = "/owners/" + ownerKey + resourcePath;
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        String productid = getPoolprovidedProducts(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, subscriptionpool.poolId, "productId");
        CandlepinTasks.addContentToProductUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey, productid, contentIDToEnable, false);
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
        clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
        availableRepos = clienttasks.getCurrentlySubscribedRepos();
        for (Repo repo : availableRepos) {
            if (!(repo.enabled)) {
                repoIdsDisabledByDefault.add(repo.repoId);
            }
        }
    }
    String repoIdToEnable = repoIdsDisabledByDefault.get(randomGenerator.nextInt(repoIdsDisabledByDefault.size()));
    String contentIdToEnable = getContent(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, repoIdToEnable);
    resourcePath = "/owners/" + ownerKey + "/products/" + subscriptionpool.productId + "?exclude=id&exclude=name&exclude=multiplier&exclude=productContent&exclude=dependentProductIds&exclude=href&exclude=created&exclude=updated&exclude=attributes.created&exclude=attributes.updated";
    JSONObject jsonPoolToEnable = new JSONObject(CandlepinTasks.getResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath));
    resourcePath = "/owners/" + ownerKey + "/products/" + subscriptionpool.productId;
    JSONArray jsonProductAttributesToEnable = jsonPoolToEnable.getJSONArray("attributes");
    JSONObject jsonDataToEnable = new JSONObject();
    attributesMap.clear();
    attributesMap.put("name", "content_override_enabled");
    attributesMap.put("value", contentIdToEnable);
    // WARNING: if jsonProductAttributesToEnable already contains an
    // attribute(s) with the name "content_override_enabled", then duplicate
    // attributes will get PUT on the SKU. That's bad. Candlepin should not
    // allow this, but it does. Avoid this by calling
    // purgeJSONObjectNamesFromJSONArray(...)
    jsonProductAttributesToEnable = purgeJSONObjectNamesFromJSONArray(jsonProductAttributesToEnable, "content_override_enabled");
    jsonProductAttributesToEnable.put(attributesMap);
    jsonDataToEnable.put("attributes", jsonProductAttributesToEnable);
    CandlepinTasks.putResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, jsonDataToEnable);
    CandlepinTasks.refreshPoolsUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey);
    clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
    clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
    Assert.assertTrue(clienttasks.repos_(null, true, null, (String) null, null, null, null, null, null).getStdout().contains(repoIdToEnable), "After subscribing to SKU '" + subscriptionpool.productId + "' pool '" + subscriptionpool.poolId + "' which contains a content_override_enabled for repoId '" + repoIdToEnable + "' (contentid='" + contentIdToEnable + "'), it now appears in the list of enabled subscription-manager repos.");
    log.info("VERIFICATION 2: Verify that the SKU level content_override_enabled" + "repo can be overridden back to disabled at on the consumer level" + " verify repo overridden at sku level can be overridden with subscription-manager repos --disable command");
    clienttasks.repos(null, null, null, null, repoIdToEnable, null, null, null, null);
    Assert.assertTrue(clienttasks.repos_(null, null, true, (String) null, null, null, null, null, null).getStdout().contains(repoIdToEnable), "After subscribing to SKU '" + subscriptionpool.productId + "' pool '" + subscriptionpool.poolId + "' which contains a content_override_enabled for repoId '" + repoIdToEnable + "' (contentid='" + contentIdToEnable + "'), it can be overriden again (at the consumer level) using subscription-manager repos --disable '" + repoIdToEnable + "'.");
    log.info("VERIFICATION 3: Verify that adding a content id for a default enabled repo to a content_override_disabled " + "attribute at the SKU level will make the repo disabled for the consumerTo override(disable) a enabled repo ");
    if (repoIdsEnabledbyDefault.isEmpty()) {
        requestBody = CandlepinTasks.createContentRequestBody("fooname (EnabledByDefault)", contentIDToDisable, "foolabel_EnabledByDefault", "yum", "Foo Vendor", "/foo/path", "/foo/path/gpg", null, null, null, null).toString();
        resourcePath = "/content";
        if (SubscriptionManagerTasks.isVersion(servertasks.statusVersion, ">=", "2.0.0"))
            resourcePath = "/owners/" + sm_clientOrg + resourcePath;
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        String productid = getPoolprovidedProducts(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, subscriptionpool.poolId, "productId");
        CandlepinTasks.addContentToProductUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey, productid, contentIDToDisable, true);
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
        clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
        availableRepos = clienttasks.getCurrentlySubscribedRepos();
        for (Repo repo : availableRepos) {
            if (repo.enabled) {
                repoIdsEnabledbyDefault.add(repo.repoId);
            }
        }
    }
    String repoIdToDisable = repoIdsEnabledbyDefault.get(randomGenerator.nextInt(repoIdsEnabledbyDefault.size()));
    String contentIdToDisable = getContent(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, repoIdToDisable);
    resourcePath = "/owners/" + ownerKey + "/products/" + subscriptionpool.productId + "?exclude=id&exclude=name&exclude=multiplier&exclude=productContent&exclude=dependentProductIds&exclude=href&exclude=created&exclude=updated&exclude=attributes.created&exclude=attributes.updated";
    JSONObject jsonPoolToDisable = new JSONObject(CandlepinTasks.getResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath));
    resourcePath = "/owners/" + ownerKey + "/products/" + subscriptionpool.productId;
    JSONArray jsonProductAttributesToDisable = jsonPoolToDisable.getJSONArray("attributes");
    attributesMap.clear();
    attributesMap.put("name", "content_override_disabled");
    attributesMap.put("value", contentIdToDisable);
    // WARNING: if jsonProductAttributesToEnable already contains an
    // attribute(s) with the name "content_override_disabled", then
    // duplicate attributes will get PUT on the SKU. That's bad. Candlepin
    // should not allow this, but it does. Avoid this by calling
    // purgeJSONObjectNamesFromJSONArray(...)
    jsonProductAttributesToDisable = purgeJSONObjectNamesFromJSONArray(jsonProductAttributesToDisable, "content_override_disabled");
    jsonProductAttributesToDisable.put(attributesMap);
    JSONObject jsonDataToDisable = new JSONObject();
    jsonDataToDisable.put("attributes", jsonProductAttributesToDisable);
    CandlepinTasks.putResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, jsonDataToDisable);
    CandlepinTasks.refreshPoolsUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey);
    clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
    clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
    Assert.assertTrue(clienttasks.repos_(null, null, true, (String) null, null, null, null, null, null).getStdout().contains(repoIdToDisable), "After subscribing to SKU '" + subscriptionpool.productId + "' pool '" + subscriptionpool.poolId + "' which contains a content_override_disabled for repoId '" + repoIdToDisable + "' (contentid='" + contentIdToDisable + "'), it now appears in the list of disabled subscription-manager repos.");
    log.info("VERIFICATION 4: Verify that the SKU level content_override_enabled repo can" + " be overridden back to enabled at on the consumer level");
    /*
		 * verify repo overridden at sku level can be overridden with
		 * subscription-manager repos --enable command
		 */
    clienttasks.repos(null, null, null, repoIdToDisable, null, null, null, null, null);
    Assert.assertTrue(clienttasks.repos_(null, true, null, (String) null, null, null, null, null, null).getStdout().contains(repoIdToDisable), "After subscribing to SKU '" + subscriptionpool.productId + "' pool '" + subscriptionpool.poolId + "' which contains a content_override_disabled for repoId '" + repoIdToDisable + "' (contentid='" + contentIdToDisable + "'), it can be overriden again (at the consumer level) using subscription-manager repos --enable '" + repoIdToDisable + "'.");
    // at this point we have two consumer level repo overrides - get rid of
    // them before proceeding to the next verification...
    clienttasks.repo_override(null, true, (String) null, (String) null, null, null, null, null, null);
    log.info("VERIFICATION 5: Verify that when the same content id exists on both the SKU level content_override_enabled " + "and content_override_disabled list, the enabled value takes precedence");
    clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
    clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
    attributesMap.clear();
    attributesMap.put("name", "content_override_disabled");
    attributesMap.put("value", contentIdToDisable);
    // WARNING: if jsonProductAttributesToEnable already contains an
    // attribute(s) with the name "content_override_disabled", then
    // duplicate attributes will get PUT on the SKU. That's bad. Candlepin
    // should not allow this, but it does. Avoid this by calling
    // purgeJSONObjectNamesFromJSONArray(...)
    jsonProductAttributesToDisable = purgeJSONObjectNamesFromJSONArray(jsonProductAttributesToDisable, "content_override_disabled");
    jsonProductAttributesToDisable.put(attributesMap);
    JSONObject jsonDataToOverrideDisabledContent = new JSONObject();
    jsonDataToOverrideDisabledContent.put("attributes", jsonProductAttributesToDisable);
    CandlepinTasks.putResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, jsonDataToOverrideDisabledContent);
    CandlepinTasks.refreshPoolsUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey);
    clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
    clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
    Assert.assertTrue(clienttasks.repos_(null, null, true, (String) null, null, null, null, null, null).getStdout().contains(repoIdToDisable), "After subscribing to SKU '" + subscriptionpool.productId + "' pool '" + subscriptionpool.poolId + "' which contains a content_override_disabled for repoId '" + repoIdToDisable + "' (contentid='" + contentIdToDisable + "'), it now appears in the list of disabled subscription-manager repos.");
    jsonProductAttributesToDisable = purgeJSONObjectNamesFromJSONArray(jsonProductAttributesToDisable, "content_override_enabled");
    jsonProductAttributesToDisable.put(attributesMap);
    jsonDataToOverrideDisabledContent.put("attributes", jsonProductAttributesToDisable);
    attributesMap.clear();
    attributesMap.put("name", "content_override_enabled");
    attributesMap.put("value", contentIdToDisable);
    jsonProductAttributesToDisable.put(attributesMap);
    jsonDataToOverrideDisabledContent.put("attributes", jsonProductAttributesToDisable);
    CandlepinTasks.putResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, jsonDataToOverrideDisabledContent);
    CandlepinTasks.refreshPoolsUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey);
    clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
    clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
    Assert.assertTrue(clienttasks.repos_(null, true, null, (String) null, null, null, null, null, null).getStdout().contains(repoIdToDisable), "After subscribing to SKU '" + subscriptionpool.productId + "' pool '" + subscriptionpool.poolId + "' which contains a content_override_enabed for repoId '" + repoIdToDisable + "' (contentid='" + contentIdToDisable + "'), it now appears in the list of enabled subscription-manager repos.");
    log.info("VERIFICATION 6: Verify that the content_override_enabled and content_override_disabled " + "list can specify a comma delimited string of content ids");
    String RepoId1 = null;
    String RepoId2 = null;
    String contentId1 = null;
    String contentId2 = null;
    if (!(repoIdsDisabledByDefault.isEmpty()) && repoIdsDisabledByDefault.size() >= 1) {
        requestBody = CandlepinTasks.createContentRequestBody("fooname (DisabledByDefault_1)", contentIDToEnable, "foolabel_DisabledByDefault_1", "yum", "Foo Vendor", "/foo/path", "/foo/path/gpg", null, null, null, null).toString();
        System.out.println("inside verification six if condition");
        resourcePath = "/content";
        if (SubscriptionManagerTasks.isVersion(servertasks.statusVersion, ">=", "2.0.0"))
            resourcePath = "/owners/" + ownerKey + resourcePath;
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        String productid = getPoolprovidedProducts(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, subscriptionpool.poolId, "productId");
        CandlepinTasks.addContentToProductUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey, productid, contentIDToEnable, false);
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        requestBody = CandlepinTasks.createContentRequestBody("fooname (DisabledByDefault_2)", contentIDToEnable + "1", "foolabel_DisabledByDefault_2", "yum", "Foo Vendor", "/foo/path", "/foo/path/gpg", null, null, null, null).toString();
        resourcePath = "/content";
        if (SubscriptionManagerTasks.isVersion(servertasks.statusVersion, ">=", "2.0.0"))
            resourcePath = "/owners/" + ownerKey + resourcePath;
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        productid = getPoolprovidedProducts(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, subscriptionpool.poolId, "productId");
        CandlepinTasks.addContentToProductUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey, productid, contentIDToEnable, false);
        CandlepinTasks.postResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, requestBody);
        clienttasks.unsubscribeFromAllOfTheCurrentlyConsumedProductSubscriptions();
        clienttasks.subscribe(null, null, subscriptionpool.poolId, null, null, null, null, null, null, null, null, null, null);
        availableRepos = clienttasks.getCurrentlySubscribedRepos();
        for (Repo repo : availableRepos) {
            if (!(repo.enabled)) {
                repoIdsDisabledByDefault.add(repo.repoId);
            }
        }
    }
    RepoId1 = repoIdsDisabledByDefault.get(repoIdsDisabledByDefault.size() - 1);
    RepoId2 = repoIdsDisabledByDefault.get(repoIdsDisabledByDefault.size() - 2);
    contentId1 = getContent(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, RepoId1);
    contentId2 = getContent(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, RepoId2);
    resourcePath = "/owners/" + ownerKey + "/products/" + subscriptionpool.productId + "?exclude=id&exclude=name&exclude=multiplier&exclude=productContent&exclude=dependentProductIds&exclude=href&exclude=created&exclude=updated&exclude=attributes.created&exclude=attributes.updated";
    JSONObject jsonPool = new JSONObject(CandlepinTasks.getResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath));
    resourcePath = "/owners/" + ownerKey + "/products/" + subscriptionpool.productId;
    JSONArray jsonProductAttributes = jsonPool.getJSONArray("attributes");
    jsonProductAttributes = purgeJSONObjectNamesFromJSONArray(jsonProductAttributesToEnable, "content_override_enabled");
    jsonDataToEnable = new JSONObject();
    attributesMap.clear();
    attributesMap.put("name", "content_override_enabled");
    attributesMap.put("value", contentId1 + "," + contentId2);
    // WARNING: if jsonProductAttributesToEnable already contains an //
    // attribute(s) with the name "content_override_enabled", then //
    // duplicate attributes will get PUT on the SKU. That's bad. //
    // Candlepin should not allow this, but it does. Avoid this by //
    // calling purgeJSONObjectNamesFromJSONArray(...)
    jsonProductAttributes.put(attributesMap);
    JSONObject jsonData = new JSONObject();
    jsonData.put("attributes", jsonProductAttributes);
    CandlepinTasks.putResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, resourcePath, jsonData);
    CandlepinTasks.refreshPoolsUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, ownerKey);
    String path = "/pools/" + subscriptionpool.poolId + "?include=productAttributes";
    String result = CandlepinTasks.getResourceUsingRESTfulAPI(sm_serverAdminUsername, sm_serverAdminPassword, sm_serverUrl, path);
    Assert.assertTrue(result.contains(contentId1) && result.contains(contentId2), "After overriding the content at SKU level '" + contentId2 + "' and '" + contentId2 + "'are present in the product attribute list of the pool");
}
Also used : Repo(rhsm.data.Repo) JSONObject(org.json.JSONObject) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) JSONArray(org.json.JSONArray) TestDefinition(com.github.redhatqe.polarize.metadata.TestDefinition) Test(org.testng.annotations.Test)

Example 2 with Repo

use of rhsm.data.Repo in project rhsm-qe by RedHatQE.

the class SearchDisabledReposTests method testRhelSubscriptionBaseAndOptionalReposAreAvailable.

@// update=true,	// uncomment to make TestDefinition changes update Polarion testcases through the polarize testcase importer
TestDefinition(projectID = { Project.RHEL6, Project.RedHatEnterpriseLinux7 }, testCaseID = { "RHEL6-20089", "RHEL7-55192" }, level = DefTypes.Level.COMPONENT, component = "subscription-manager", testtype = @TestType(testtype = DefTypes.TestTypes.FUNCTIONAL, subtype1 = DefTypes.Subtypes.RELIABILITY, subtype2 = DefTypes.Subtypes.EMPTY), posneg = PosNeg.POSITIVE, importance = DefTypes.Importance.HIGH, automation = DefTypes.Automation.AUTOMATED, tags = "Tier1")
@Test(description = "Verify that we can register with auto-subscribe to cover the base RHEL product cert; assert enablement of base rhel and optional repo", groups = { "Tier1Tests" }, priority = 20, enabled = true)
public // @ImplementsNitrateTest(caseId=)
void testRhelSubscriptionBaseAndOptionalReposAreAvailable() throws JSONException, Exception {
    // get the currently installed RHEL product cert
    ProductCert rhelProductCert = clienttasks.getCurrentRhelProductCert();
    Assert.assertNotNull(rhelProductCert, "Expecting a RHEL Product Cert to be installed.");
    log.info("RHEL product cert installed: " + rhelProductCert);
    // register with auto-subscribe
    clienttasks.register(sm_clientUsername, sm_clientPassword, sm_clientOrg, null, null, null, null, true, null, null, (String) null, null, null, null, true, null, null, null, null, null);
    // is rhelProductCert subscribed?
    InstalledProduct rhelInstalledProduct = InstalledProduct.findFirstInstanceWithMatchingFieldFromList("productId", rhelProductCert.productId, clienttasks.getCurrentlyInstalledProducts());
    if (!rhelInstalledProduct.status.equals("Subscribed") && sm_serverType.equals(CandlepinType.standalone))
        throw new SkipException("Skipping this test against a standalone Candlepin server that has no RHEL subscriptions available.");
    Assert.assertEquals(rhelInstalledProduct.status, "Subscribed", "Autosubscribed status of installed RHEL productId '" + rhelProductCert.productId + "'");
    // get the yum repos
    List<Repo> subscribedRepos = clienttasks.getCurrentlySubscribedRepos();
    // Enabled: 1
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("aarch64") && rhelProductCert.productId.equals("294")) /*Red Hat Enterprise Linux Server for ARM*/
    {
        rhelBaseRepoId = "rhel-7-for-arm-rpms";
    }
    // Enabled: 0
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("ppc64le") && rhelProductCert.productId.equals("279")) /*Red Hat Enterprise Linux for Power, little endian*/
    {
        rhelBaseRepoId = "rhel-7-for-power-le-rpms";
    }
    // Enabled: 1
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("ppc64")) {
        rhelBaseRepoId = "rhel-7-for-power-rpms";
    }
    // Enabled: 1
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("s390x")) {
        rhelBaseRepoId = "rhel-7-for-system-z-rpms";
    }
    // Enabled: 1
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("x86_64")) {
        rhelBaseRepoId = "rhel-7-server-rpms";
    }
    // Enabled: 1
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Client") && clienttasks.arch.equals("x86_64")) {
        rhelBaseRepoId = "rhel-7-desktop-rpms";
    }
    // Enabled: 1
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("ComputeNode") && clienttasks.arch.equals("x86_64")) {
        rhelBaseRepoId = "rhel-7-hpc-node-rpms";
    }
    // Enabled: 1
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Workstation") && clienttasks.arch.equals("x86_64")) {
        rhelBaseRepoId = "rhel-7-workstation-rpms";
    }
    // NOTE: BETA PRODUCT 362 AND GA PRODUCT 420 BOTH PROVIDE THE SAME TAGS "rhel-alt-7,rhel-alt-7-power9" WHICH MEANS THEY CAN ACCESS THE SAME CONTENT AND ARE EFFECTIVELY THE SAME PRODUCT (ASSUMING ALL POWER9 SKUS PROVIDE BOTH 362 AND 420)
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("ppc64le") && (rhelProductCert.productId.equals("362") || /*Red Hat Enterprise Linux for Power 9 Beta*/
    rhelProductCert.productId.equals("420"))) {
        rhelBaseRepoId = "rhel-7-for-power-9-rpms";
    }
    // NOTE: BETA PRODUCT 433 AND GA PRODUCT 434 BOTH PROVIDE THE SAME TAGS "rhel-alt-7,rhel-alt-7-system-z-a" WHICH MEANS THEY CAN ACCESS THE SAME CONTENT AND ARE EFFECTIVELY THE SAME PRODUCT (ASSUMING ALL SYSTEMZ SKUS PROVIDE BOTH 433 AND 434)
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("s390x") && (rhelProductCert.productId.equals("433") || /*Red Hat Enterprise Linux for IBM System z (Structure A) Beta*/
    rhelProductCert.productId.equals("434"))) {
        rhelBaseRepoId = "rhel-7-for-system-z-a-rpms";
    }
    // NOTE: BETA PRODUCT 363 AND GA PRODUCT 419 BOTH PROVIDE THE SAME TAGS "rhel-alt-7,rhel-alt-7-armv8-a" WHICH MEANS THEY CAN ACCESS THE SAME CONTENT AND ARE EFFECTIVELY THE SAME PRODUCT (ASSUMING ALL SYSTEMZ SKUS PROVIDE BOTH 363 AND 419)
    if (clienttasks.redhatReleaseX.equals("7") && clienttasks.variant.equals("Server") && clienttasks.arch.equals("aarch64") && (rhelProductCert.productId.equals("363") || /*Red Hat Enterprise Linux for ARM 64 Beta*/
    rhelProductCert.productId.equals("419"))) {
        rhelBaseRepoId = "rhel-7-for-arm-64-rpms";
    }
    // Repo ID:   rhel-6-server-optional-rpms
    if (clienttasks.redhatReleaseX.equals("6") && clienttasks.variant.equals("Server") && (clienttasks.arch.matches("i\\d86|x86_64"))) {
        rhelBaseRepoId = "rhel-6-server-rpms";
    }
    // Repo ID:   rhel-6-for-power-beta-rpms
    if (clienttasks.redhatReleaseX.equals("6") && clienttasks.variant.equals("Server") && (clienttasks.arch.equals("ppc64"))) {
        rhelBaseRepoId = "rhel-6-for-power-rpms";
    }
    // Repo ID:   rhel-6-for-system-z-beta-rpms
    if (clienttasks.redhatReleaseX.equals("6") && clienttasks.variant.equals("Server") && (clienttasks.arch.equals("s390x"))) {
        rhelBaseRepoId = "rhel-6-for-system-z-rpms";
    }
    // Repo ID:   rhel-6-desktop-optional-rpms
    if (clienttasks.redhatReleaseX.equals("6") && clienttasks.variant.equals("Client") && (clienttasks.arch.matches("i\\d86|x86_64"))) {
        rhelBaseRepoId = "rhel-6-desktop-rpms";
    }
    // Repo ID:   rhel-6-hpc-node-optional-rpms
    if (clienttasks.redhatReleaseX.equals("6") && clienttasks.variant.equals("ComputeNode") && (clienttasks.arch.equals("x86_64"))) {
        rhelBaseRepoId = "rhel-6-hpc-node-rpms";
    }
    // PLATFORM=RedHatEnterpriseLinux6-Workstation-x86_64
    if (clienttasks.redhatReleaseX.equals("6") && clienttasks.variant.equals("Workstation") && (clienttasks.arch.matches("i\\d86|x86_64"))) {
        rhelBaseRepoId = "rhel-6-workstation-rpms";
    }
    // predict the disabled optional repo and potential presence of other enabled repos
    if (rhelBaseRepoId != null) {
        rhelOptionalRepoId = rhelBaseRepoId.replaceFirst("-rpms$", "-optional-rpms");
        rhelEusRepoId = rhelBaseRepoId.replaceFirst("-rpms$", "-eus-rpms");
        rhelBetaRepoId = rhelBaseRepoId.replaceFirst("-rpms$", "-beta-rpms");
        rhelHtbRepoId = rhelBaseRepoId.replaceFirst("-rpms$", "-htb-rpms");
        rhelOptionalHtbRepoId = rhelBaseRepoId.replaceFirst("-rpms$", "-optional-htb-rpms");
    } else {
        Assert.fail("Additional automation development is needed in this test to predict the name of the enabled base RHEL repo for RHEL" + clienttasks.redhatReleaseX + " " + clienttasks.variant + " " + clienttasks.arch + "; Installed Product Cert: " + rhelProductCert);
    }
    // expected rhelBaseRepoId and rhelOptionalRepoId to the corresponding HTB repos
    if (rhelProductCert.productId.equals("230") || /*Red Hat Enterprise Linux 7 Server High Touch Beta*/
    rhelProductCert.productId.equals("231")) /*Red Hat Enterprise Linux 7 Workstation High Touch Beta)*/
    {
        log.info("Adjusting the expected base and optional repos because the default installed RHEL product appears to be High Touch Beta (this is expected for Snapshot composes).");
        rhelBaseRepoId = rhelHtbRepoId;
        rhelOptionalRepoId = rhelOptionalHtbRepoId;
    }
    // assert the base rhel repo is enabled by default
    Repo rhelBaseRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelBaseRepoId, subscribedRepos);
    Assert.assertNotNull(rhelBaseRepo, "RHEL base repo id '" + rhelBaseRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(rhelBaseRepo.enabled, "RHEL base repo id '" + rhelBaseRepoId + "' is enabled by default.");
    // assert the optional rhel repo is disabled by default
    Repo rhelOptionalRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelOptionalRepoId, subscribedRepos);
    Assert.assertNotNull(rhelOptionalRepo, "RHEL optional repo id '" + rhelOptionalRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(!rhelOptionalRepo.enabled, "RHEL optional repo id '" + rhelOptionalRepoId + "' is disabled by default.");
    // determine if beta rhel repo is entitled; if not then set it to null
    // assert the beta rhel repo is disabled by default
    Repo rhelBetaRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelBetaRepoId, subscribedRepos);
    if (rhelBetaRepo == null)
        rhelBetaRepoId = null;
    if (rhelBetaRepo != null)
        Assert.assertTrue(!rhelBetaRepo.enabled, "RHEL beta repo id '" + rhelBetaRepoId + "' is disabled by default.");
    // determine if htb rhel repo is entitled; if not then set it to null
    Repo rhelHtbRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelHtbRepoId, subscribedRepos);
    if (rhelHtbRepo == null)
        rhelHtbRepoId = null;
    // determine if optional htb rhel repo is entitled; if not then set it to null
    Repo rhelOptionalHtbRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelOptionalHtbRepoId, subscribedRepos);
    if (rhelOptionalHtbRepo == null)
        rhelOptionalHtbRepoId = null;
    // determine if eus rhel repo is entitled; if not then set it to null
    Repo rhelEusRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelEusRepoId, subscribedRepos);
    if (rhelEusRepo == null)
        rhelEusRepoId = null;
}
Also used : Repo(rhsm.data.Repo) InstalledProduct(rhsm.data.InstalledProduct) ProductCert(rhsm.data.ProductCert) SkipException(org.testng.SkipException) TestDefinition(com.github.redhatqe.polarize.metadata.TestDefinition) Test(org.testng.annotations.Test)

Example 3 with Repo

use of rhsm.data.Repo in project rhsm-qe by RedHatQE.

the class SearchDisabledReposTests method testWithNotifyOnlyOffVerifyYumSearchDisabledReposAssumingNoResponses.

@// update=true,	// uncomment to make TestDefinition changes update Polarion testcases through the polarize testcase importer
TestDefinition(projectID = { Project.RHEL6, Project.RedHatEnterpriseLinux7 }, testCaseID = { "RHEL6-22228", "RHEL7-55195" }, level = DefTypes.Level.COMPONENT, component = "subscription-manager", testtype = @TestType(testtype = DefTypes.TestTypes.FUNCTIONAL, subtype1 = DefTypes.Subtypes.RELIABILITY, subtype2 = DefTypes.Subtypes.EMPTY), posneg = PosNeg.POSITIVE, importance = DefTypes.Importance.HIGH, automation = DefTypes.Automation.AUTOMATED, tags = "Tier1")
@Test(description = "verify user is prompted to search disabled repos to complete an applicable yum install transaction when notify_only=0 is configured in /etc/yum/pluginconf.d/search-disabled-repos.conf and proceed with --assumeno responses", groups = { "Tier1Tests", "blockedByBug-1232232", "blockedByBug-1268376", "blockedByBug-1512948" }, dependsOnMethods = { "testRhelSubscriptionBaseAndOptionalReposAreAvailable" }, priority = 40, enabled = true)
public // @ImplementsNitrateTest(caseId=)
void testWithNotifyOnlyOffVerifyYumSearchDisabledReposAssumingNoResponses() {
    // make sure rhelBasePackage and rhelOptionalPackage are not installed
    if (clienttasks.isPackageInstalled(rhelOptionalPackage))
        clienttasks.yumRemovePackage(rhelOptionalPackage);
    if (clienttasks.isPackageInstalled(rhelBasePackage))
        clienttasks.yumRemovePackage(rhelBasePackage);
    // manually turn off notify_only 0
    clienttasks.updateConfFileParameter(clienttasks.yumPluginConfFileForSearchDisabledRepos, "notify_only", "0");
    // enable rhelOptionalRepoId and disable rhelBaseRepoId
    clienttasks.repos(null, null, null, rhelOptionalRepoId, rhelBaseRepoId, null, null, null, null);
    // attempt to install a package that requires another package from a disabled repo
    String disablerepos = "--disablerepo=beaker-*";
    if (!rhelBaseRepoId.endsWith("-beta-rpms") && !rhelOptionalRepoId.endsWith("-beta-rpms"))
        disablerepos += " --disablerepo=*-beta-rpms";
    if (!rhelBaseRepoId.endsWith("-htb-rpms") && !rhelOptionalRepoId.endsWith("-htb-rpms"))
        disablerepos += " --disablerepo=*-htb-rpms";
    if (!rhelBaseRepoId.endsWith("-eus-rpms") && !rhelOptionalRepoId.endsWith("-eus-rpms"))
        disablerepos += " --disablerepo=*-eus-rpms";
    // disable any other repos that might be enabled to prevent  // rhel-7-server-eus-rpms
    SSHCommandResult result = clienttasks.yumDoPackageFromRepo_("install", rhelOptionalPackage, null, "--assumeno " + disablerepos);
    // 2015-10-26 15:54:03.983  FINE: ssh root@jsefler-7.usersys.redhat.com yum -y install ghostscript-devel --disableplugin=rhnplugin --assumeno --disablerepo=*eus-rpms
    // 2015-10-26 15:54:10.443  FINE: Stdout:
    // Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
    // : manager
    // Resolving Dependencies
    // --> Running transaction check
    // ---> Package ghostscript-devel.x86_64 0:9.07-18.el7 will be installed
    // --> Processing Dependency: ghostscript = 9.07-18.el7 for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Processing Dependency: libgs.so.9()(64bit) for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Finished Dependency Resolution
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: libgs.so.9()(64bit)
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: ghostscript = 9.07-18.el7
    // **********************************************************************
    // Dependency resolving failed due to missing dependencies.
    // Some repositories on your system are disabled, but yum can enable them
    // and search for missing dependencies. This will require downloading
    // metadata for disabled repositories and may take some time and traffic.
    // **********************************************************************
    // 
    // You could try using --skip-broken to work around the problem
    // ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
    // redhat-access-insights-1.0.6-0.el7.noarch has missing requires of libcgroup-tools
    // 
    // 2015-10-26 15:54:10.469  FINE: Stderr:
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: libgs.so.9()(64bit)
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: ghostscript = 9.07-18.el7
    // 
    // 2015-10-26 15:54:10.475  FINE: ExitCode: 1
    // assert results
    Assert.assertEquals(result.getExitCode(), Integer.valueOf(1), "Exit code from attempt to install '" + rhelOptionalPackage + "'.");
    String requiresMessage = "Requires: " + rhelBasePackage;
    Assert.assertTrue(result.getStderr().contains(requiresMessage), "Stderr from attempt to install '" + rhelOptionalPackage + "' contains the require message:\n" + requiresMessage);
    String searchDisabledReposMessage = StringUtils.join(new String[] { "**********************************************************************", "Dependency resolving failed due to missing dependencies.", "Some repositories on your system are disabled, but yum can enable them", "and search for missing dependencies. This will require downloading", "metadata for disabled repositories and may take some time and traffic.", "**********************************************************************" }, "\n");
    Assert.assertTrue(result.getStdout().contains(searchDisabledReposMessage), "Stdout from attempt to install '" + rhelOptionalPackage + "' contains the prompt message:\n" + searchDisabledReposMessage);
    // confirm that the packages are not installed
    Assert.assertTrue(!clienttasks.isPackageInstalled(rhelOptionalPackage), "Package '" + rhelOptionalPackage + "' is NOT installed.");
    Assert.assertTrue(!clienttasks.isPackageInstalled(rhelBasePackage), "Package '" + rhelBasePackage + "' is NOT installed.");
    // confirm the repo enablement has not changed
    List<Repo> subscribedRepos = clienttasks.getCurrentlySubscribedRepos();
    // assert the base rhel repo is disabled
    Repo rhelBaseRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelBaseRepoId, subscribedRepos);
    Assert.assertNotNull(rhelBaseRepo, "RHEL base repo id '" + rhelBaseRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(!rhelBaseRepo.enabled, "RHEL base repo id '" + rhelBaseRepoId + "' is disabled.");
    // assert the optional rhel repo is enabled
    Repo rhelOptionalRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelOptionalRepoId, subscribedRepos);
    Assert.assertNotNull(rhelOptionalRepo, "RHEL optional repo id '" + rhelOptionalRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(rhelOptionalRepo.enabled, "RHEL optional repo id '" + rhelOptionalRepoId + "' is enabled.");
}
Also used : Repo(rhsm.data.Repo) SSHCommandResult(com.redhat.qe.tools.SSHCommandResult) TestDefinition(com.github.redhatqe.polarize.metadata.TestDefinition) Test(org.testng.annotations.Test)

Example 4 with Repo

use of rhsm.data.Repo in project rhsm-qe by RedHatQE.

the class SearchDisabledReposTests method testWithNotifyOnlyOffVerifyYumSearchDisabledReposWithYesNoResponses.

@// update=true,	// uncomment to make TestDefinition changes update Polarion testcases through the polarize testcase importer
TestDefinition(projectID = { Project.RHEL6, Project.RedHatEnterpriseLinux7 }, testCaseID = { "RHEL6-22231", "RHEL7-55198" }, level = DefTypes.Level.COMPONENT, component = "subscription-manager", testtype = @TestType(testtype = DefTypes.TestTypes.FUNCTIONAL, subtype1 = DefTypes.Subtypes.RELIABILITY, subtype2 = DefTypes.Subtypes.EMPTY), posneg = PosNeg.POSITIVE, importance = DefTypes.Importance.HIGH, automation = DefTypes.Automation.AUTOMATED, tags = "Tier1")
@Test(description = "verify user is prompted to search disabled repos to complete an applicable yum install transaction when notify_only=0 is configured in /etc/yum/pluginconf.d/search-disabled-repos.conf and proceed with yes response to search disabled repos and no to the install prompt", groups = { "Tier1Tests", "blockedByBug-1232232", "blockedByBug-1268376", "blockedByBug-1512948" }, dependsOnMethods = { "testRhelSubscriptionBaseAndOptionalReposAreAvailable" }, priority = 70, enabled = true)
public // @ImplementsNitrateTest(caseId=)
void testWithNotifyOnlyOffVerifyYumSearchDisabledReposWithYesNoResponses() {
    // make sure rhelBasePackage and rhelOptionalPackage are not installed
    if (clienttasks.isPackageInstalled(rhelOptionalPackage))
        clienttasks.yumRemovePackage(rhelOptionalPackage);
    if (clienttasks.isPackageInstalled(rhelBasePackage))
        clienttasks.yumRemovePackage(rhelBasePackage);
    // manually turn off notify_only 0
    clienttasks.updateConfFileParameter(clienttasks.yumPluginConfFileForSearchDisabledRepos, "notify_only", "0");
    // enable rhelOptionalRepoId and disable rhelBaseRepoId,rhelEusRepoId
    List<String> enableRepos = new ArrayList<String>();
    enableRepos.add(rhelOptionalRepoId);
    List<String> disableRepos = new ArrayList<String>();
    disableRepos.add(rhelBaseRepoId);
    clienttasks.repos(null, null, null, enableRepos, disableRepos, null, null, null, null);
    disableRepos.clear();
    if (!rhelBaseRepoId.endsWith("-beta-rpms") && !rhelOptionalRepoId.endsWith("-beta-rpms"))
        disableRepos.add("*-beta-rpms");
    if (!rhelBaseRepoId.endsWith("-htb-rpms") && !rhelOptionalRepoId.endsWith("-htb-rpms"))
        disableRepos.add("*-htb-rpms");
    if (!rhelBaseRepoId.endsWith("-eus-rpms") && !rhelOptionalRepoId.endsWith("-eus-rpms"))
        disableRepos.add("*-eus-rpms");
    clienttasks.repos_(null, null, null, null, disableRepos, null, null, null, null);
    // attempt to install a package that requires another package from a disabled repo
    // responding yes and then no
    // interactive yum responses are:  y y N
    SSHCommandResult result = client.runCommandAndWait("yum install " + rhelOptionalPackage + " --disableplugin=rhnplugin --disablerepo=beaker-* " + " << EOF\ny\nN\nEOF");
    // 2015-10-27 18:34:34.097  FINE: ssh root@jsefler-7.usersys.redhat.com yum install ghostscript-devel --disableplugin=rhnplugin  << EOF
    // y
    // N
    // EOF
    // 2015-10-27 18:34:53.829  FINE: Stdout:
    // Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
    // : manager
    // Resolving Dependencies
    // --> Running transaction check
    // ---> Package ghostscript-devel.x86_64 0:9.07-18.el7 will be installed
    // --> Processing Dependency: ghostscript = 9.07-18.el7 for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Processing Dependency: libgs.so.9()(64bit) for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Finished Dependency Resolution
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: libgs.so.9()(64bit)
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: ghostscript = 9.07-18.el7
    // **********************************************************************
    // Dependency resolving failed due to missing dependencies.
    // Some repositories on your system are disabled, but yum can enable them
    // and search for missing dependencies. This will require downloading
    // metadata for disabled repositories and may take some time and traffic.
    // **********************************************************************
    // 
    // Enable all repositories and try again? [y/N]:
    // --> Running transaction check
    // ---> Package ghostscript-devel.x86_64 0:9.07-18.el7 will be installed
    // --> Processing Dependency: ghostscript = 9.07-18.el7 for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Processing Dependency: libgs.so.9()(64bit) for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Running transaction check
    // ---> Package ghostscript.x86_64 0:9.07-18.el7 will be installed
    // --> Finished Dependency Resolution
    // 
    // Dependencies Resolved
    // 
    // ================================================================================
    // Package             Arch     Version       Repository                     Size
    // ================================================================================
    // Installing:
    // ghostscript-devel   x86_64   9.07-18.el7   rhel-7-server-optional-rpms    49 k
    // Installing for dependencies:
    // ghostscript         x86_64   9.07-18.el7   rhel-7-server-eus-rpms        4.3 M
    // 
    // Transaction Summary
    // ================================================================================
    // Install  1 Package (+1 Dependent package)
    // 
    // Total download size: 4.4 M
    // Installed size: 17 M
    // Is this ok [y/d/N]:
    // Exiting on user command
    // Your transaction was saved, rerun it with:
    // yum load-transaction /tmp/yum_save_tx.2015-10-27.18-34.Lbc8K5.yumtx
    // 
    // 2015-10-27 18:34:53.873  FINE: Stderr:
    // 2015-10-27 18:34:53.875  FINE: ExitCode: 1
    // assert exitCode results
    Assert.assertEquals(result.getExitCode(), Integer.valueOf(1), "Exit code from attempt to successfully install '" + rhelOptionalPackage + "' that requires '" + rhelBasePackage + "'.");
    // assert stderr results
    String stderrFiltered = result.getStderr();
    // NOTE: The following stderr is possible when new products have not yet been released?
    // Let's workaround this by filtering it from stderr before asserting an empty stderr
    // 201607291254:11.409 - FINE: Stderr:
    // https://cdn.redhat.com/content/dist/rhel/workstation/7/7Workstation/x86_64/insights-client/1/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
    // Trying other mirror.
    // To address this issue please refer to the below knowledge base article
    // 
    // https://access.redhat.com/articles/1320623
    // 
    // If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
    // 
    // https://cdn.redhat.com/content/dist/rhel/workstation/7/7Workstation/x86_64/openstack-tools/9/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
    // Trying other mirror.
    // https://cdn.redhat.com/content/dist/rhel/workstation/7/7Workstation/x86_64/ceph-tools/2/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
    // Trying other mirror.
    // https://cdn.redhat.com/content/dist/rhel/workstation/7/7Workstation/x86_64/openstack-tools/10/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
    // Trying other mirror.
    // 201607121645:50.724 - FINE: Stderr:
    // https://cdn.redhat.com/content/dist/rhel/arm/7/7Server/aarch64/sat-tools/6.2/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
    // Trying other mirror.
    // To address this issue please refer to the below knowledge base article
    // 
    // https://access.redhat.com/articles/1320623
    // 
    // If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
    // 201611081658:33.447 - FINE: Stderr:
    // https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/sat-tools/6.3/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
    // Trying other mirror.
    // To address this issue please refer to the below knowledge base article
    // 
    // https://access.redhat.com/articles/1320623
    // 
    // If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
    // 
    // https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/insights-client/1/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
    // Trying other mirror.
    // String stderrNotFoundRegex = clienttasks.getConfFileParameter(clienttasks.rhsmConfFile, "rhsm", "baseurl")+".* HTTPS Error 404 - Not Found\nTrying other mirror.";
    String stderrNotFoundRegex = clienttasks.getConfFileParameter(clienttasks.rhsmConfFile, "rhsm", "baseurl") + ".* (HTTPS Error 404 - Not Found|\"The requested URL returned error: 404 Not Found\")\nTrying other mirror.";
    String stderrNotFoundInfo = "To address this issue please refer to the below knowledge base article \n\nhttps://access.redhat.com/articles/1320623\n\nIf above article doesn't help to resolve this issue please open a ticket with Red Hat Support.";
    if (stderrFiltered.contains(stderrNotFoundInfo))
        log.warning("Ignoring stderr for all \"404 - Not Found\" errors since their discovery is not the purpose of this test.");
    stderrFiltered = stderrFiltered.replace(stderrNotFoundInfo, "");
    stderrFiltered = stderrFiltered.replaceAll(stderrNotFoundRegex, "");
    stderrFiltered = stderrFiltered.trim();
    Assert.assertEquals(stderrFiltered, "", "Ignoring all \"404 - Not Found\" errors, stderr from attempt to successfully install '" + rhelOptionalPackage + "' that requires '" + rhelBasePackage + "'.");
    // assert stdout results
    String prompt;
    String requiresMessage = "Requires: " + rhelBasePackage;
    Assert.assertTrue(result.getStdout().contains(requiresMessage), "Stdout from attempt to install '" + rhelOptionalPackage + "' contains the require message:\n" + requiresMessage);
    String searchDisabledReposMessage = StringUtils.join(new String[] { "**********************************************************************", "Dependency resolving failed due to missing dependencies.", "Some repositories on your system are disabled, but yum can enable them", "and search for missing dependencies. This will require downloading", "metadata for disabled repositories and may take some time and traffic.", "**********************************************************************" }, "\n");
    Assert.assertTrue(result.getStdout().contains(searchDisabledReposMessage), "Stdout from attempt to install '" + rhelOptionalPackage + "' which requires '" + rhelBasePackage + "' contains the search disabled repos message:\n" + searchDisabledReposMessage);
    prompt = "Enable all repositories and try again? [y/N]: ";
    Assert.assertTrue(result.getStdout().contains(prompt), "Stdout from attempt to install '" + rhelOptionalPackage + "' contains the prompt: " + prompt);
    // RHEL7
    prompt = "Is this ok [y/d/N]: ";
    // RHEL6
    if (clienttasks.redhatReleaseX.equals("6"))
        prompt = "Is this ok [y/N]: ";
    Assert.assertTrue(result.getStdout().contains(prompt), "Stdout from attempt to install '" + rhelOptionalPackage + "' contains the prompt: " + prompt);
    // confirm that the packages are NOT installed
    Assert.assertTrue(!clienttasks.isPackageInstalled(rhelOptionalPackage), "Package '" + rhelOptionalPackage + "' is NOT installed.");
    Assert.assertTrue(!clienttasks.isPackageInstalled(rhelBasePackage), "Package '" + rhelBasePackage + "' is NOT installed.");
    // confirm the repo enablement has not changed
    List<Repo> subscribedRepos = clienttasks.getCurrentlySubscribedRepos();
    // assert the optional rhel repo remains enabled
    Repo rhelOptionalRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelOptionalRepoId, subscribedRepos);
    Assert.assertNotNull(rhelOptionalRepo, "RHEL optional repo id '" + rhelOptionalRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(rhelOptionalRepo.enabled, "RHEL optional repo id '" + rhelOptionalRepoId + "' remains enabled.");
    // assert the base rhel repo enablement remains disabled
    Repo rhelBaseRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelBaseRepoId, subscribedRepos);
    Assert.assertNotNull(rhelBaseRepo, "RHEL repo id '" + rhelBaseRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(!rhelBaseRepo.enabled, "RHEL repo id '" + rhelBaseRepoId + "' remains disabled.");
    // assert that disabled base repo remains disabled in the repo-override list
    SSHCommandResult listResult = clienttasks.repo_override(true, null, (String) null, (String) null, null, null, null, null, null);
    String name = "enabled", value, regex;
    value = "0";
    // notice that we have to escape glob characters from the value so they don't get interpreted as regex chars
    regex = String.format(SubscriptionManagerTasks.repoOverrideListRepositoryNameValueRegexFormat, rhelBaseRepoId, name, value.replace("*", "\\*").replace("?", "\\?"));
    Assert.assertTrue(SubscriptionManagerCLITestScript.doesStringContainMatches(listResult.getStdout(), regex), "After the search-disabled-repos yum plugin was exercised, the subscription-manager repo-override list reports override repo='" + rhelBaseRepoId + "' name='" + name + "' value='" + value + "'.");
    if (rhelBetaRepoId != null) {
        value = "0";
        // notice that we have to escape glob characters from the value so they don't get interpreted as regex chars
        regex = String.format(SubscriptionManagerTasks.repoOverrideListRepositoryNameValueRegexFormat, rhelBetaRepoId, name, value.replace("*", "\\*").replace("?", "\\?"));
        Assert.assertTrue(SubscriptionManagerCLITestScript.doesStringContainMatches(listResult.getStdout(), regex), "After the search-disabled-repos yum plugin was exercised, the subscription-manager repo-override list reports override repo='" + rhelBetaRepoId + "' name='" + name + "' value='" + value + "'.");
    }
    if (rhelHtbRepoId != null) {
        value = "0";
        // notice that we have to escape glob characters from the value so they don't get interpreted as regex chars
        regex = String.format(SubscriptionManagerTasks.repoOverrideListRepositoryNameValueRegexFormat, rhelHtbRepoId, name, value.replace("*", "\\*").replace("?", "\\?"));
        Assert.assertTrue(SubscriptionManagerCLITestScript.doesStringContainMatches(listResult.getStdout(), regex), "After the search-disabled-repos yum plugin was exercised, the subscription-manager repo-override list reports override repo='" + rhelHtbRepoId + "' name='" + name + "' value='" + value + "'.");
    }
    if (rhelEusRepoId != null) {
        value = "0";
        // notice that we have to escape glob characters from the value so they don't get interpreted as regex chars
        regex = String.format(SubscriptionManagerTasks.repoOverrideListRepositoryNameValueRegexFormat, rhelEusRepoId, name, value.replace("*", "\\*").replace("?", "\\?"));
        Assert.assertTrue(SubscriptionManagerCLITestScript.doesStringContainMatches(listResult.getStdout(), regex), "After the search-disabled-repos yum plugin was exercised, the subscription-manager repo-override list reports override repo='" + rhelEusRepoId + "' name='" + name + "' value='" + value + "'.");
    }
    // assert that the enabled optional repo remains enabled in the repo-override list
    value = "1";
    // notice that we have to escape glob characters from the value so they don't get interpreted as regex chars
    regex = String.format(SubscriptionManagerTasks.repoOverrideListRepositoryNameValueRegexFormat, rhelOptionalRepoId, name, value.replace("*", "\\*").replace("?", "\\?"));
    Assert.assertTrue(SubscriptionManagerCLITestScript.doesStringContainMatches(listResult.getStdout(), regex), "After the search-disabled-repos yum plugin was exercised, the subscription-manager repo-override list reports override repo='" + rhelOptionalRepoId + "' name='" + name + "' value='" + value + "'.");
}
Also used : Repo(rhsm.data.Repo) SSHCommandResult(com.redhat.qe.tools.SSHCommandResult) ArrayList(java.util.ArrayList) TestDefinition(com.github.redhatqe.polarize.metadata.TestDefinition) Test(org.testng.annotations.Test)

Example 5 with Repo

use of rhsm.data.Repo in project rhsm-qe by RedHatQE.

the class SearchDisabledReposTests method testWithNotifyOnlyOffVerifyYumSearchDisabledReposAssumingYesResponses.

@// update=true,	// uncomment to make TestDefinition changes update Polarion testcases through the polarize testcase importer
TestDefinition(projectID = { Project.RHEL6, Project.RedHatEnterpriseLinux7 }, testCaseID = { "RHEL6-22229", "RHEL7-55196" }, level = DefTypes.Level.COMPONENT, component = "subscription-manager", testtype = @TestType(testtype = DefTypes.TestTypes.FUNCTIONAL, subtype1 = DefTypes.Subtypes.RELIABILITY, subtype2 = DefTypes.Subtypes.EMPTY), posneg = PosNeg.POSITIVE, importance = DefTypes.Importance.HIGH, automation = DefTypes.Automation.AUTOMATED, tags = "Tier1")
@Test(description = "verify user is prompted to search disabled repos to complete an applicable yum install transaction when notify_only=0 is configured in /etc/yum/pluginconf.d/search-disabled-repos.conf and proceed with --assumeyes responses", groups = { "Tier1Tests", "blockedByBug-1232232", "blockedByBug-1268376", "blockedByBug-1512948", "testWithNotifyOnlyOffVerifyYumSearchDisabledReposAssumingYesResponses" }, dependsOnMethods = { "testRhelSubscriptionBaseAndOptionalReposAreAvailable" }, priority = 50, enabled = true)
public // @ImplementsNitrateTest(caseId=)
void testWithNotifyOnlyOffVerifyYumSearchDisabledReposAssumingYesResponses() {
    // make sure rhelBasePackage and rhelOptionalPackage are not installed
    if (clienttasks.isPackageInstalled(rhelOptionalPackage))
        clienttasks.yumRemovePackage(rhelOptionalPackage);
    if (clienttasks.isPackageInstalled(rhelBasePackage))
        clienttasks.yumRemovePackage(rhelBasePackage);
    // manually turn off notify_only 0
    clienttasks.updateConfFileParameter(clienttasks.yumPluginConfFileForSearchDisabledRepos, "notify_only", "0");
    // enable rhelOptionalRepoId and disable rhelBaseRepoId,rhelEusRepoId
    List<String> enableRepos = new ArrayList<String>();
    enableRepos.add(rhelOptionalRepoId);
    List<String> disableRepos = new ArrayList<String>();
    disableRepos.add(rhelBaseRepoId);
    clienttasks.repos(null, null, null, enableRepos, disableRepos, null, null, null, null);
    disableRepos.clear();
    if (!rhelBaseRepoId.endsWith("-beta-rpms") && !rhelOptionalRepoId.endsWith("-beta-rpms"))
        disableRepos.add("*-beta-rpms");
    if (!rhelBaseRepoId.endsWith("-htb-rpms") && !rhelOptionalRepoId.endsWith("-htb-rpms"))
        disableRepos.add("*-htb-rpms");
    if (!rhelBaseRepoId.endsWith("-eus-rpms") && !rhelOptionalRepoId.endsWith("-eus-rpms"))
        disableRepos.add("*-eus-rpms");
    clienttasks.repos_(null, null, null, null, disableRepos, null, null, null, null);
    // 2015-10-29 17:51:58.988  FINE: ssh root@ibm-z10-30.rhts.eng.bos.redhat.com subscription-manager repos --disable=*-beta-rpms --disable=*-htb-rpms --disable=*-eus-rpms
    // 2015-10-29 17:52:08.882  FINE: Stdout:
    // Error: *-htb-rpms is not a valid repository ID. Use --list option to see valid repositories.
    // Error: *-eus-rpms is not a valid repository ID. Use --list option to see valid repositories.
    // Repository 'rhel-7-for-system-z-satellite-tools-6-beta-rpms' is disabled for this system.
    // Repository 'rhel-7-for-system-z-rhn-tools-beta-rpms' is disabled for this system.
    // Repository 'rhel-7-for-system-z-optional-beta-rpms' is disabled for this system.
    // Repository 'rhel-7-for-system-z-rh-common-beta-rpms' is disabled for this system.
    // Repository 'rhel-7-for-system-z-supplementary-beta-rpms' is disabled for this system.
    // Repository 'rhel-7-for-system-z-beta-rpms' is disabled for this system.
    // 
    // 2015-10-29 17:52:08.895  FINE: Stderr:
    // 2015-10-29 17:52:08.896  FINE: ExitCode: 1
    // attempt to install a package that requires another package from a disabled repo
    SSHCommandResult result = clienttasks.yumDoPackageFromRepo_("install", rhelOptionalPackage, null, "--assumeyes --disablerepo=beaker-*");
    // 2015-10-26 16:53:19.222  FINE: ssh root@jsefler-7.usersys.redhat.com yum -y install ghostscript-devel --disableplugin=rhnplugin --assumeyes
    // 2015-10-26 16:53:55.547  FINE: Stdout:
    // Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
    // : manager
    // Resolving Dependencies
    // --> Running transaction check
    // ---> Package ghostscript-devel.x86_64 0:9.07-18.el7 will be installed
    // --> Processing Dependency: ghostscript = 9.07-18.el7 for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Processing Dependency: libgs.so.9()(64bit) for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Finished Dependency Resolution
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: libgs.so.9()(64bit)
    // Error: Package: ghostscript-devel-9.07-18.el7.x86_64 (rhel-7-server-optional-rpms)
    // Requires: ghostscript = 9.07-18.el7
    // **********************************************************************
    // Dependency resolving failed due to missing dependencies.
    // Some repositories on your system are disabled, but yum can enable them
    // and search for missing dependencies. This will require downloading
    // metadata for disabled repositories and may take some time and traffic.
    // **********************************************************************
    // 
    // --> Running transaction check
    // ---> Package ghostscript-devel.x86_64 0:9.07-18.el7 will be installed
    // --> Processing Dependency: ghostscript = 9.07-18.el7 for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Processing Dependency: libgs.so.9()(64bit) for package: ghostscript-devel-9.07-18.el7.x86_64
    // --> Running transaction check
    // ---> Package ghostscript.x86_64 0:9.07-18.el7 will be installed
    // --> Finished Dependency Resolution
    // 
    // Dependencies Resolved
    // 
    // ================================================================================
    // Package             Arch     Version       Repository                     Size
    // ================================================================================
    // Installing:
    // ghostscript-devel   x86_64   9.07-18.el7   rhel-7-server-optional-rpms    49 k
    // Installing for dependencies:
    // ghostscript         x86_64   9.07-18.el7   rhel-7-server-eus-rpms        4.3 M
    // 
    // Transaction Summary
    // ================================================================================
    // Install  1 Package (+1 Dependent package)
    // 
    // Total download size: 4.4 M
    // Installed size: 17 M
    // Downloading packages:
    // --------------------------------------------------------------------------------
    // Total                                              3.2 MB/s | 4.4 MB  00:01
    // Running transaction check
    // Running transaction test
    // Transaction test succeeded
    // Running transaction
    // Installing : ghostscript-9.07-18.el7.x86_64                               1/2
    // Installing : ghostscript-devel-9.07-18.el7.x86_64                         2/2
    // Verifying  : ghostscript-9.07-18.el7.x86_64                               1/2
    // Verifying  : ghostscript-devel-9.07-18.el7.x86_64                         2/2
    // *******************************************************************
    // Dependency resolving was successful thanks to enabling these repositories:
    // rhel-7-server-eus-rpms
    // *******************************************************************
    // 
    // 
    // Installed:
    // ghostscript-devel.x86_64 0:9.07-18.el7
    // 
    // Dependency Installed:
    // ghostscript.x86_64 0:9.07-18.el7
    // 
    // Complete!
    // 
    // 2015-10-26 16:53:55.548  FINE: Stderr:
    // 2015-10-26 16:53:55.548  FINE: ExitCode: 0
    // assert results
    Assert.assertEquals(result.getExitCode(), Integer.valueOf(0), "Exit code from attempt to install '" + rhelOptionalPackage + "' that requires '" + rhelBasePackage + "'.");
    // confirm that the packages are now installed
    Assert.assertTrue(clienttasks.isPackageInstalled(rhelOptionalPackage), "Package '" + rhelOptionalPackage + "' is installed.");
    Assert.assertTrue(clienttasks.isPackageInstalled(rhelBasePackage), "Package '" + rhelBasePackage + "' is installed.");
    // assert more results
    String requiresMessage = "Requires: " + rhelBasePackage;
    Assert.assertTrue(result.getStdout().contains(requiresMessage), "Stdout from attempt to install '" + rhelOptionalPackage + "' contains the require message:\n" + requiresMessage);
    String searchDisabledReposMessage = StringUtils.join(new String[] { "**********************************************************************", "Dependency resolving failed due to missing dependencies.", "Some repositories on your system are disabled, but yum can enable them", "and search for missing dependencies. This will require downloading", "metadata for disabled repositories and may take some time and traffic.", "**********************************************************************" }, "\n");
    Assert.assertTrue(result.getStdout().contains(searchDisabledReposMessage), "Stdout from attempt to install '" + rhelOptionalPackage + "' contains the prompt message:\n" + searchDisabledReposMessage);
    String rhelActualRepoId = clienttasks.getYumPackageInfo(rhelBasePackage, "From repo");
    String resolutionMessage = StringUtils.join(new String[] { "*******************************************************************", "Dependency resolving was successful thanks to enabling these repositories:", rhelActualRepoId, "*******************************************************************" }, "\n");
    Assert.assertTrue(result.getStdout().contains(resolutionMessage), "Stdout from attempt to install '" + rhelOptionalPackage + "' which requires '" + rhelBasePackage + "' contains the resolution message:\n" + resolutionMessage);
    // confirm the repo enablement has not changed
    List<Repo> subscribedRepos = clienttasks.getCurrentlySubscribedRepos();
    // assert the optional rhel repo remains enabled
    Repo rhelOptionalRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelOptionalRepoId, subscribedRepos);
    Assert.assertNotNull(rhelOptionalRepo, "RHEL optional repo id '" + rhelOptionalRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(rhelOptionalRepo.enabled, "RHEL optional repo id '" + rhelOptionalRepoId + "' remains enabled.");
    // assert the actual rhel repo enablement is persisted.
    Repo rhelActualRepo = Repo.findFirstInstanceWithMatchingFieldFromList("repoId", rhelActualRepoId, subscribedRepos);
    Assert.assertNotNull(rhelActualRepo, "RHEL repo id '" + rhelActualRepoId + "' was found in subscribed repos.");
    Assert.assertTrue(rhelActualRepo.enabled, "RHEL repo id '" + rhelActualRepoId + "' was enabled permanently by the search-disabled-repos plugin.");
    // assert that the persisted enabled repos appear in the repo-override list
    SSHCommandResult listResult = clienttasks.repo_override(true, null, (String) null, (String) null, null, null, null, null, null);
    String name = "enabled", value, regex;
    value = "1";
    // notice that we have to escape glob characters from the value so they don't get interpreted as regex chars
    regex = String.format(SubscriptionManagerTasks.repoOverrideListRepositoryNameValueRegexFormat, rhelActualRepoId, name, value.replace("*", "\\*").replace("?", "\\?"));
    Assert.assertTrue(SubscriptionManagerCLITestScript.doesStringContainMatches(listResult.getStdout(), regex), "After the search-disabled-repos yum plugin was exercised, the subscription-manager repo-override list reports override repo='" + rhelActualRepoId + "' name='" + name + "' value='" + value + "'.");
    value = "1";
    // notice that we have to escape glob characters from the value so they don't get interpreted as regex chars
    regex = String.format(SubscriptionManagerTasks.repoOverrideListRepositoryNameValueRegexFormat, rhelOptionalRepoId, name, value.replace("*", "\\*").replace("?", "\\?"));
    Assert.assertTrue(SubscriptionManagerCLITestScript.doesStringContainMatches(listResult.getStdout(), regex), "After the search-disabled-repos yum plugin was exercised, the subscription-manager repo-override list reports override repo='" + rhelOptionalRepoId + "' name='" + name + "' value='" + value + "'.");
}
Also used : Repo(rhsm.data.Repo) SSHCommandResult(com.redhat.qe.tools.SSHCommandResult) ArrayList(java.util.ArrayList) TestDefinition(com.github.redhatqe.polarize.metadata.TestDefinition) Test(org.testng.annotations.Test)

Aggregations

Repo (rhsm.data.Repo)30 Test (org.testng.annotations.Test)27 TestDefinition (com.github.redhatqe.polarize.metadata.TestDefinition)26 YumRepo (rhsm.data.YumRepo)20 SSHCommandResult (com.redhat.qe.tools.SSHCommandResult)16 SkipException (org.testng.SkipException)14 ArrayList (java.util.ArrayList)13 File (java.io.File)6 SubscriptionPool (rhsm.data.SubscriptionPool)6 ImplementsNitrateTest (com.redhat.qe.auto.tcms.ImplementsNitrateTest)4 BigInteger (java.math.BigInteger)4 HashMap (java.util.HashMap)4 List (java.util.List)4 JSONObject (org.json.JSONObject)4 EntitlementCert (rhsm.data.EntitlementCert)4 ProductCert (rhsm.data.ProductCert)3 BlockedByBzBug (com.redhat.qe.auto.bugzilla.BlockedByBzBug)2 BugzillaAPIException (com.redhat.qe.auto.bugzilla.BugzillaAPIException)2 JSONArray (org.json.JSONArray)2 ContentNamespace (rhsm.data.ContentNamespace)2