 (deftest associate-variable-failure-test
   (e/grant-registered-users (s/context) (e/coll-catalog-item-id "PROV1"))
   (let [variable-name "variable1"
-        variable (vu/make-variable-concept {:Name variable-name})
-        {token :token} (vu/setup-update-acl
-                        (s/context) "PROV1" "user1" "update-group")
-        {:keys [concept-id revision-id]} (vu/create-variable token variable)
-        ;; The stored updated variable would have user1 in the originator id
-        variable (assoc variable :originator-id "user1")
+        token (e/login (s/context) "user1")
+        {:keys [concept-id revision-id]} (vu/ingest-variable-with-attrs {:Name variable-name})
         coll-concept-id (:concept-id (d/ingest "PROV1" (dc/collection)))]
     (testing "Associate variable using query sent with invalid content type"
       (are [associate-variable-fn request-json]

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


  (let [[coll1 coll2 coll3] (for [n (range 1 4)]
                              (d/ingest "PROV1" (dc/collection)))
        [coll1-id coll2-id coll3-id] (map :concept-id [coll1 coll2 coll3])
        token (e/login (s/context) "user1")]
    (vu/ingest-variable-with-attrs {:Name "variable1"})
    (vu/ingest-variable-with-attrs {:Name "variable2"})
    (index/wait-until-indexed)

    ;; associate variable1 to coll1, variable2 to coll2
