mirror of
https://github.com/altlinux/admc.git
synced 2025-03-16 14:50:13 +03:00
revert addition of adconfig to gplink test
This commit is contained in:
parent
8d4cc58e6d
commit
6e39c33496
@ -36,6 +36,18 @@ const QString gplink_C = "[LDAP://cn={CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC},cn=p
|
||||
|
||||
void test_gplink_equality(const Gplink &a, const QString &b);
|
||||
|
||||
void ADMCTestGplink::initTestCase() {
|
||||
}
|
||||
|
||||
void ADMCTestGplink::cleanupTestCase() {
|
||||
}
|
||||
|
||||
void ADMCTestGplink::init() {
|
||||
}
|
||||
|
||||
void ADMCTestGplink::cleanup() {
|
||||
}
|
||||
|
||||
void ADMCTestGplink::to_string() {
|
||||
Gplink gplink(test_gplink_string);
|
||||
|
||||
@ -230,15 +242,13 @@ void ADMCTestGplink::get_gpo_list_data() {
|
||||
QTest::addColumn<QList<QString>>("input");
|
||||
QTest::addColumn<QList<QString>>("expected_output");
|
||||
|
||||
const QString policies_dn = ad.adconfig()->policies_dn();
|
||||
const QString guid_rdn = "CN={AAAAAAAA-1234-GUID-AAAA-AAAAAAAAAAAA}";
|
||||
const QString dn_ldap_case = QString("%1,%2").arg(guid_rdn, policies_dn);
|
||||
const QString dn_lower_case = QString("%1,%2").arg(guid_rdn.toLower(), policies_dn);
|
||||
const QString dn_upper_case = QString("%1,%2").arg(guid_rdn.toUpper(), policies_dn);
|
||||
const QString dn_ldap_case = dn_A;
|
||||
const QString dn_lower_case = dn_ldap_case.toLower();
|
||||
const QString dn_upper_case = dn_ldap_case.toUpper();
|
||||
|
||||
QTest::newRow("LDAP case") << QList<QString>({dn_ldap_case}) << QList<QString>({dn_ldap_case});
|
||||
QTest::newRow("gplink case") << QList<QString>({dn_lower_case}) << QList<QString>({dn_ldap_case});
|
||||
QTest::newRow("all lower case") << QList<QString>({dn_lower_case}) << QList<QString>({dn_ldap_case});
|
||||
QTest::newRow("lower case") << QList<QString>({dn_lower_case}) << QList<QString>({dn_ldap_case});
|
||||
QTest::newRow("upper case") << QList<QString>({dn_lower_case}) << QList<QString>({dn_ldap_case});
|
||||
}
|
||||
|
||||
void ADMCTestGplink::get_gpo_list() {
|
||||
@ -251,7 +261,7 @@ void ADMCTestGplink::get_gpo_list() {
|
||||
gplink.add(gpo);
|
||||
}
|
||||
|
||||
const QList<QString> actual_output = gplink.get_gpo_list(ad.adconfig());
|
||||
const QList<QString> actual_output = gplink.get_gpo_list();
|
||||
QCOMPARE(actual_output, expected_output);
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,18 @@
|
||||
#ifndef ADMC_TEST_GPLINK_H
|
||||
#define ADMC_TEST_GPLINK_H
|
||||
|
||||
#include "admc_test.h"
|
||||
#include <QObject>
|
||||
#include <QTest>
|
||||
|
||||
class ADMCTestGplink : public ADMCTest {
|
||||
class ADMCTestGplink : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public slots:
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
private slots:
|
||||
void to_string();
|
||||
void equals();
|
||||
|
Loading…
x
Reference in New Issue
Block a user