From 8fff7dbddb87b17610d6643e4b5873357e7b1fc4 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 7 Sep 2021 20:23:07 +0900 Subject: [PATCH] [PackageManager][TCSACR-442] Add TCs for new APIs Change-Id: Iea1e3885c774d5c45b5bf790d38997b63a49a26e Signed-off-by: Sangyoon Jang --- .../org.example.samplerpk.rpk | Bin 0 -> 25312 bytes .../Tizen.Packagemanager.Tests.sln | 150 +++++++++++---------- .../testcase/TSPackage.cs | 27 ++++ .../testcase/TSPackageFilter.cs | 76 ++++++++++- .../testcase/support/TestHelper.cs | 9 ++ tool/script/pack.py | 3 + tool/script/template/inst.py | 25 ++++ 7 files changed, 217 insertions(+), 73 deletions(-) create mode 100644 tct-suite-vs/Resource/Tizen.Packagemanager.Tests/org.example.samplerpk.rpk diff --git a/tct-suite-vs/Resource/Tizen.Packagemanager.Tests/org.example.samplerpk.rpk b/tct-suite-vs/Resource/Tizen.Packagemanager.Tests/org.example.samplerpk.rpk new file mode 100644 index 0000000000000000000000000000000000000000..4bca7125e3281afc1f02a457d60d3ee6db8f8ed9 GIT binary patch literal 25312 zcmb5VW0WRAw5I!&ZL7<+ZQHIc+qSFAw(Tz4wr$(Cr_Whuow;{r&8&NW?8wX?@n-Cu zJ0qTm$W)L90YwD>0FZz(hYqDn1hp+bC;$Kz`JVxB0R}G4=5~&>P8Mdi2F@;yCUovL z)~YH{01#`c8vXw;7k3x{5a=lg0Pvs1k;agzfes5=`w#)e@*HF9X`%97;g79jiq$Ur4e{SALXzlF; z0pg_&LvoP3IkV9==Fbrr7_`P9{ zr=rhHeO^7pjwZ&o;ks&bWbO-kIRjC=$hUVx^yQlIgS3XgN?kAP;Ag{!tw*|>?jsE4 zM}!w+L3S^z7xY0zH0sku?lzLq+Z;bXKS6zQj^%(~r~C1pkj;uuO!*5BpQe8BiK{Zz zHCI(uf0)SN4P9Wjg&7=E?s+)RKl~mcj2?4 zM=PZo>E}rT5vWP00{YzOv?{OZj-Ke;Bc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of type IReadOnlyDictionary>"); + Assert.IsNotNull(allowedPackagesAndPrivileges, "allowedPackagesAndPrivileges should not be null."); + Assert.IsNotEmpty(allowedPackagesAndPrivileges, "allowedPackagesAndPrivileges should be not empty."); + Assert.AreEqual(allowedPackagesAndPrivileges.Count(), 3, "Number of elements of returned allowedPackagesAndPrivileges should correct."); + + var requiredPrivileges = allowedPackagesAndPrivileges.Where(kvp => kvp.Key == "org.tizen.alarm").FirstOrDefault().Value; + Assert.IsNotNull(requiredPrivileges, "requiredPrivileges should not be null."); + Assert.AreEqual(requiredPrivileges.Count(), 1, "Number of elements of requiredPrivileges should correct."); + } } } diff --git a/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackageFilter.cs b/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackageFilter.cs index 7e2f1c7..b05d2ef 100755 --- a/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackageFilter.cs +++ b/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/TSPackageFilter.cs @@ -41,7 +41,7 @@ namespace Tizen.Applications.Tests } [Test] - [Category("P0")] + [Category("P1")] [Description("Check if PackageFilter returns proper object")] [Property("SPEC", "Tizen.Applications.PackageFilter.PackageFilter C")] [Property("SPEC_URL", "-")] @@ -64,6 +64,56 @@ namespace Tizen.Applications.Tests [Test] [Category("P1")] + [Description("Check if PackageFilter returns proper object")] + [Property("SPEC", "Tizen.Applications.PackageFilter.PackageFilter C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")] + [Property("COVPARAM", "System.Collections.Generic.IDictionary")] + public void PackageFilter_INIT_WITH_STRING_FILTER() + { + // TEST CODE + Dictionary stringFilters = new Dictionary(); + stringFilters.Add(PackageFilter.Keys.ResourceType, "tizen.ai"); + PackageFilter filter = new PackageFilter(stringFilters); + Assert.IsInstanceOf(filter); + + var packageStringFilters = filter.StringFilters as Dictionary; + Assert.IsNotNull(packageStringFilters, "Filters property in constructed PackageFilter object should not be null"); + Assert.IsTrue(packageStringFilters.Count == 1, string.Format("Package Filters Count, Expected: 1, Actual: {0}", packageStringFilters.Count)); + Assert.IsTrue(packageStringFilters[PackageFilter.Keys.ResourceType] == "tizen.ai", string.Format("Package Filters {0}, Expected: tizen.ai, Actual: {1}", PackageFilter.Keys.ResourceType, packageStringFilters[PackageFilter.Keys.ResourceType])); + } + + [Test] + [Category("P1")] + [Description("Check if PackageFilter returns proper object")] + [Property("SPEC", "Tizen.Applications.PackageFilter.PackageFilter C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")] + [Property("COVPARAM", "System.Collections.Generic.IDictionary, System.Collections.Generic.IDictionary")] + public void PackageFilter_INIT_WITH_BOOL_STRING_FILTER() + { + // TEST CODE + Dictionary filters = new Dictionary(); + filters.Add(PackageFilter.Keys.Preload, true); + Dictionary stringFilters = new Dictionary(); + stringFilters.Add(PackageFilter.Keys.ResourceType, "tizen.ai"); + PackageFilter filter = new PackageFilter(filters, stringFilters); + Assert.IsInstanceOf(filter); + + var packageFilters = filter.Filters as Dictionary; + Assert.IsNotNull(packageFilters, "Filters property in constructed PackageFilter object should not be null"); + Assert.IsTrue(packageFilters.Count == 1, string.Format("Package Filters Count, Expected: 1, Actual: {0}", packageFilters.Count)); + Assert.IsTrue(packageFilters[PackageFilter.Keys.Preload] == true, string.Format("Package Filters {0}, Expected: true, Actual: {1}", PackageFilter.Keys.Preload, packageFilters[PackageFilter.Keys.Preload])); + var packageStringFilters = filter.StringFilters as Dictionary; + Assert.IsNotNull(packageStringFilters, "Filters property in constructed PackageFilter object should not be null"); + Assert.IsTrue(packageStringFilters.Count == 1, string.Format("Package Filters Count, Expected: 1, Actual: {0}", packageStringFilters.Count)); + Assert.IsTrue(packageStringFilters[PackageFilter.Keys.ResourceType] == "tizen.ai", string.Format("Package Filters {0}, Expected: tizen.ai, Actual: {1}", PackageFilter.Keys.ResourceType, packageStringFilters[PackageFilter.Keys.ResourceType])); + } + + [Test] + [Category("P1")] [Description("Check if Filters peroperty has correct values")] [Property("SPEC", "Tizen.Applications.PackageFilter.Filters A")] [Property("SPEC_URL", "-")] @@ -95,6 +145,30 @@ namespace Tizen.Applications.Tests [Test] [Category("P1")] + [Description("Check if StringFilters peroperty has correct values")] + [Property("SPEC", "Tizen.Applications.PackageFilter.StringFilters A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Sangyoon Jang, jeremy.jang@samsung.com")] + public void StringFilters_READ_ONLY() + { + // TEST CODE + Dictionary filters = new Dictionary(); + + string valueString = "tizen.ai"; + filters.Add(PackageFilter.Keys.ResourceType, valueString); + + PackageFilter filter = new PackageFilter(filters); + Assert.IsInstanceOf(filter); + + var packageFilters = filter.StringFilters as Dictionary; + Assert.IsNotNull(packageFilters, "StringFilters property in constructed PackageFilter object should not be null"); + Assert.IsTrue(packageFilters.Count == 1, string.Format("Package Filters Count, Expected: 1, Actual: {0}", packageFilters.Count)); + Assert.AreEqual(valueString, packageFilters[PackageFilter.Keys.ResourceType], string.Format("Package Filters {0}, Expected: {1}, Actual: {2}", PackageFilter.Keys.ResourceType, valueString, packageFilters[PackageFilter.Keys.ResourceType])); + } + + [Test] + [Category("P1")] [Description("Check if Filters Keys has correct values as mentioned in SPEC")] [Property("SPEC", "Tizen.Applications.PackageFilter.Keys A")] [Property("SPEC_URL", "-")] diff --git a/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/support/TestHelper.cs b/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/support/TestHelper.cs index 9504757..8f037ad 100755 --- a/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/support/TestHelper.cs +++ b/tct-suite-vs/Tizen.Packagemanager.Tests/testcase/support/TestHelper.cs @@ -43,10 +43,12 @@ namespace Tizen.Applications.Tests private static Lazy _tpkPackage = null; private static Lazy _watchPackage = null; private static Lazy _wgtPackage = null; + private static Lazy _rpkPackage = null; internal static Package TpkPackage { get { return _tpkPackage.Value; } } internal static Package WatchPackage { get { return _watchPackage.Value; } } internal static Package WgtPackage { get { return _wgtPackage.Value; } } + internal static Package RpkPackage { get { return _rpkPackage.Value; } } internal static Dictionary TestPackages { get { return null; } } static TestHelper() @@ -54,6 +56,7 @@ namespace Tizen.Applications.Tests _tpkPackage = new Lazy(() => PackageManager.GetPackage(TpkTestData.Id)); _wgtPackage = new Lazy(() => PackageManager.GetPackage(WgtTestData.Id)); _watchPackage = new Lazy(() => PackageManager.GetPackage(WatchTestData.Id)); + _rpkPackage = new Lazy(() => PackageManager.GetPackage(RpkTestData.Id)); // check the external storage for the test related to external storage. string profile; @@ -148,6 +151,12 @@ namespace Tizen.Applications.Tests internal static int WatchAppCount = 1; } + internal class RpkTestData + { + internal static string Id = "org.example.samplerpk"; + internal static string AppId = "org.example.samplerpk"; + } + internal class PackageData { public string Id { get; set; } diff --git a/tool/script/pack.py b/tool/script/pack.py index 9b0edf4..cb51048 100755 --- a/tool/script/pack.py +++ b/tool/script/pack.py @@ -128,6 +128,9 @@ def copy_helper_application(folder_path , dest): elif filepath.endswith('.wgt'): shutil.copy(filepath, dest) #print(filepath) + elif filepath.endswith('.rpk'): + shutil.copy(filepath, dest) + print(filepath) def file_count(path): diff --git a/tool/script/template/inst.py b/tool/script/template/inst.py index b0f3f8e..593f6d6 100755 --- a/tool/script/template/inst.py +++ b/tool/script/template/inst.py @@ -153,6 +153,22 @@ def uninstPKGs(): if "Failure" in line: action_status = False break + elif file.endswith(".rpk"): + pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0])) + if not pkg_id: + print ("rpk pkg_id is None. file name is : %s " % (file)) + action_status = False + continue + + print ("rpk pkg_id : %s" % (pkg_id)) + (return_code, output) = doRemoteCMD( + "pkgcmd -un %s" % pkg_id) + + for line in output: + if "Failure" in line: + action_status = False + break + (return_code, output) = doRemoteCMD( "rm -rf %s" % PKG_SRC_DIR) @@ -311,6 +327,15 @@ def instPKGs(): if "Failure" in line: action_status = False break + elif file.endswith(".rpk"): + if not doRemoteCopy(root + '/' + file, "%s/%s" % (SRC_DIR, file)): + action_status = False + (return_code, output) = doRemoteCMD("pkgcmd -ip %s/%s" % (SRC_DIR, file)) + for line in output: + if "Failure" in line: + action_status = False + break + doRemoteCMD("rm -rf %s/%s" % (SRC_DIR, file)) return action_status -- 2.7.4