<commit_before>{-# OPTIONS -XOverloadedStrings #-}

module ConnectionSpec (main, spec) where

import Test.Hspec
import Network.AMQP

main :: IO ()
main = hspec spec

spec :: Spec
spec = do
  describe "openConnection" $ do
    context "with default vhost and default admin credentials" $ do
      it "connects successfully" $ do
        conn <- openConnection "127.0.0.1" "/" "guest" "guest"
        closeConnection conn

    context "with custom vhost and valid credentials" $ do
      it "connects successfully" $ do
        conn <- openConnection "127.0.0.1" "haskell_amqp_testbed"
                                           "haskell_amqp"
                                           "haskell_amqp_password"
        closeConnection conn<commit_msg>Explain where these credentials are coming from<commit_after>{-# OPTIONS -XOverloadedStrings #-}

module ConnectionSpec (main, spec) where

import Test.Hspec
import Network.AMQP

main :: IO ()
main = hspec spec

spec :: Spec
spec = do
  describe "openConnection" $ do
    context "with default vhost and default admin credentials" $ do
      it "connects successfully" $ do
        conn <- openConnection "127.0.0.1" "/" "guest" "guest"
        closeConnection conn

    context "with custom vhost and valid credentials" $ do
      it "connects successfully" $ do
        -- see ./bin/ci/before_build.sh
        conn <- openConnection "127.0.0.1" "haskell_amqp_testbed"
                                           "haskell_amqp"
                                           "haskell_amqp_password"
        closeConnection conn
{'fraction_non_alphanumeric': 0.0871501272264631, 'fraction_numerical': 0.015267175572519083, 'mean_word_length': 2.164989939637827, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2094992', 'n_tokens_mistral': 448, 'n_tokens_neox': 423, 'n_words': 135}