Permalink
Browse files

Changes:

- upgraded unboundid-ldapsdk jar
- switched to Clojure 1.3.0
- replaced clj-file-utils with fs
- added dynamic declarations to tests where required
  • Loading branch information...
1 parent ed1884e commit 072fd1be4d8d96a806759bedcccd0da1cae39e86 @pauldorman committed Mar 5, 2012
Showing with 14 additions and 21 deletions.
  1. +6 −7 project.clj
  2. +5 −6 test/clj_ldap/test/client.clj
  3. +3 −8 test/clj_ldap/test/server.clj
View
@@ -1,14 +1,13 @@
-(defproject org.clojars.pntblnk/clj-ldap "0.0.7"
+(defproject org.clojars.pntblnk/clj-ldap "0.0.8"
:description "Clojure ldap client (development fork of alienscience's clj-ldap)."
:url "https://github.com/pauldorman/clj-ldap"
- :dependencies [[org.clojure/clojure "1.2.0"]
- [com.unboundid/unboundid-ldapsdk "2.1.0"]]
- :dev-dependencies [[swank-clojure "1.3.0"]
- [jline "0.9.94"]
+ :dependencies [[org.clojure/clojure "1.3.0"]
+ [com.unboundid/unboundid-ldapsdk "2.3.0"]]
+ :dev-dependencies [[jline "0.9.94"]
[org.apache.directory.server/apacheds-all "1.5.5"]
+ [fs "1.1.2"]
[org.slf4j/slf4j-simple "1.5.6"]
- [clj-file-utils "0.2.1"]
- [lein-clojars "0.6.0"]]
+ [lein-clojars "0.7.0"]]
:aot [clj-ldap.client]
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
@@ -1,4 +1,3 @@
-
(ns clj-ldap.test.client
"Automated tests for clj-ldap"
(:require [clj-ldap.client :as ldap])
@@ -8,18 +7,18 @@
;; Tests are run over a variety of connection types
-(def port* 8000)
-(def ssl-port* 8001)
-(def *connections* nil)
-(def *conn* nil)
+(def port* 1389)
+(def ssl-port* 1636)
+(def ^:dynamic *connections* nil)
+(def ^:dynamic *conn* nil)
;; Tests concentrate on a single object class
(def base* "ou=people,dc=alienscience,dc=org,dc=uk")
(def dn* (str "cn=%s," base*))
(def object-class* #{"top" "person"})
;; Variable to catch side effects
-(def *side-effects* nil)
+(def ^:dynamic *side-effects* nil)
;; Result of a successful write
(def success* {:code 0 :name "success"})
@@ -1,8 +1,7 @@
-
(ns clj-ldap.test.server
"An embedded ldap server for unit testing"
- (:require [clj-ldap.client :as ldap])
- (:use [clj-file-utils.core :only [rm-rf mkdir-p]])
+ (:require [clj-ldap.client :as ldap]
+ [fs.core :as fs])
(:import [org.apache.directory.server.core
DefaultDirectoryService
DirectoryService])
@@ -37,8 +36,7 @@
(defn- start-ldap-server
"Start up an embedded ldap server"
[port ssl-port]
- (let [work-path (doto "/tmp/apacheds" rm-rf mkdir-p)
- work-dir (java.io.File. work-path)
+ (let [work-dir (fs/temp-dir)
directory-service (doto (DefaultDirectoryService.)
(.setShutdownHookEnabled true)
(.setWorkingDirectory work-dir))
@@ -73,9 +71,6 @@
:sn "Hazledine"
:description "Creator of bugs"}))
-
-
-
(defn stop!
"Stops the embedded ldap server"
[]

0 comments on commit 072fd1b

Please sign in to comment.