Class: TddDeploy::RemotePostfix
- Defined in:
- lib/tdd_deploy/host_tests/remote_postfix.rb
Overview
TddDeploy::RemotePostfix
verifies that postfix executable is installed, running and will accept mail to local_admin_mail on all hosts
Constant Summary
Constants included from Assertions
Assertions::GROUP_ELT_TAG, Assertions::HEADER_ELT_TAG, Assertions::RESULT_ELT_TAG
Constants included from Environ
Instance Method Summary collapse
Methods inherited from TestBase
flush_children_methods, inherited, #initialze
Methods inherited from Base
Methods included from DeployTestMethods
#deploy_test_file_exists_on_hosts_as, #deploy_test_on_a_host_as, #deploy_test_on_hosts_as, #deploy_test_process_running_on_hosts_as
Methods included from RunMethods
#ping_host, #run_locally, #run_on_a_host_as, #run_on_all_hosts, #run_on_all_hosts_as, #run_on_hosts_as
Methods included from Assertions
#assert, #assert_equal, #assert_match, #assert_nil, #assert_not_nil, #assert_raises, #fail, #failure_count, #failure_messages, #formatted_test_results, #pass, #refute, #refute_equal, #refute_nil, #remove_failed_tests, #reset_tests, #test_count, #test_messages, #test_results, #total_failures, #total_tests
Methods included from CopyMethods
#append_dir_to_remote_hosts_as, #append_file_to_remote_file_as, #append_file_to_remote_hosts_as, #append_string_to_remote_file_as, #append_string_to_remote_file_on_hosts_as, #copy_dir_to_remote_hosts_as, #copy_file_to_remote_as, #copy_file_to_remote_hosts_as, #copy_string_to_remote_file_as, #copy_string_to_remote_file_on_hosts_as, #mkdir_on_remote_as
Methods included from Environ
#capfile, #clear_env, #env_defaults, #env_desc, #env_hash, #env_hash=, #env_types, #hosts, #hosts=, #list_to_str, #migration_hosts, #rationalize_host_list, #read_env, #reset_env, #save_env, #set_env, #str_to_list
Constructor Details
This class inherits a constructor from TddDeploy::Base
Instance Method Details
#test_postfix_accepts_mail ⇒ Object
17 18 19 20 21 |
# File 'lib/tdd_deploy/host_tests/remote_postfix.rb', line 17 def test_postfix_accepts_mail deploy_test_on_hosts_as self.host_admin, self.hosts, "mail works\n", 'postfix accepts mail' do |host, login, userid| "echo \"test mail\" | mail -s 'test mail' -r #{userid}@#{host} #{self.local_admin_email} && echo 'mail works'" end end |
#test_postfix_installed ⇒ Object
9 10 11 |
# File 'lib/tdd_deploy/host_tests/remote_postfix.rb', line 9 def test_postfix_installed deploy_test_file_exists_on_hosts_as 'root', self.hosts, '/usr/sbin/postfix', "postfix should be installed" end |
#test_postfix_running ⇒ Object
13 14 15 |
# File 'lib/tdd_deploy/host_tests/remote_postfix.rb', line 13 def test_postfix_running deploy_test_process_running_on_hosts_as 'root', self.hosts, '/var/spool/postfix/pid/master.pid', "postfix should be running" end |