Search in sources :

Example 1 with BlockedByBzBug

use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.

the class TranslationTests method getTranslationFileDataAsListOfLists.

protected List<List<Object>> getTranslationFileDataAsListOfLists() {
    List<List<Object>> ll = new ArrayList<List<Object>>();
    if (translationFileMapForSubscriptionManager == null)
        return ll;
    for (File translationFile : translationFileMapForSubscriptionManager.keySet()) {
        Set<String> bugIds = new HashSet<String>();
        // Bug 824100 - pt_BR translations are outdated for subscription-manager
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("824100");
        // Bug 824184 - [ta_IN] translations for subscription-manager are missing (95% complete)
        if (translationFile.getPath().contains("/ta/"))
            bugIds.add("824184");
        if (translationFile.getPath().contains("/ta_IN/"))
            bugIds.add("824184");
        // Bug 844369 - msgids translations are missing for several languages
        if (translationFile.getPath().contains("/es_ES/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/ja/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/as/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/it/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/ru/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/zh_TW/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/de_DE/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/mr/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/ko/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/fr/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/or/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/te/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/hi/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/gu/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/pa/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/ml/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/bn_IN/"))
            bugIds.add("844369");
        if (translationFile.getPath().contains("/kn/"))
            bugIds.add("844369");
        BlockedByBzBug blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
        ll.add(Arrays.asList(new Object[] { blockedByBzBug, translationFile }));
    }
    return ll;
}
Also used : ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) File(java.io.File) BlockedByBzBug(com.redhat.qe.auto.bugzilla.BlockedByBzBug) HashSet(java.util.HashSet)

Example 2 with BlockedByBzBug

use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.

the class TranslationTests method getTranslationFileDataForVerifyTranslationsDoNotTranslateSubStrings_TestAsListOfLists.

protected List<List<Object>> getTranslationFileDataForVerifyTranslationsDoNotTranslateSubStrings_TestAsListOfLists() {
    List<List<Object>> ll = new ArrayList<List<Object>>();
    if (translationFileMapForSubscriptionManager == null)
        return ll;
    for (File translationFile : translationFileMapForSubscriptionManager.keySet()) {
        Set<String> bugIds = new HashSet<String>();
        // Bug 906567 - [hi][zh_CN][ru][ko][it]msgids containing "Red Hat" should NOT translate this substring
        if (translationFile.getPath().contains("/hi/"))
            bugIds.add("906567");
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("906567");
        if (translationFile.getPath().contains("/ru/"))
            bugIds.add("906567");
        if (translationFile.getPath().contains("/ko/"))
            bugIds.add("906567");
        if (translationFile.getPath().contains("/it/"))
            bugIds.add("906567");
        // Bug 1372837 - [zh_CN] msgids containing "Red Hat" should NOT translate this substring
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("1372837");
        // Bug 906552 - [es_ES][gu][kn][or][pa][pt_BR][ta_IN][te][zh_CN] msgids containing "subscription-manager" should NOT translate this substring
        if (translationFile.getPath().contains("/es_ES/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/gu/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/kn/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/or/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/pa/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/ta_IN/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/te/"))
            bugIds.add("906552");
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("906552");
        // Bug 1372839 - [pt_BR][it] msgids containing "subscription-manager" should NOT translate this substring
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("1372839");
        if (translationFile.getPath().contains("/it/"))
            bugIds.add("1372839");
        // Bug 1061393 - [pa] msgids containing "subscription-manager" should NOT translate this substring
        if (translationFile.getPath().contains("/pa/"))
            bugIds.add("1061393");
        // Bug 906967 - [as][or][ta_IN][ml][pt_BR][gu][kn][mr][it][hi][zh_CN][te][ru][pa][ko] msgids containing "RHN", "RHN Classic" should NOT translate this substring
        if (translationFile.getPath().contains("/as/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/or/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/ta_IN/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/ml/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/gu/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/kn/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/mr/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/it/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/hi/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/te/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/ru/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/pa/"))
            bugIds.add("906967");
        if (translationFile.getPath().contains("/ko/"))
            bugIds.add("906967");
        // Bug 950099 - [ml][zh_CN][ru][pt_BR] locales should not translate "RHN"
        if (translationFile.getPath().contains("/ml/"))
            bugIds.add("950099");
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("950099");
        if (translationFile.getPath().contains("/ru/"))
            bugIds.add("950099");
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("950099");
        // Bug 957195 - [or] bad translation for msgid "proxy URL in the form of proxy_hostname:proxy_port"
        if (translationFile.getPath().contains("/or/"))
            bugIds.add("957195");
        // Bug 984203 - [de_DE] [es_ES] do not translate "subscription-manager-migration-data"
        if (translationFile.getPath().contains("/es_ES/"))
            bugIds.add("984203");
        if (translationFile.getPath().contains("/de_DE/"))
            bugIds.add("984203");
        // Bug 1071022 - the word "firstboot" should remain untranslated in subscription-manager-1.10
        if (translationFile.getPath().contains("/bn_IN/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/de_DE/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/es_ES/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/hi/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/kn/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/mr/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/pa/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/ta_IN/"))
            bugIds.add("1071022");
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("1071022");
        // Bug 1189950 - [ko_KR] bad translation for "{dateexample}" prevents error message from rendering
        if (translationFile.getPath().contains("/ko/"))
            bugIds.add("1189950");
        // Bug 1463765 - fixes needed for a few pofilter test failures after pulling in new translations for rhel7.4	// this bug covers the unwanted translation of substring "%s:%s%s"
        if (translationFile.getPath().contains("/as/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/bn/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/de_DE/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/fr/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/gu/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/as/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/hi/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/ja/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/kn/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/ko/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/pa/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/ta_IN/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/te/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/as/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/zh_TW/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/it/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/ru/"))
            bugIds.add("1463765");
        if (translationFile.getPath().contains("/es_ES/"))
            bugIds.add("1463765");
        // Bug 1525621 - [es_ES] missing a space character in one of the translated strings
        if (translationFile.getPath().contains("/es_ES/"))
            bugIds.add("1525621");
        BlockedByBzBug blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
        ll.add(Arrays.asList(new Object[] { blockedByBzBug, translationFile }));
    }
    return ll;
}
Also used : ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) File(java.io.File) BlockedByBzBug(com.redhat.qe.auto.bugzilla.BlockedByBzBug) HashSet(java.util.HashSet)

Example 3 with BlockedByBzBug

use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.

the class TranslationTests method getTranslationFileDataToTestTranslationsDoNotEndInUnwantedColonAsListOfLists.

protected List<List<Object>> getTranslationFileDataToTestTranslationsDoNotEndInUnwantedColonAsListOfLists() {
    List<List<Object>> ll = new ArrayList<List<Object>>();
    if (translationFileMapForSubscriptionManager == null)
        return ll;
    for (File translationFile : translationFileMapForSubscriptionManager.keySet()) {
        Set<String> bugIds = new HashSet<String>();
        // Bug 1545442 - [zh_CN][fr][de][ru][pt_BR][pa][kn] unwanted trailing colon characters have been appended to some translations
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("1545442");
        if (translationFile.getPath().contains("/pt_BR/"))
            bugIds.add("1545442");
        if (translationFile.getPath().contains("/fr/"))
            bugIds.add("1545442");
        if (translationFile.getPath().contains("/de/"))
            bugIds.add("1545442");
        if (translationFile.getPath().contains("/ru/"))
            bugIds.add("1545442");
        if (translationFile.getPath().contains("/pa/"))
            bugIds.add("1545442");
        if (translationFile.getPath().contains("/kn/"))
            bugIds.add("1545442");
        // Bug 1544335 - [zh_CN][RHSM GUI][RHSM Initial Setup] Redundant colon next to 'Manually attach subscriptions after registration' check box in System Registration dialog.
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("1544335");
        // Bug 1544327 - [zh_CN][RHSM GUI][RHSM Initial Setup] Redundant colon in Attach button text in Subscription Attachment dialog.
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("1544327");
        // Bug 1544324 - [zh_CN][RHSM GUI][RHSM Initial Setup] Redundant colon in Next button text in System Registration dialog.
        if (translationFile.getPath().contains("/zh_CN/"))
            bugIds.add("1544324");
        BlockedByBzBug blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
        ll.add(Arrays.asList(new Object[] { blockedByBzBug, translationFile }));
    }
    return ll;
}
Also used : ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) File(java.io.File) BlockedByBzBug(com.redhat.qe.auto.bugzilla.BlockedByBzBug) HashSet(java.util.HashSet)

Example 4 with BlockedByBzBug

use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.

the class TranslationTests method getTranslationFilePofilterTestDataAsListOfLists.

// 07/12/2012 this was the initial test created for the benefit of fsharath who further developed the test in PofilterTranslationTests.java
@Deprecated
protected List<List<Object>> getTranslationFilePofilterTestDataAsListOfLists() {
    List<List<Object>> ll = new ArrayList<List<Object>>();
    if (translationFileMapForSubscriptionManager == null)
        return ll;
    // see http://translate.sourceforge.net/wiki/toolkit/pofilter_tests
    // Critical -- can break a program
    // accelerators, escapes, newlines, nplurals, printf, tabs, variables, xmltags, dialogsizes
    // Functional -- may confuse the user
    // acronyms, blank, emails, filepaths, functions, gconf, kdecomments, long, musttranslatewords, notranslatewords, numbers, options, purepunc, sentencecount, short, spellcheck, urls, unchanged
    // Cosmetic -- make it look better
    // brackets, doublequoting, doublespacing, doublewords, endpunc, endwhitespace, puncspacing, simplecaps, simpleplurals, startcaps, singlequoting, startpunc, startwhitespace, validchars
    // Extraction -- useful mainly for extracting certain types of string
    // compendiumconflicts, credits, hassuggestion, isfuzzy, isreview, untranslated
    List<String> pofilterTests = Arrays.asList(// Critical -- can break a program
    "accelerators", "escapes", "newlines", "nplurals", "printf", "tabs", "variables", "xmltags", // Functional -- may confuse the user
    "blank", "emails", "filepaths", "gconf", "long", "notranslatewords", "numbers", "options", "short", "urls", "unchanged", // Cosmetic -- make it look better
    "doublewords", // Extraction -- useful mainly for extracting certain types of string
    "untranslated");
    // debugTesting pofilterTests = Arrays.asList("newlines");
    for (File translationFile : translationFileMapForSubscriptionManager.keySet()) {
        for (String pofilterTest : pofilterTests) {
            BlockedByBzBug bugzilla = null;
            // Bug 825362	[es_ES] failed pofilter accelerator tests for subscription-manager translations
            if (pofilterTest.equals("accelerators") && translationFile.getPath().contains("/es_ES/"))
                bugzilla = new BlockedByBzBug("825362");
            // Bug 825367	[zh_CN] failed pofilter accelerator tests for subscription-manager translations
            if (pofilterTest.equals("accelerators") && translationFile.getPath().contains("/zh_CN/"))
                bugzilla = new BlockedByBzBug("825367");
            // Bug 825397	Many translated languages fail the pofilter newlines test
            if (pofilterTest.equals("newlines") && !(translationFile.getPath().contains("/zh_CN/") || translationFile.getPath().contains("/ru/") || translationFile.getPath().contains("/ja/")))
                bugzilla = new BlockedByBzBug("825397");
            // Bug 825393	[ml_IN][es_ES] translations should not use character ¶ for a new line.
            if (pofilterTest.equals("newlines") && translationFile.getPath().contains("/ml/"))
                bugzilla = new BlockedByBzBug("825393");
            if (pofilterTest.equals("newlines") && translationFile.getPath().contains("/es_ES/"))
                bugzilla = new BlockedByBzBug("825393");
            ll.add(Arrays.asList(new Object[] { bugzilla, pofilterTest, translationFile }));
        }
    }
    return ll;
}
Also used : ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) File(java.io.File) BlockedByBzBug(com.redhat.qe.auto.bugzilla.BlockedByBzBug)

Example 5 with BlockedByBzBug

use of com.redhat.qe.auto.bugzilla.BlockedByBzBug in project rhsm-qe by RedHatQE.

the class TranslationTests method getInvalidRegistrationWithLocalizedStringsAsListOfLists.

protected List<List<Object>> getInvalidRegistrationWithLocalizedStringsAsListOfLists() {
    List<List<Object>> ll = new ArrayList<List<Object>>();
    if (!isSetupBeforeSuiteComplete)
        return ll;
    if (servertasks == null)
        return ll;
    if (clienttasks == null)
        return ll;
    String uErrMsg = servertasks.invalidCredentialsRegexMsg();
    // Object bugzilla, String lang, String username, String password, Integer exitCode, String stdoutRegex, String stderrRegex
    // registration test for a user who is invalid
    ll.add(Arrays.asList(new Object[] { null, "en_US.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, uErrMsg }));
    // registration test for a user with "invalid credentials" (translated)
    if (sm_serverType.equals(CandlepinType.standalone)) {
        ll.add(Arrays.asList(new Object[] { null, "en_US.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Invalid Credentials" }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("615362"), "de_DE.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Ungültige Berechtigungsnachweise" }));
        ll.add(Arrays.asList(new Object[] { null, "es_ES.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Credenciales inválidas" }));
        // "Informations d’identification invalides"
        ll.add(Arrays.asList(new Object[] { null, "fr_FR.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Informations d’identification non valides" }));
        ll.add(Arrays.asList(new Object[] { null, "it_IT.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Credenziali invalide" }));
        ll.add(Arrays.asList(new Object[] { null, "ja_JP.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "無効な識別情報" }));
        ll.add(Arrays.asList(new Object[] { null, "ko_KR.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "잘못된 인증 정보" }));
        ll.add(Arrays.asList(new Object[] { null, "pt_BR.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Credenciais inválidas" }));
        // "Недопустимые реквизиты" google translates to "Illegal details";  "Недопустимые учетные данные" google translates to "Invalid Credentials"
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("839805"), "ru_RU.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Недопустимые реквизиты" }));
        ll.add(Arrays.asList(new Object[] { null, "zh_CN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "无效证书" }));
        ll.add(Arrays.asList(new Object[] { null, "zh_TW.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "無效的認證" }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("683914"), "as_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "অবৈধ পৰিচয়" }));
        ll.add(Arrays.asList(new Object[] { null, "bn_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "অবৈধ পরিচয়" }));
        ll.add(Arrays.asList(new Object[] { null, "hi_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "अवैध श्रेय" }));
        ll.add(Arrays.asList(new Object[] { null, "mr_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "अवैध श्रेय" }));
        ll.add(Arrays.asList(new Object[] { null, "gu_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "અયોગ્ય શ્રેય" }));
        ll.add(Arrays.asList(new Object[] { null, "kn_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "ಅಮಾನ್ಯವಾದ ಪರಿಚಯಪತ್ರ" }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("683914"), "ml_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "തെറ്റായ ആധികാരികതകള്‍" }));
        ll.add(Arrays.asList(new Object[] { null, "or_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "ଅବୈଧ ପ୍ରାଧିକରଣ" }));
        // former value ਗਲਤ ਕਰੀਡੈਂਸ਼ੀਅਲਸ	// former value ਗਲਤ ਕਰੀਡੈਂਸ਼ਲ
        ll.add(Arrays.asList(new Object[] { null, "pa_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "ਗਲਤ ਕਰੀਡੈਂਸ਼ੀਅਲ" }));
        ll.add(Arrays.asList(new Object[] { null, "ta_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "தவறான சான்றுகள்" }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("683914"), "te_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "చెల్లని ప్రమాణాలు" }));
    } else {
        String url = "https://www.redhat.com/wapps/ugc/register.html";
        ll.add(Arrays.asList(new Object[] { null, "en_US.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Invalid username or password. To create a login, please visit {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "706197", "1095389" }), "de_DE.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Ungültiger Benutzername oder Passwort. Um ein Login anzulegen, besuchen Sie bitte {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { null, "es_ES.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "El nombre de usuario o contraseña es inválido. Para crear un nombre de usuario, por favor visite {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "1095389", "1292276" }), "fr_FR.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Nom d'utilisateur ou mot de passe non valide. Pour créer une connexion, veuillez visiter {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { null, "it_IT.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Nome utente o password non valide. Per creare un login visitare {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "1095389" }), "ja_JP.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "ユーザー名かパスワードが無効です。ログインを作成するには、{0} に進んでください".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "706197", "1095389" }), "ko_KR.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "사용자 이름 또는 암호가 잘못되었습니다. 로그인을 만들려면, {0}으로 이동해 주십시오.".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "1095389", "1224204" }), "pt_BR.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, /*"Nome do usuário e senha incorretos. Por favor visite {0} para a criação do logon."*/
        "Username e senha inválidos. Para criar um login, visite {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("706197"), "ru_RU.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "Неверное имя пользователя или пароль. Для создания учётной записи перейдите к {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "1095389", "1224204" }), "zh_CN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, /*"无效用户名或者密码。要创建登录,请访问 {0}"*/
        "无效用户名或者密码。要生成注册帐户请访问 {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "706197", "1095389", "1224204" }), "zh_TW.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, /*"無效的使用者名稱或密碼。若要建立登錄帳號,請至 {0}"*/
        "無效的使用者名稱或密碼。若要建立一組帳號,請至 {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "706197", "1095389" }), "as_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, /*"অবৈধ ব্যৱহাৰকাৰী নাম অথবা পাছৱাৰ্ড। এটা লগিন সৃষ্টি কৰিবলে, অনুগ্ৰহ কৰি চাওক {0}"*/
        "অবৈধ ব্যৱহাৰকাৰী নাম অথবা পাছৱৰ্ড। এটা লগিন সৃষ্টি কৰিবলে, অনুগ্ৰহ কৰি চাওক {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "706197", "1095389", "1224204" }), "bn_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, /*"ব্যবহারকারীর নাম অথবা পাসওয়ার্ড বৈধ নয়। লগ-ইন প্রস্তুত করার জন্য অনুগ্রহ করে {0} পরিদর্শন করুন"*/
        "ব্যবহারকারীর নাম অথবা পাসওয়ার্ড বৈধ নয়। লগ-ইন প্রস্তুত করার জন্য, অনুগ্রহ করে {0} পরিদর্শন করুন।".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "1095389" }), "hi_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "अवैध उपयोक्तानाम या कूटशब्द. लॉगिन करने के लिए, कृपया {0} भ्रमण करें".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("706197"), "mr_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "अवैध वापरकर्तानाव किंवा पासवर्ड. प्रवेश निर्माण करण्यासाठी, कृपया {0} येथे भेट द्या".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "706197", "1095389" }), "gu_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "અયોગ્ય વપરાશકર્તાનામ અથવા પાસવર્ડ. લૉગિનને બનાવવા માટે, મહેરબાની કરીને {0} મુલાકાત લો".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "1095389" }), "kn_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "ಅಮಾನ್ಯವಾದ ಬಳಕೆದಾರ ಹೆಸರು ಅಥವ ಗುಪ್ತಪದ. ಒಂದು ಲಾಗಿನ್ ಅನ್ನು ರಚಿಸಲು, ದಯವಿಟ್ಟು {0} ಗೆ ತೆರಳಿ".replaceFirst("\\{0\\}", url) }));
        // "തെറ്റായ ഉപയോക്തൃനാമം അല്ലെങ്കില്<200d> രഹസ്യവാക്ക്. പ്രവേശനത്തിനായി, ദയവായി https://www.redhat.com/wapps/ugc/register.html സന്ദര്<200d>ശിയ്ക്കുക"
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("706197"), "ml_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "തെറ്റായ ഉപയോക്തൃനാമം അല്ലെങ്കില്‍ രഹസ്യവാക്ക്. പ്രവേശനത്തിനായി, ദയവായി {0} സന്ദര്‍ശിയ്ക്കുക".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("706197"), "or_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "ଅବୈଧ ଚାଳକନାମ କିମ୍ବା ପ୍ରବେଶ ସଂକେତ। ଗୋଟିଏ ଲଗଇନ ନିର୍ମାଣ କରିବା ପାଇଁ, ଦୟାକରି {0} କୁ ପରିଦର୍ଶନ କରନ୍ତୁ".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("706197"), "pa_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "ਗਲਤ ਯੂਜ਼ਰ-ਨਾਂ ਜਾਂ ਪਾਸਵਰਡ। ਲਾਗਇਨ ਬਣਾਉਣ ਲਈ, ਕਿਰਪਾ ਕਰਕੇ ਇਹ ਵੇਖੋ {0}".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("706197"), "ta_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "தவறான பயனர்பெயர் அல்லது கடவுச்சொல். ஒரு உட்புகுவை உருவாக்குவதற்கு, {0} பார்வையிடவும்".replaceFirst("\\{0\\}", url) }));
        ll.add(Arrays.asList(new Object[] { new BlockedByBzBug("706197"), "te_IN.UTF-8", sm_clientUsername + getRandInt(), sm_clientPassword + getRandInt(), 255, null, "చెల్లని వాడుకరిపేరు లేదా సంకేతపదము. లాగిన్ సృష్టించుటకు, దయచేసి {0} దర్శించండి".replaceFirst("\\{0\\}", url) }));
    }
    // registration test for a user who has not accepted Red Hat's Terms and conditions (translated)  Man, why did you do something?
    if (!sm_usernameWithUnacceptedTC.equals("")) {
        String expectedStderr = "Mensch, warum hast du auch etwas zu tun?? Bitte besuchen https://www.redhat.com/wapps/ugc!!!!!!!!!!!!!!!!!!";
        expectedStderr = "Sie müssen zuerst die allgemeinen Geschäftsbedingungen von Red Hat akzeptieren. Bitte besuchen Sie https://www.redhat.com/wapps/ugc. Sie müssen sich gegebenenfalls vom Kundenportal abmelden und anschließend wieder anmelden, um die allgemeinen Geschäftsbedingungen zu sehen.";
        // after IT Adapter fix from Bug 1458423
        expectedStderr = "Sie müssen zuerst die allgemeinen Geschäftsbedingungen von Red Hat akzeptieren. Bitte besuchen Sie https://www.redhat.com/wapps/tnc/termsack?event[]=signIn. Sie müssen sich gegebenenfalls vom Kundenportal abmelden und anschließend wieder anmelden, um die allgemeinen Geschäftsbedingungen zu sehen.".replaceAll("\\[", "\\\\[").replaceAll("\\]", "\\\\]").replaceAll("\\?", "\\\\?");
        if (sm_serverType.equals(CandlepinType.hosted))
            ll.add(Arrays.asList(new Object[] { new BlockedByBzBug(new String[] { "615362", "642805", "1089034", "1095389", "1458423" }), "de_DE.UTF-8", sm_usernameWithUnacceptedTC, sm_passwordWithUnacceptedTC, 255, null, expectedStderr }));
    }
    // registration test for a user who has been disabled (translated)
    if (!sm_disabledUsername.equals("")) {
        ll.add(Arrays.asList(new Object[] { null, "en_US.UTF-8", sm_disabledUsername, sm_disabledPassword, 255, null, "The user has been disabled, if this is a mistake, please contact customer service." }));
    }
    // for all rows, change the expected exitCode when testing post subscription-manager-1.13.8-1
    if (clienttasks.isPackageVersion("subscription-manager", ">=", "1.13.8-1")) {
        // post commit df95529a5edd0be456b3528b74344be283c4d258 bug 1119688
        for (List<Object> l : ll) {
            // Object bugzilla, String lang, String username, String password, Integer exitCode, String stdoutRegex, String stderrRegex
            // 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()));
            // Bug 1119688 - [RFE] subscription-manager better usability for scripts
            bugIds.add("1119688");
            blockedByBzBug = new BlockedByBzBug(bugIds.toArray(new String[] {}));
            l.set(0, blockedByBzBug);
            // EX_SOFTWARE
            l.set(4, new Integer(70));
        }
    }
    return ll;
}
Also used : ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) BlockedByBzBug(com.redhat.qe.auto.bugzilla.BlockedByBzBug)

Aggregations

BlockedByBzBug (com.redhat.qe.auto.bugzilla.BlockedByBzBug)67 ArrayList (java.util.ArrayList)67 List (java.util.List)67 JSONObject (org.json.JSONObject)21 HashSet (java.util.HashSet)18 File (java.io.File)14 DataProvider (org.testng.annotations.DataProvider)14 SubscriptionPool (rhsm.data.SubscriptionPool)7 BigInteger (java.math.BigInteger)5 ProductCert (rhsm.data.ProductCert)5 HashMap (java.util.HashMap)3 JSONArray (org.json.JSONArray)3 EntitlementCert (rhsm.data.EntitlementCert)3 Repo (rhsm.data.Repo)2 BugzillaAPIException (com.redhat.qe.auto.bugzilla.BugzillaAPIException)1 Matcher (java.util.regex.Matcher)1 Pattern (java.util.regex.Pattern)1 SkipException (org.testng.SkipException)1 ConsumerType (rhsm.base.ConsumerType)1 YumRepo (rhsm.data.YumRepo)1