[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 818 Fixed SelfTestService.findSelfTests().



The SelfTestService.findSelfTests() has been modified to return
all selftests defined in the CS.cfg.

https://fedorahosted.org/pki/ticket/2432

Pushed to master (10.4) under one-liner/trivial rule.

--
Endi S. Dewata
>From 4f53055b544d9651239ade69877b5364b838ab66 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata redhat com>
Date: Tue, 16 Aug 2016 01:43:36 +0200
Subject: [PATCH] Fixed SelfTestService.findSelfTests().

The SelfTestService.findSelfTests() has been modified to return
all selftests defined in the CS.cfg.

https://fedorahosted.org/pki/ticket/2432
---
 .../common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java | 4 ++++
 base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java    | 2 +-
 .../cmscore/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java | 4 ++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java b/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
index c07b96acb8f31095143b5288b238ee051dd23626..a55c6517206accb26d0a6f5a19f8bc7c713abffb 100644
--- a/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
+++ b/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
@@ -20,6 +20,8 @@
 
 package com.netscape.certsrv.selftests;
 
+import java.util.Collection;
+
 ///////////////////////
 // import statements //
 ///////////////////////
@@ -68,6 +70,8 @@ public interface ISelfTestSubsystem
     // ISelfTestSubsystem methods //
     ////////////////////////////////
 
+    public Collection<String> getSelfTestNames();
+
     //
     // methods associated with the list of on demand self tests
     //
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java b/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java
index e662ba9e76706c425c97e0f788315a55a6985542..9108a45fe301b0f86509c169bd4d4440389b3166 100644
--- a/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java
+++ b/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java
@@ -113,7 +113,7 @@ public class SelfTestService extends PKIService implements SelfTestResource {
 
             // filter self tests
             Collection<String> results = new ArrayList<String>();
-            for (String name : subsystem.listSelfTestsEnabledOnDemand()) {
+            for (String name : subsystem.getSelfTestNames()) {
                 if (filter != null && !name.contains(filter)) continue;
                 results.add(name);
             }
diff --git a/base/server/cmscore/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java b/base/server/cmscore/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java
index 8dc95cc5b24195759a3a0fcc9cdbc8abf06932ae..d7d7a3a8974b0810f110aefe6823513a396288c1 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/selftests/SelfTestSubsystem.java
@@ -243,6 +243,10 @@ public class SelfTestSubsystem
     // SelfTestSubsystem methods //
     ///////////////////////////////
 
+    public Collection<String> getSelfTestNames() {
+        return mSelfTestInstances.keySet();
+    }
+
     //
     // methods associated with the list of on demand self tests
     //
-- 
2.5.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]