Skip to content
Snippets Groups Projects
Unverified Commit 56a72ade authored by Jesus Federico's avatar Jesus Federico Committed by GitHub
Browse files

Completed fix for the specs (#343)

parent 4d9d0ebb
Branches
Tags release-2.0.4
No related merge requests found
...@@ -47,6 +47,10 @@ module Greenlight ...@@ -47,6 +47,10 @@ module Greenlight
# The default callback url that bn launcher will redirect to # The default callback url that bn launcher will redirect to
config.gl_callback_url = ENV["GL_CALLBACK_URL"] config.gl_callback_url = ENV["GL_CALLBACK_URL"]
# Default credentials (test-install.blindsidenetworks.com/bigbluebutton).
config.bigbluebutton_endpoint_default = "http://test-install.blindsidenetworks.com/bigbluebutton/api/"
config.bigbluebutton_secret_default = "8cd8ef52e8e101574e400365b55e11a6"
# Setup BigBlueButton configuration. # Setup BigBlueButton configuration.
if config.loadbalanced_configuration if config.loadbalanced_configuration
# Fetch credentials from a loadbalancer based on provider. # Fetch credentials from a loadbalancer based on provider.
...@@ -54,10 +58,6 @@ module Greenlight ...@@ -54,10 +58,6 @@ module Greenlight
config.loadbalancer_secret = ENV["LOADBALANCER_SECRET"] config.loadbalancer_secret = ENV["LOADBALANCER_SECRET"]
config.launcher_secret = ENV["LAUNCHER_SECRET"] config.launcher_secret = ENV["LAUNCHER_SECRET"]
else else
# Default credentials (test-install.blindsidenetworks.com/bigbluebutton).
config.bigbluebutton_endpoint_default = "http://test-install.blindsidenetworks.com/bigbluebutton/api/"
config.bigbluebutton_secret_default = "8cd8ef52e8e101574e400365b55e11a6"
# Use standalone BigBlueButton server. # Use standalone BigBlueButton server.
config.bigbluebutton_endpoint = ENV["BIGBLUEBUTTON_ENDPOINT"] || config.bigbluebutton_endpoint_default config.bigbluebutton_endpoint = ENV["BIGBLUEBUTTON_ENDPOINT"] || config.bigbluebutton_endpoint_default
config.bigbluebutton_secret = ENV["BIGBLUEBUTTON_SECRET"] || config.bigbluebutton_secret_default config.bigbluebutton_secret = ENV["BIGBLUEBUTTON_SECRET"] || config.bigbluebutton_secret_default
......
...@@ -91,8 +91,13 @@ describe Room, type: :model do ...@@ -91,8 +91,13 @@ describe Room, type: :model do
attendeePW: "testpass" attendeePW: "testpass"
) )
if Rails.configuration.loadbalanced_configuration
endpoint = Rails.configuration.loadbalancer_endpoint
secret = Rails.configuration.loadbalancer_secret
else
endpoint = Rails.configuration.bigbluebutton_endpoint endpoint = Rails.configuration.bigbluebutton_endpoint
secret = Rails.configuration.bigbluebutton_secret secret = Rails.configuration.bigbluebutton_secret
end
fullname = "fullName=Example" fullname = "fullName=Example"
meeting_id = "&meetingID=#{@room.bbb_id}" meeting_id = "&meetingID=#{@room.bbb_id}"
password = "&password=testpass" password = "&password=testpass"
...@@ -101,7 +106,6 @@ describe Room, type: :model do ...@@ -101,7 +106,6 @@ describe Room, type: :model do
checksum_string = "join#{query + secret}" checksum_string = "join#{query + secret}"
checksum = OpenSSL::Digest.digest('sha1', checksum_string).unpack("H*").first checksum = OpenSSL::Digest.digest('sha1', checksum_string).unpack("H*").first
expect(@room.join_path("Example")).to eql("#{endpoint}join?#{query}&checksum=#{checksum}") expect(@room.join_path("Example")).to eql("#{endpoint}join?#{query}&checksum=#{checksum}")
end end
end end
......
...@@ -83,8 +83,8 @@ RSpec.configure do |config| ...@@ -83,8 +83,8 @@ RSpec.configure do |config|
<user> <user>
<name>greenlight</name> <name>greenlight</name>
<maxMeetings>1000</maxMeetings> <maxMeetings>1000</maxMeetings>
<apiURL>#{ENV['LOADBALANCER_ENDPOINT'] + 'api'}</apiURL> <apiURL>#{ENV['LOADBALANCER_ENDPOINT']}</apiURL>
<secret>#{ENV['BIGBLUEBUTTON_SECRET']}</secret> <secret>#{ENV['LOADBALANCER_SECRET']}</secret>
</user> </user>
</response>", headers: {}) if ENV['LOADBALANCER_ENDPOINT'] </response>", headers: {}) if ENV['LOADBALANCER_ENDPOINT']
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment