Formatting
parent
8be88eb9ca
commit
e97d3247b9
|
@ -4,7 +4,6 @@
|
|||
*.pem
|
||||
*scratchpad*
|
||||
/tmp
|
||||
# For self hosted users...
|
||||
api_docs.md
|
||||
config/application.yml
|
||||
config/database.yml
|
||||
|
@ -14,7 +13,6 @@ erd_diagram.png
|
|||
erd.pdf
|
||||
latest_corpus.ts
|
||||
log/*.log
|
||||
mqtt_legacy/rabbitmq.config
|
||||
mqtt/rabbitmq.conf
|
||||
mqtt/rabbitmq.config
|
||||
node_modules
|
||||
|
|
|
@ -3,7 +3,7 @@ require "bunny"
|
|||
# A wrapper around AMQP to stay DRY. Will make life easier if we ever need to
|
||||
# change protocols
|
||||
class Transport
|
||||
OPTS = { read_timeout: 10, heartbeat: 10, log_level: "info" }
|
||||
OPTS = { read_timeout: 10, heartbeat: 10, log_level: "info" }
|
||||
|
||||
def self.amqp_url
|
||||
@amqp_url ||= ENV['CLOUDAMQP_URL'] ||
|
||||
|
|
|
@ -5,8 +5,8 @@ describe Transport::Mgmt do
|
|||
it "generates credentials" do
|
||||
the_list = [:foo, :bar]
|
||||
dbl = double("Fake API", list_connections: the_list)
|
||||
expect(["admin", "guest"]).to include(Transport::Mgmt.username)
|
||||
expect(Transport::Mgmt.password).to eq(ENV["ADMIN_PASSWORD"] || "guest" )
|
||||
expect(Transport::Mgmt.username).to eq("admin")
|
||||
expect(Transport::Mgmt.password).to eq(ENV.fetch("ADMIN_PASSWORD"))
|
||||
expect(Transport::Mgmt.client).to be_kind_of(RabbitMQ::HTTP::Client)
|
||||
expect(Transport::Mgmt.client.endpoint).to eq(Transport::Mgmt.api_url)
|
||||
Transport::Mgmt.instance_variable_set(:@client, dbl)
|
||||
|
|
Loading…
Reference in New Issue