packages feed

hspec-server 0.3.1 → 0.3.2

raw patch · 4 files changed

+41/−26 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Test.Hspec.Server.ServerType: Docker :: String -> !(Maybe ServerOS) -> Docker
+ Test.Hspec.Server.ServerType: dContainerId :: Docker -> String
+ Test.Hspec.Server.ServerType: dOS :: Docker -> !(Maybe ServerOS)
+ Test.Hspec.Server.ServerType: data Docker
+ Test.Hspec.Server.ServerType: docker :: String -> Docker
+ Test.Hspec.Server.ServerType: instance Eq Docker
+ Test.Hspec.Server.ServerType: instance ServerType Docker
+ Test.Hspec.Server.ServerType: instance Show Docker

Files

Test/Hspec/Server/ServerType.hs view
@@ -74,3 +74,18 @@     hClose handle     readProcessWithExitCode "ssh" (["-F",file,stName d,c]++arg) i +data Docker = Docker {+   dContainerId :: String+ , dOS :: !(Maybe ServerOS)+} deriving (Show,Eq)++docker :: String ->  Docker+docker containerid = Docker containerid Nothing++instance ServerType Docker where+  stSetup a = do+    os' <- detectOS a+    return $ a {dOS = os'}+  stOS = dOS+  stName = dContainerId+  stCmd d c arg i = readProcessWithExitCode "docker" (["exec",stName d,c]++arg) i
hspec-server.cabal view
@@ -2,8 +2,8 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                hspec-server-version:             0.3.1-synopsis:            Test Framework for Server's status+version:             0.3.2+synopsis:            Test Framework for checking server's status description:         Hspec-Server is test framework for checking server's status.                      It is inspired by the Ruby library ServerSpec. license:             BSD3@@ -44,7 +44,7 @@ test-suite test     type:              exitcode-stdio-1.0     main-is:           test.hs-    hs-source-dirs:    test,dist/build/autogen+    hs-source-dirs:    tests,dist/build/autogen     ghc-options:       -Wall      build-depends: base
− test/test.hs
@@ -1,23 +0,0 @@-import Data.Monoid-import Test.Hspec-import Test.Hspec.Server-import Test.Hspec.Contrib.Retry-import Control.Monad.IO.Class--main :: IO ()-main = hspec $ do-    describe "hoge" $ with localhost $ do-      it "package test" $ do-        os <- getServerOS-        liftIO $ os `shouldBe` (Just $ Ubuntu "12.04")-      it "package test" $ do-        package "zookeeper" @>= Installed-      it "port test" $ do-        port 2181 @>= Listening-      it "service test" $ do-        service "zookeeper" @>= Running-      it "command test" $ do-        command "echo" ["hoge"] [] @>=  Exit 0 <> Stdout "hoge\n"-      it "retry test" $ do-        retryWith 10 $-          command "ls" [] [] @>= Exit 0
+ tests/test.hs view
@@ -0,0 +1,23 @@+import Data.Monoid+import Test.Hspec+import Test.Hspec.Server+import Test.Hspec.Contrib.Retry+import Control.Monad.IO.Class++main :: IO ()+main = hspec $ do+    describe "hoge" $ with localhost $ do+      it "package test" $ do+        os <- getServerOS+        liftIO $ os `shouldBe` (Just $ Ubuntu "12.04")+      it "package test" $ do+        package "zookeeper" @>= Installed+      it "port test" $ do+        port 2181 @>= Listening+      it "service test" $ do+        service "zookeeper" @>= Running+      it "command test" $ do+        command "echo" ["hoge"] [] @>=  Exit 0 <> Stdout "hoge\n"+      it "retry test" $ do+        retryWith 10 $+          command "ls" [] [] @>= Exit 0