testOrderNew :: TestTree
testOrderNew =
  testCase "testOrderNew" $ do
    (accStub, jwk) <- acmeNewObjAccountStub "email@example.org"
    httpServerLiveConf <- newIORef []
    myHttpServer httpServerLiveConf
    state <- myState jwk putStrLn
    res <-
      flip evalCragT state $ do
        let domains = ["localhost"] --, "ip6-localhost", "ip6-loopback"]
        csr <- liftIO $ newCrt domains
        let cert = Base64Octets csr
        _ <- acmePerformCreateAccount accStub
        crt <-
          obtainCertificate domains cert (challengeReactions httpServerLiveConf)
        liftIO $ putStrLn ("CRT: " <> concat crt)
        return ()
    print res
    isRight res @?= True
testOrderNew :: TestTree
testOrderNew =
  testCase "testOrderNew" $ do
    (accStub, jwk) <- acmeNewObjAccountStub "email@example.org"
    httpServerLiveConf <- newIORef []
    myHttpServer httpServerLiveConf
    state <- myState jwk putStrLn
    res <-
      flip evalCragT state $ do
        let domains = ["localhost"] --, "ip6-localhost", "ip6-loopback"]
        csr <- liftIO $ newCrt domains
        let cert = Base64Octets csr
        _ <- acmePerformCreateAccount accStub
        crt <-
          obtainCertificate domains cert (challengeReactions httpServerLiveConf)
        liftIO $ putStrLn ("CRT: " <> concat crt)
        return ()
    print res
    isRight res @?= True
testOrderNew =
  testCase "testOrderNew" $ do
    (accStub, jwk) <- acmeNewObjAccountStub "email@example.org"
    httpServerLiveConf <- newIORef []
    myHttpServer httpServerLiveConf
    state <- myState jwk putStrLn
    res <-
      flip evalCragT state $ do
        let domains = ["localhost"] --, "ip6-localhost", "ip6-loopback"]
        csr <- liftIO $ newCrt domains
        let cert = Base64Octets csr
        _ <- acmePerformCreateAccount accStub
        crt <-
          obtainCertificate domains cert (challengeReactions httpServerLiveConf)
        liftIO $ putStrLn ("CRT: " <> concat crt)
        return ()
    print res
    isRight res @?= True