Commit 030f8806 authored by Marko Saukko's avatar Marko Saukko

Add test for repository-specific-variables.

[ssu] Add test for repository-specific-variables. JB#46366
Signed-off-by: default avatarMarko Saukko <marko.saukko@jolla.com>
parent a534fc83
......@@ -26,6 +26,17 @@ void DeviceInfoTest::testAdaptationVariables()
QCOMPARE(repoName, QString("adaptation"));
}
void DeviceInfoTest::testFeatureVariables()
{
SsuDeviceInfo deviceInfo("N950");
QHash<QString, QString> featureVariables;
QString repoName = deviceInfo.adaptationVariables("feature1", &featureVariables);
QHash<QString, QString> featureVariablesExpected;
featureVariablesExpected["feature"] = "test";
QCOMPARE(featureVariables, featureVariablesExpected);
QCOMPARE(repoName, QString("feature1"));
}
void DeviceInfoTest::testDeviceUid()
{
QVERIFY2(!SsuDeviceInfo().deviceUid().isEmpty(), "No method to get device UID on this platform");
......
......@@ -16,6 +16,7 @@ class DeviceInfoTest: public QObject
private slots:
void testAdaptationVariables();
void testFeatureVariables();
void testDeviceUid();
void testVariableSection();
void testValue();
......
......@@ -16,6 +16,7 @@ N950=N9
family=n950-n9
adaptation-repos=n9xx-common,n950-n9
variables = n9
repository-specific-variables=N9-feature1
[var-n9]
foo-n9 = foo-n9-val
......@@ -49,3 +50,7 @@ bar2 = bar2Val
[var-baz]
variables = foo, bar
[var-N9-feature1]
feature=test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment