SMS healthcheck should unmount domain 33/70633/1
authorKiran Kamineni <kiran.k.kamineni@intel.com>
Wed, 17 Oct 2018 05:18:16 +0000 (22:18 -0700)
committerKiran Kamineni <kiran.k.kamineni@intel.com>
Wed, 17 Oct 2018 05:18:26 +0000 (22:18 -0700)
SMS healthcheck should unmount domain
using the domain name instead of UUID

Issue-ID: AAF-570
Change-Id: I43fb881e047bf840e698b7f8e317125abb421a7b
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
sms-service/src/sms/handler/handler.go

index 902d170..805f7a8 100644 (file)
@@ -266,13 +266,13 @@ func (h handler) healthCheckHandler(w http.ResponseWriter, r *http.Request) {
 
        // backend is not sealed
        dname, _ := uuid.GenerateUUID()
-       dom, err := h.secretBackend.CreateSecretDomain(dname)
+       _, err = h.secretBackend.CreateSecretDomain(dname)
        if smslogger.CheckError(err, "HealthCheck Create Domain") != nil {
                http.Error(w, err.Error(), http.StatusInternalServerError)
                return
        }
 
-       err = h.secretBackend.DeleteSecretDomain(dom.UUID)
+       err = h.secretBackend.DeleteSecretDomain(dname)
        if smslogger.CheckError(err, "HealthCheck Delete Domain") != nil {
                http.Error(w, err.Error(), http.StatusInternalServerError)
                return