aboutsummaryrefslogtreecommitdiffstats
path: root/test/sch/core_test.clj
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2018-02-22 19:05:02 -0500
committerMichael Hwang <mhwang@research.att.com>2018-02-22 19:08:28 -0500
commit308a8f90cc66b033535aa4c5c2098bb5bfcb26ee (patch)
tree797e5caed087789bb24095e6a130a1e4d55f4c85 /test/sch/core_test.clj
parentd914d08a70f018468e4b909a780c753ebce243e9 (diff)
Fix monkeypatching issue, use clj-fakes
Change-Id: I8ae31c1b3dfff3096e4bfef709a8f0581d2e9a7c Issue-ID: DCAEGEN2-260 Signed-off-by: Michael Hwang <mhwang@research.att.com>
Diffstat (limited to 'test/sch/core_test.clj')
-rw-r--r--test/sch/core_test.clj9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/sch/core_test.clj b/test/sch/core_test.clj
index e441343..958a0e6 100644
--- a/test/sch/core_test.clj
+++ b/test/sch/core_test.clj
@@ -20,7 +20,8 @@
(ns sch.core-test
(:use (clojure test))
- (:require [sch.core :refer [create-distribution-client-config deploy-artifacts-ex!]])
+ (:require [sch.core :refer [create-distribution-client-config deploy-artifacts-ex!]]
+ [clj-fakes.core :as f])
(:import (org.openecomp.sdc.utils DistributionStatusEnum))
)
@@ -38,9 +39,11 @@
}]}]
requests [{:asdcResourceId "123" :typeName "type-foo"}]
deploy-artifacts (partial deploy-artifacts-echo requests [] [] [])
- nada (intern 'sch.handle 'deploy-artifacts! deploy-artifacts)
]
- (is (= nil (deploy-artifacts-ex! "http://inventory" service-metadata requests send-dist-status-only-ok)))
+ (f/with-fakes
+ (f/patch! #'sch.handle/deploy-artifacts! deploy-artifacts)
+ (is (= nil (deploy-artifacts-ex! "http://inventory" service-metadata requests
+ send-dist-status-only-ok))))
)))