Back

join-fixtures (clj)

(source)

function

(join-fixtures fixtures)
Composes a collection of fixtures, in order. Always returns a valid fixture function, even if the collection is empty.

Examples

gojek/ziggurat
(ns ziggurat.middleware.json-test
  (:require [cheshire.core :refer [generate-string]]
            [clojure.test :refer [deftest is join-fixtures testing use-fixtures]]
            [ziggurat.fixtures :as fix]
            [ziggurat.metrics :as metrics]
            [ziggurat.middleware.json :refer [parse-json]]))

(use-fixtures :once (join-fixtures [fix/mount-only-config
                                    fix/silence-logging]))
gojek/ziggurat
(ns ziggurat.messaging.channel-pool-test
  (:require [clojure.test :refer :all]
            [ziggurat.messaging.channel-pool :as cpool :refer [channel-pool]]
            [ziggurat.messaging.producer-connection :refer [producer-connection]]
            [ziggurat.fixtures :as fix])
  (:import (org.apache.commons.pool2.impl GenericObjectPoolConfig GenericObjectPool)
           (java.time Duration)
           (com.rabbitmq.client Channel)))

(use-fixtures :once (join-fixtures [fix/mount-only-config
                                    fix/mount-config-with-tracer]))
nasa/Common-Metadata-Repository
(ns cmr.system-int-test.search.tool.tool-revisions-search-test
  "Integration test for search all revisions search"
  (:require
   [clojure.test :refer :all]
   [cmr.common.util :refer [are3]]
   [cmr.mock-echo.client.echo-util :as e]
   [cmr.system-int-test.data2.core :as d]
   [cmr.system-int-test.data2.umm-json :as du]
   [cmr.system-int-test.system :as s]
   [cmr.system-int-test.utils.index-util :as index]
   [cmr.system-int-test.utils.ingest-util :as ingest]
   [cmr.system-int-test.utils.metadata-db-util :as mdb]
   [cmr.system-int-test.utils.search-util :as search]
   [cmr.system-int-test.utils.tool-util :as tool]
   [cmr.umm-spec.versioning :as umm-version]))

(use-fixtures :each
              (join-fixtures
               [(ingest/reset-fixture {"provguid1" "PROV1" "provguid2" "PROV2"})
                tool/grant-all-tool-fixture]))
nasa/Common-Metadata-Repository
(ns cmr.system-int-test.bootstrap.fingerprint-test
  "Integration test for CMR fingerprint operations."
  (:require
   [clojure.test :refer :all]
   [cmr.system-int-test.data2.collection :as data2-collection]
   [cmr.system-int-test.data2.core :as data2-core]
   [cmr.system-int-test.system :as s]
   [cmr.system-int-test.utils.bootstrap-util :as bootstrap]
   [cmr.system-int-test.utils.index-util :as index]
   [cmr.system-int-test.utils.ingest-util :as ingest]
   [cmr.system-int-test.utils.metadata-db-util :as mdb]
   [cmr.system-int-test.utils.variable-util :as variable]))

(use-fixtures :each (join-fixtures
                     [(ingest/reset-fixture {"provguid1" "PROV1"
                                             "provguid2" "PROV2"}
                                            {:grant-all-ingest? true
                                             :grant-all-search? true
                                             :grant-all-access-control? false})]))
nasa/Common-Metadata-Repository
(ns cmr.system-int-test.search.acls.collection-test
  "Tests searching for collections with ACLs in place."
  (:require
   [clojure.string :as str]
   [clojure.test :refer :all]
   [cmr.acl.acl-fetcher :as acl-fetcher]
   [cmr.common-app.test.side-api :as side]
   [cmr.common.services.messages :as msg]
   [cmr.common.util :as util]
   [cmr.mock-echo.client.echo-util :as e]
   [cmr.system-int-test.data2.atom :as da]
   [cmr.system-int-test.data2.collection :as dc]
   [cmr.system-int-test.data2.core :as d]
   [cmr.system-int-test.data2.opendata :as od]
   [cmr.system-int-test.system :as s]
   [cmr.system-int-test.utils.dev-system-util :as dev-sys-util]
   [cmr.system-int-test.utils.index-util :as index]
   [cmr.system-int-test.utils.ingest-util :as ingest]
   [cmr.system-int-test.utils.metadata-db-util :as mdb]
   [cmr.system-int-test.utils.search-util :as search]
   [cmr.transmit.access-control :as ac]
   [cmr.transmit.config :as tc]))

(use-fixtures :each (join-fixtures
                      [(ingest/reset-fixture {"provguid1" "PROV1" "provguid2" "PROV2"
                                              "provguid3" "PROV3" "provguid4" "PROV4"}
                                             {:grant-all-search? false})
                       (search/freeze-resume-time-fixture)]))