Fix lib-tests

This commit is contained in:
Michiel Borkent 2020-06-27 11:31:05 +02:00
parent 3631dba590
commit ede2916c6b

View file

@ -1,6 +1,6 @@
(ns babashka.run-all-libtests (ns babashka.run-all-libtests
(:require [clojure.test :as t] (:require [clojure.java.io :as io]
[clojure.java.io :as io])) [clojure.test :as t]))
(def status (atom {})) (def status (atom {}))
@ -16,23 +16,25 @@
(require '[clj-http.lite.client :as client]) (require '[clj-http.lite.client :as client])
(require '[cheshire.core :as json]) (require '[cheshire.core :as json])
(prn (:status (client/get "https://www.clojure.org"))) (prn (:status (client/get "https://www.clojure.org" {:throw-exceptions false})))
(prn (:status (client/get "https://postman-echo.com/get?foo1=bar1&foo2=bar2"))) (prn (:status (client/get "https://postman-echo.com/get?foo1=bar1&foo2=bar2" {:throw-exceptions false})))
(prn (:status (client/post "https://postman-echo.com/post"))) (prn (:status (client/post "https://postman-echo.com/post" {:throw-exceptions false})))
(prn (:status (client/post "https://postman-echo.com/post" (prn (:status (client/post "https://postman-echo.com/post"
{:body (json/generate-string {:a 1}) {:body (json/generate-string {:a 1})
:headers {"X-Hasura-Role" "admin"} :headers {"X-Hasura-Role" "admin"}
:content-type :json :content-type :json
:accept :json}))) :accept :json
:throw-exceptions false})))
(prn (:status (client/put "https://postman-echo.com/put" (prn (:status (client/put "https://postman-echo.com/put"
{:body (json/generate-string {:a 1}) {:body (json/generate-string {:a 1})
:headers {"X-Hasura-Role" "admin"} :headers {"X-Hasura-Role" "admin"}
:content-type :json :content-type :json
:accept :json}))) :accept :json
:throw-exceptions false})))
;;;; spartan.spec ;;;; spartan.spec