use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.
the class ProxyTests method getRefreshAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray.
@DataProvider(name = "getRefreshAttemptsUsingProxyServerViaRhsmConfigData")
public Object[][] getRefreshAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray() {
// return TestNGUtils.convertListOfListsTo2dArray(getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists());
List<List<Object>> ll = new ArrayList<List<Object>>();
for (List<Object> l : getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists()) {
// get the existing BlockedByBzBug
BlockedByBzBug blockedByBzBug = (BlockedByBzBug) l.get(0);
List<String> bugIds = blockedByBzBug == null ? new ArrayList<String>() : new ArrayList<String>(Arrays.asList(blockedByBzBug.getBugIds()));
// add more BlockedByBzBug to rows that are expecting a network error
if (l.get(12) == nErrMsg) {
// Bug 975164 - subscription-manager refresh with --proxy is silently failing in rhsm.log
bugIds.add("975164");
// Bug 1345962 - unbound method endheaders() must be called with HTTPSConnection instance as first argument (got RhsmProxyHTTPSConnection instance instead)
bugIds.add("1345962");
}
blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
ll.add(Arrays.asList(new Object[] { blockedByBzBug, l.get(1), l.get(2), l.get(3), l.get(4), l.get(5), l.get(6), l.get(7), l.get(8), l.get(9), l.get(10), l.get(11), l.get(12), l.get(13), l.get(14), l.get(15), l.get(16) }));
}
return TestNGUtils.convertListOfListsTo2dArray(ll);
}
use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.
the class ProxyTests method getReleaseAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray.
@DataProvider(name = "getReleaseAttemptsUsingProxyServerViaRhsmConfigData")
public Object[][] getReleaseAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray() {
// return TestNGUtils.convertListOfListsTo2dArray(getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists());
List<List<Object>> ll = new ArrayList<List<Object>>();
for (List<Object> l : getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists()) {
// nullify the blockedByBug parameter since this function was originally not blocked by any bug
BlockedByBzBug blockedByBzBug = null;
List<String> bugIds = blockedByBzBug == null ? new ArrayList<String>() : new ArrayList<String>(Arrays.asList(blockedByBzBug.getBugIds()));
// add BlockedByBzBug to rows that are expecting a network error
if (l.get(12) == nErrMsg || l.get(12) == pErr407Msg) {
// Bug 848195 Error while checking server version: Proxy connection failed: 407
bugIds.add("848195");
// Bug 848190 Error while checking server version: (111, 'Connection refused')
bugIds.add("848190");
// Bug 848184 Error while checking server version: (-2, 'Name or service not known')
bugIds.add("848184");
}
// Bug 1345962 - unbound method endheaders() must be called with HTTPSConnection instance as first argument (got RhsmProxyHTTPSConnection instance instead)
bugIds.add("1345962");
blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
ll.add(Arrays.asList(new Object[] { blockedByBzBug, l.get(1), l.get(2), l.get(3), l.get(4), l.get(5), l.get(6), l.get(7), l.get(8), l.get(9), l.get(10), l.get(11), l.get(12), l.get(13), l.get(14), l.get(15), l.get(16) }));
}
return TestNGUtils.convertListOfListsTo2dArray(ll);
}
use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.
the class ProxyTests method getRepoOverrideAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray.
@DataProvider(name = "getRepoOverrideAttemptsUsingProxyServerViaRhsmConfigData")
public Object[][] getRepoOverrideAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray() {
// return TestNGUtils.convertListOfListsTo2dArray(getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists());
List<List<Object>> ll = new ArrayList<List<Object>>();
for (List<Object> l : getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists()) {
// get the existing BlockedByBzBug
BlockedByBzBug blockedByBzBug = (BlockedByBzBug) l.get(0);
List<String> bugIds = blockedByBzBug == null ? new ArrayList<String>() : new ArrayList<String>(Arrays.asList(blockedByBzBug.getBugIds()));
// add more BlockedByBzBug to rows that are....
blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
// nullify the blockedByBug parameter since this function was originally not blocked by any bug
blockedByBzBug = null;
bugIds.clear();
// Bug 1034396 - repo-override command should not require entitlements
bugIds.add("1034396");
// Bug 1345962 - unbound method endheaders() must be called with HTTPSConnection instance as first argument (got RhsmProxyHTTPSConnection instance instead)
bugIds.add("1345962");
blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
l.set(0, blockedByBzBug);
if (l.get(11).equals(new Integer(0))) {
/* valid prior to bug 1034396
l.set(11,new Integer(1));
l.set(12,"This system does not have any subscriptions.");
l.set(13,"");
*/
l.set(11, new Integer(0));
l.set(12, "This system does not have any content overrides applied to it.");
l.set(13, "");
}
ll.add(l);
}
return TestNGUtils.convertListOfListsTo2dArray(ll);
}
use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.
the class ProxyTests method getReposAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray.
@DataProvider(name = "getReposAttemptsUsingProxyServerViaRhsmConfigData")
public Object[][] getReposAttemptsUsingProxyServerViaRhsmConfigDataAs2dArray() {
// return TestNGUtils.convertListOfListsTo2dArray(getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists());
List<List<Object>> ll = new ArrayList<List<Object>>();
for (List<Object> l : getValidRegisterAttemptsUsingProxyServerViaRhsmConfigDataAsListOfLists()) {
// Object blockedByBug, String username, String password, Sring org, String proxy, String proxyuser, String proxypassword, String proxy_hostnameConfig, String proxy_portConfig, String proxy_userConfig, String proxy_passwordConfig, Integer exitCode, String stdout, String stderr, SSHCommandRunner proxyRunner, String proxyLog, String proxyLogGrepPattern
// get the existing BlockedByBzBug
BlockedByBzBug blockedByBzBug = (BlockedByBzBug) l.get(0);
List<String> bugIds = blockedByBzBug == null ? new ArrayList<String>() : new ArrayList<String>(Arrays.asList(blockedByBzBug.getBugIds()));
// add more BlockedByBzBug to rows that are expecting a network error
if (l.get(12) == nErrMsg) {
// Bug 919255 - negative proxy testing against subscription-manager repos --list
bugIds.add("919255");
}
if (l.get(4) == null && l.get(7) != null && l.get(7).equals("bad-proxy")) {
// Bug 975186 - subscription-manager repos --list is failing when specifying a bad --proxy
bugIds.add("975186");
}
if (l.get(4) != null && l.get(4).equals("bad-proxy") && l.get(7) != null && l.get(7).equals(sm_noauthproxyHostname)) {
// Bug 975186 - subscription-manager repos --list is failing when specifying a bad --proxy
bugIds.add("975186");
}
blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
ll.add(Arrays.asList(new Object[] { blockedByBzBug, l.get(1), l.get(2), l.get(3), l.get(4), l.get(5), l.get(6), l.get(7), l.get(8), l.get(9), l.get(10), l.get(11), l.get(12), l.get(13), l.get(14), l.get(15), l.get(16) }));
}
return TestNGUtils.convertListOfListsTo2dArray(ll);
}
use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.
the class ListTests method getListAvailableWithServicelevelDataAsListOfLists.
protected List<List<Object>> getListAvailableWithServicelevelDataAsListOfLists() throws JSONException, Exception {
List<List<Object>> ll = new ArrayList<List<Object>>();
if (!isSetupBeforeSuiteComplete)
return ll;
// register with force (so we can find the org to which the sm_clientUsername belongs in case sm_clientOrg is null)
String org = sm_clientOrg;
if (org == null) {
String consumerId = clienttasks.getCurrentConsumerId(clienttasks.register(sm_clientUsername, sm_clientPassword, sm_clientOrg, null, null, "SubscriptionServicelevelConsumer", null, null, null, null, (String) null, null, null, null, true, false, null, null, null, null));
org = CandlepinTasks.getOwnerKeyOfConsumerId(sm_clientUsername, sm_clientPassword, sm_serverUrl, consumerId);
}
// get all the valid service levels available to this org
for (String serviceLevel : CandlepinTasks.getServiceLevelsForOrgKey(sm_clientUsername, sm_clientPassword, sm_serverUrl, org)) {
BlockedByBzBug blockedByBug = null;
// Bug 1011234 - subscription-manager list --avail should catch nil service-levels and report the absense of a service-level rather than "None"
if (serviceLevel.equalsIgnoreCase("none"))
blockedByBug = new BlockedByBzBug("1011234");
ll.add(Arrays.asList(new Object[] { blockedByBug, serviceLevel }));
// run again with the serviceLevel case randomized
ll.add(Arrays.asList(new Object[] { blockedByBug, randomizeCaseOfCharactersInString(serviceLevel) }));
}
ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("1011234"), "" }));
ll.add(Arrays.asList(new Object[] { null, "FOO" }));
return ll;
}
Aggregations