From 8697044da15570ae1258e42456108117187c9794 Mon Sep 17 00:00:00 2001 From: eereiter Date: Fri, 20 Oct 2023 15:15:22 -0400 Subject: [PATCH] Delete common-app-lib/test/cmr/common_app/services/kms_fetcher_test.clj --- .../common_app/services/kms_fetcher_test.clj | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 common-app-lib/test/cmr/common_app/services/kms_fetcher_test.clj diff --git a/common-app-lib/test/cmr/common_app/services/kms_fetcher_test.clj b/common-app-lib/test/cmr/common_app/services/kms_fetcher_test.clj deleted file mode 100644 index 9b5b211444..0000000000 --- a/common-app-lib/test/cmr/common_app/services/kms_fetcher_test.clj +++ /dev/null @@ -1,32 +0,0 @@ -(ns cmr.common-app.services.kms-fetcher-test - (:require - [clojure.test :refer :all] - [cmr.common.cache :as cache] - [cmr.common.cache.in-memory-cache :as mem-cache] - [cmr.common-app.services.kms-fetcher :as fetcher] - [cmr.transmit.config :as transmit-config] - [cmr.transmit.kms :as trans-kms])) - -(deftest validate-getting-kms-keywords-test - (let [sys (transmit-config/system-with-connections - {:caches {fetcher/kms-cache-key (mem-cache/create-in-memory-cache)}} - [:kms]) - context {:system sys} - kms-cache (cache/context->cache context fetcher/kms-cache-key) - _ (#'fetcher/refresh-kms-cache context) - kms-map (cache/get-value kms-cache fetcher/kms-cache-key)] - - (testing "Testing that KMS keywords such as projects exist after normal loading." - (is (some? (:projects kms-map)))) - - (testing "Test KMS keywords API returning nil for testing purposes." - (let [context (assoc context :testing-for-nil-keyword-scheme-value true)] - (is (nil? (trans-kms/get-keywords-for-keyword-scheme context :projects))))) - - ;; Test to make sure that if KMS keywords API returns nil for a keyword after - ;; parsing, (KMS API is down) that previous cache value is used, so that we don't - ;; wipe out the KMS keyword values in the cache. - (testing "Makes sure that KMS keywords are not wiped out." - (let [context (assoc context :testing-for-nil-keyword-scheme-value true)] - (#'fetcher/refresh-kms-cache context) - (is (some? (:projects (cache/get-value kms-cache fetcher/kms-cache-key))))))))