Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
Rename global-config.conf to just global.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacBlanco committed Jun 27, 2016
1 parent 81a9bc3 commit cd61f22
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/service_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def install_zeppelin():
# We've copied the necessary files. Once that completes we need to add it to Ambari

print('Checking to make sure service is installed')
ambari = config.read_config('global-config.conf')['AMBARI']
ambari = config.read_config('global.conf')['AMBARI']
installed = check_ambari_service_installed('ZEPPELIN', ambari)
cont = ''
if not installed:
Expand Down Expand Up @@ -209,7 +209,7 @@ def install_nifi():
# We've copied the necessary files. Once that completes we need to add it to Ambari

print('Checking to make sure service is installed')
ambari = config.read_config('global-config.conf')['AMBARI']
ambari = config.read_config('global.conf')['AMBARI']
installed = check_ambari_service_installed('NIFI', ambari)
cont = ''
if not installed:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_service_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,20 @@ class TestAmbariServiceCheck(unittest.TestCase):
@mock.patch('scripts.curl_client.CurlClient.make_request', side_effect=[['', ''], ['200 OK', '']])
@mock.patch('__builtin__.raw_input', side_effect=['\n', '\n', 'v', 'n'])
def test_ambari_check_good(self, mock, mock2):
conf = scripts.config.read_config('global-config.conf')['AMBARI']
conf = scripts.config.read_config('global.conf')['AMBARI']
assert service_installer.check_ambari_service_installed('ZEPPELIN', conf) == True

@mock.patch('scripts.curl_client.CurlClient.make_request', side_effect=[['200 OK', ''], ['200 OK', '']])
@mock.patch('__builtin__.raw_input', side_effect=['\n', '\n', 'v', 'n'])
def test_ambari_check_false(self, mock, mock2):
conf = scripts.config.read_config('global-config.conf')['AMBARI']
conf = scripts.config.read_config('global.conf')['AMBARI']
assert service_installer.check_ambari_service_installed('ZEPPELIN', conf) == True


@mock.patch('scripts.curl_client.CurlClient.make_request', side_effect=[['', ''],['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', '']])
@mock.patch('__builtin__.raw_input', side_effect=['', '', '', '', '', '', '', '', '', '', ''])
def test_ambari_check_many_attempts(self, mock, mock2):
conf = scripts.config.read_config('global-config.conf')['AMBARI']
conf = scripts.config.read_config('global.conf')['AMBARI']
assert service_installer.check_ambari_service_installed('ZEPPELIN', conf) == False


Expand Down

0 comments on commit cd61f22

Please sign in to comment.