Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoivisto committed Feb 21, 2025
1 parent 5246d7f commit 23a613c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions test/yki/handler/base_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@
(ig/init-key :yki.boundary.cas/cas-client {:url-helper url-helper
:cas-creds {:username "username"
:password "password"}}))

(defn email-boundary [url-helper cas-client]
(ig/init-key :yki.boundary.email/email-client {:url-helper url-helper
:cas-client cas-client}))

(defn onr-client [url-helper]
(ig/init-key :yki.boundary.onr/onr-client {:url-helper url-helper
:cas-client (cas-client url-helper)}))
Expand Down
13 changes: 8 additions & 5 deletions test/yki/job/scheduled_tasks_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@

(defn create-email-q-reader
[port retry-duration-in-days]
(ig/init-key :yki.job.scheduled-tasks/email-queue-reader {:url-helper (base/create-url-helper (str "localhost:" port))
:handle-at-once-at-most 1
:basic-auth {:user "user" :password "pass"}
:retry-duration-in-days retry-duration-in-days
:email-q (base/email-q)}))
(let [url-helper (base/create-url-helper (str "localhost:" port))
cas-client (base/cas-client url-helper)
email-boundary (base/email-boundary url-helper cas-client)]
(ig/init-key :yki.job.scheduled-tasks/email-queue-reader {:url-helper url-helper
:handle-at-once-at-most 1
:retry-duration-in-days retry-duration-in-days
:email-q (base/email-q)
:email-boundary email-boundary})))

(deftest handle-email-request-test
(with-routes!
Expand Down

0 comments on commit 23a613c

Please sign in to comment.