-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Specify linked issues and REMOVE THE UNUSED LINES --> Close advthreat/iroh#8042 <!-- Describe your PR for reviewers. Don't forget to set correct labels (User Facing / Beta / Feature Flag) If there is UI change please add a screen capture. --> <!-- UNCOMMENT THIS SECTION IF NEEDED <a name="iroh-services-clients">[§](#iroh-services-clients)</a> IROH Services Clients ===================================================================================== Put all informations that need to be communicated to IROH Services Clients. Typically IROH-UI, ATS Integration, Orbital, etc... --> <a name="qa">[§](#qa)</a> QA ============================ <!-- Describe the steps to test your PR. 1. 2. 3. Or if no QA is needed keep it as is. --> No QA is needed. <!-- UNCOMMENT THIS SECTION IF NEEDED <a name="ops">[§](#ops)</a> Ops =============================== Specify Ops related issues and documentation - Config change needed: threatgrid/tenzin# - Migration needed: threatgrid/tenzin# - How to enable/disable that feature: (ex remove service from `bootstrap.cfg`, add scope to org) --> <!-- UNCOMMENT THIS SECTION IF NEEDED <a name="documentation">[§](#documentation)</a> Documentation ============================================================= Public Facing documentation section; - Public documentation updated needed: threatgrid/iroh-ui# See internal [doc file](./services/iroh-auth/doc/public-doc.org) --> <a name="release-notes">[§](#release-notes)</a> Release Notes ============================================================= <!-- REMOVE UNUSED LINES --> ``` intern: Do not init disabled stores ``` <a name="squashed-commits">[§](#squashed-commits)</a> Squashed Commits ======================================================================
- Loading branch information
Showing
17 changed files
with
94 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
(ns ctia.store-service-test | ||
(:require [ctia.store-service :as sut])) | ||
(:require [clj-momo.test-helpers.core :as mth] | ||
[clojure.test :refer [deftest is testing use-fixtures]] | ||
[ctia.store-service :as sut] | ||
[ctia.stores.es.init :as es-init] | ||
[ctia.test-helpers.core :as th] | ||
[ctia.test-helpers.es :as es-th] | ||
[ctia.test-helpers.store :refer [test-for-each-store-with-app]] | ||
[ductile.conn :as es-conn] | ||
[ductile.index :as index] | ||
[puppetlabs.trapperkeeper.app :as app])) | ||
|
||
(use-fixtures :once mth/fixture-schema-validation) | ||
|
||
(defn store-service-map | ||
"Service map for #'sut/store-service" | ||
[] | ||
{:StoreService sut/store-service}) | ||
|
||
(deftest disabled-initialization-test | ||
(doseq [disable? [true false]] | ||
(testing disable? | ||
(th/with-properties ["ctia.features.disable" (if disable? "asset" "")] | ||
(test-for-each-store-with-app | ||
(fn [app] | ||
(let [conn (es-conn/connect (es-init/get-store-properties | ||
::no-store | ||
(get-in (app/service-graph app) [:ConfigService :get-in-config])))] | ||
(try | ||
(is (= disable? (not (index/get conn (es-th/get-indexname app :asset))))) | ||
(finally | ||
(es-conn/close conn)))))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters