Fixed #365: Added check to config rake file (GRN-66) (#376)

* Added check to config rake file

* Update configuration.rake
This commit is contained in:
farhatahmad 2019-02-22 15:11:01 -05:00 committed by Jesus Federico
parent 7429349d3b
commit 5521402ee7
1 changed files with 7 additions and 5 deletions

View File

@ -29,10 +29,12 @@ namespace :conf do
test_request("#{ENV['BIGBLUEBUTTON_ENDPOINT']}api/getMeetings?checksum=#{checksum}")
passed
# Tests the checksum on the getMeetings api call
print "Checking SMTP connection"
test_smtp
passed
if ENV['ALLOW_MAIL_NOTIFICATIONS'] == 'true'
# Tests the configuration of the SMTP Server
print "Checking SMTP connection"
test_smtp
passed
end
end
end
@ -50,7 +52,7 @@ rescue => exc
failed("Error connecting to SMTP - #{exc}")
end
# takes the full URL including the protocol
# Takes the full URL including the protocol
def test_request(url)
uri = URI(url)
res = Net::HTTP.get(uri)