Commit 7cfa5798 authored by Raymond Huang's avatar Raymond Huang

Add test for deploying to a file repo

parent bf7e029d
......@@ -3,7 +3,8 @@
[clojure.java.io :only [file]]
[leiningen.deploy]
[leiningen.test.helper :only [delete-file-recursively
tmp-dir sample-project]]))
tmp-dir sample-project
sample-deploy-project]]))
(defn- repo-path
[relative-repo-path]
......@@ -45,6 +46,21 @@
repo-path repo-url)}})
"deploy-only-repo")))
(deftest ^:online test-deploy-classifier
(testing "deployment with explicit file names uploads classifiers to repo"
(let [deploy-dir (repo-path "deploy-classifier")
project (assoc sample-deploy-project
:deploy-repositories
{"snapshots" {:url (repo-url deploy-dir)}})]
(delete-file-recursively deploy-dir :silently)
(deploy project "snapshots"
"deploy-me/deploy-me"
(:version project)
(str (:root project) "/deploy-me-0.1.0-SNAPSHOT-fat.jarr"))
(let [dir (file deploy-dir "deploy-me/deploy-me/0.1.0-SNAPSHOT/")
files (.list dir)]
(is (seq (filter #(re-find #"deploy-me-0.1.0-[\d.]+-\d+-fat.jarr$" %) files)))))))
(deftest signing
(testing "GPG invocation"
(is (= (signing-args "foo.jar" nil)
......
......@@ -50,6 +50,8 @@
(def sample-fixture-error-project (read-test-project "sample-fixture-error"))
(def sample-deploy-project (read-test-project "sample-deploy"))
(def tricky-name-project (read-test-project "tricky-name"))
(def native-project (read-test-project "native"))
......
(defproject deploy-me "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment