salt/tests/unit/modules
Jeff Quast a154280b34 bugfix: trailing "...done" in rabbitmq output
Problem
-----------

Some versions of rabbitmq (v3.4.1) does not output any final
"...done" line in output of listings, but the given salt code
unconditionally removed the final line of output, which may
often result in inconsistent behavior of dependent state
functions, where the final line has a value that is significant.

Solution
-----------

This bugfix changes this output manipulation to be conditional,
matching only lines of ``"Listing ..."`` as the first, and
``"...done"`` as the last.

Details
---------

In my environment::

    [rabbitmq@db01 ~]$ rabbitmqctl list_vhosts
    Listing vhosts ...
    /

This causes issues in, for example, a vhost is attempted to
be created for '/' that already exists, if that vhost happens
to be the last one listed in command output, it is thought
non-existent, resulting in state failure::

    Failure: rabbitmq_vhost_|-rabbitmq-vhost_|-/_|-present: Creating vhost "/" ...
    Error: vhost_already_exists: /
2015-06-09 17:30:40 -07:00
..
__init__.py Include the python encoding file header on tests. 2013-11-27 11:19:24 +00:00
aliases_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
alternatives_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
apache_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00
archive_test.py Merge remote-tracking branch 'upstream/2015.2' into merge-forward-develop 2015-04-16 12:15:44 -06:00
artifactory_test.py Py3 compatibility fixes. Skip tests if no mock available. 2015-01-30 22:25:31 +00:00
at_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00
augeas_cfg_test.py Py3 compatibility 2015-01-30 22:27:08 +00:00
blockdev_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
bluez_test.py Use lists, not dicts, for MagicMock side_effect 2015-03-30 13:46:48 -06:00
boto_elb_test.py fix boto_ tests for use with utils.boto 2015-04-13 22:04:00 +00:00
boto_secgroup_test.py Fixing linting in boto_secgroup module and unit test. 2015-05-04 15:45:26 +10:00
boto_vpc_test.py Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop 2015-05-26 16:38:42 -06:00
bower_test.py Implement Bower execution module 2015-02-21 05:56:20 +00:00
brew_test.py Fix typos 2015-04-29 21:40:31 +09:00
bridge_test.py Py3 compatibility 2015-01-30 22:27:08 +00:00
btrfs_test.py Lint btrfs test 2015-02-10 19:09:30 -07:00
cassandra_test.py Py3 compatibility 2015-01-30 22:27:10 +00:00
chef_test.py Py3 compatibility 2015-01-30 22:27:11 +00:00
cmdmod_test.py Py3 compatibility fixes. 2015-01-30 22:25:31 +00:00
composer_test.py composer.install module does not support always_check, only the state does. Removing the test on the module. 2015-03-11 12:19:48 -07:00
config_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
cp_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
cpan_test.py Py3 compatibility 2015-01-30 22:27:11 +00:00
cron_test.py Manual merge of #24414 per thatch45 2015-06-06 07:47:52 -06:00
cyg_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
daemontools_test.py Py3 compatibility 2015-01-30 22:27:07 +00:00
darwin_pkgutil_test.py Avoid shadowing list type in modules.darwin_pkgutil; fixes #20120 2015-02-20 21:52:25 -08:00
darwin_sysctl_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
data_test.py Fix data.cas test (mock dump) 2015-04-01 15:26:05 -06:00
ddns_test.py Py3 compatibility 2015-01-30 22:27:11 +00:00
deb_apache_test.py Py3 compatibility 2015-01-30 22:27:10 +00:00
deb_postgres_test.py fix tests 2015-03-06 17:13:31 +01:00
debconfmod_test.py Py3 compatibility 2015-01-30 22:27:11 +00:00
debian_ip_test.py update debian_ip unit tests 2015-05-14 13:45:06 -06:00
debian_service_test.py Py3 compatibility 2015-01-30 22:27:11 +00:00
defaults_test.py Py3 compatibility 2015-01-30 22:27:12 +00:00
devmap_test.py Py3 compatibility 2015-01-30 22:27:08 +00:00
dig_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
disk_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00
djangomod_test.py Py3 compatibility 2015-01-30 22:27:12 +00:00
dnsmasq_test.py Py3 compatibility 2015-01-30 22:27:11 +00:00
dnsutil_test.py Py3 compatibility fixes 2015-01-30 22:25:12 +00:00
dockerio_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
dpkg_test.py Py3 compatibility 2015-01-30 22:27:13 +00:00
drac_test.py Changed 17 to 16; manually tested and verified this is correct. 2015-03-17 13:34:43 -05:00
drbd_test.py Py3 compatibility 2015-01-30 22:27:16 +00:00
environ_test.py Py3 compatibility and proper assert 2015-01-30 22:27:13 +00:00
etcd_mod_test.py Python 3 compat for several new test files 2015-02-03 11:34:49 -07:00
event_test.py test event tests 2015-01-16 11:38:29 +05:30
extfs_test.py Py3 compatibility 2015-01-30 22:27:05 +00:00
file_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
firewalld_test.py Remove duplicate test 2015-04-04 22:31:15 -07:00
gem_test.py Add method list_upgrades (modeled on the salt.modules.pip). Calls 'gem outdated' and returns a dictionary containing gem names and the version number of the latest gem. 2015-02-03 20:39:29 -08:00
genesis_test.py Py3 compatibility 2015-01-30 22:27:10 +00:00
git_test.py Py3 compatibility 2015-01-30 22:27:13 +00:00
glance_test.py Py3 compatibility 2015-01-30 22:27:11 +00:00
glusterfs_test.py Py3 compatibility 2015-01-30 22:27:15 +00:00
gnomedesktop_test.py Py3 compatibility 2015-01-30 22:27:10 +00:00
gpg_test.py Fully mock GPG mock class to allow gpg_tests to pass 2015-04-16 22:14:47 -06:00
grains_test.py module grains tests: test list order preservation 2015-06-04 09:52:09 +02:00
groupadd_test.py Py3 compatibility 2015-01-30 22:27:07 +00:00
grub_legacy_test.py Py3 compatibility 2015-01-30 22:27:13 +00:00
guestfs_test.py Py3 compatibility 2015-01-30 22:27:16 +00:00
hadoop_test.py Py3 compatibility 2015-01-30 22:27:13 +00:00
haproxyconn_test.py fix mocking 2015-03-19 16:56:12 +01:00
hashutil_test.py Manual merge of #24414 per thatch45 2015-06-06 07:47:52 -06:00
hg_test.py Py3 compatibility 2015-01-30 22:27:13 +00:00
hipchat_test.py Py3 compatibility 2015-01-30 22:27:16 +00:00
hosts_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00
htpasswd_test.py Make enhancements to htpasswd modules 2015-03-13 21:18:50 +00:00
http_test.py Py3 compatibility 2015-01-30 22:27:13 +00:00
ilo_test.py Py3 compatibility 2015-01-30 23:35:22 +00:00
img_test.py Py3 compatibility 2015-01-30 22:27:13 +00:00
incron_test.py update cron and cmd tests for cron runas changes 2015-03-10 15:57:24 -06:00
influx_test.py Fix influx_test mocking 2015-02-09 11:55:54 -07:00
ini_manage_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
introspect_test.py Python 3 compat for several new test files 2015-02-03 11:34:49 -07:00
ipset_test.py Py3 compatibility 2015-01-30 22:27:15 +00:00
iptables_test.py Add missing jump arguments to iptables module 2015-05-04 13:19:23 +02:00
jboss7_cli_test.py Py3 compatibility fixes. Proper test module imports setup. 2015-01-30 22:25:31 +00:00
jboss7_test.py Py3 compatibility fixes. Skip tests if no mock available. 2015-01-30 22:25:32 +00:00
junos_test.py Py3 compatibility 2015-01-30 22:27:14 +00:00
key_test.py Py3 compatibility 2015-01-30 22:27:15 +00:00
keyboard_test.py Merge pull request #20349 from rallytime/develop_pylint 2015-02-04 11:58:39 +00:00
keystone_test.py Add mock exception class to keystone unit test 2015-03-31 05:56:55 -06:00
kmod_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00
launchctl_test.py Py3 compatibility 2015-01-30 23:36:34 +00:00
ldapmod_test.py Python 3 compat and additions to ldapmod_test 2015-02-03 11:28:03 -07:00
linux_acl_test.py Merge remote-tracking branch 'upstream/2015.2' into merge-forward-develop 2015-02-23 14:25:51 -07:00
linux_lvm_test.py fix LVM tests for new LVM code 2015-03-27 10:43:22 -06:00
linux_sysctl_test.py Merge remote-tracking branch 'upstream/2015.2' into merge-forward-develop2 2015-02-06 12:09:01 -07:00
localemod_test.py Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop 2015-05-26 16:38:42 -06:00
locate_test.py Python 3 compat for several new test files 2015-02-03 11:34:49 -07:00
logadm_test.py Py3 compatibility 2015-01-30 23:37:36 +00:00
logrotate_test.py Python 3 compat for several new test files 2015-02-03 11:34:49 -07:00
lvs_test.py Merge #20374 with some fixes 2015-02-04 08:52:33 -07:00
mac_group_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
mac_user_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
match_test.py Don't forget the pylint ignore 2015-02-05 08:06:18 -07:00
mdadm_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
memcached_test.py More Python 3 compat changes to new test modules 2015-02-03 11:40:27 -07:00
mine_test.py Mock pillar_pcre for the mine tests 2015-04-16 17:18:50 -06:00
mod_random_test.py Fix mod_random test on older distros 2015-02-10 08:46:42 -07:00
modjk_test.py Properly indent comments 2015-04-21 20:35:14 -06:00
monit_test.py added some imports 2015-02-06 20:07:43 +05:30
moosefs_test.py More Python 3 compat changes to new test modules 2015-02-03 11:40:27 -07:00
mount_test.py Py3 compatibility 2015-01-30 22:27:12 +00:00
munin_test.py Python 3 compat for several new test files 2015-02-03 11:34:49 -07:00
mysql_test.py Clean up some pylint on 2015.2 2015-02-06 07:58:26 -07:00
nagios_test.py implemented unit test cases for nagios module 2015-02-09 19:49:14 +05:30
netscaler_test.py resolved errors. 2015-04-17 12:34:26 +05:30
network_test.py Better unit test fix, add 2 unit tests for IPv6 2015-05-01 20:29:25 +02:00
neutron_test.py Add some python 3 compatibility fixes for new test files 2015-02-13 11:30:45 -07:00
nfs3_test.py Python 3 compatibility changes for develop 2015-04-02 14:04:28 -06:00
nftables_test.py removed pylint errors 2015-03-27 18:21:56 +05:30
nginx_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
nova_test.py Python 3 compat fixes for develop 2015-04-17 12:00:01 -06:00
npm_test.py adding npm unit test case 2015-02-17 18:14:15 +05:30
openstack_config_test.py adding openstack_config unit test case 2015-02-17 18:17:10 +05:30
oracle_test.py Python 3 compat fixes for develop 2015-04-17 12:00:01 -06:00
osxdesktop_test.py Fix python 3 compat errors that were inadvertently reverted 2015-02-10 09:07:09 -07:00
pagerduty_test.py Mock config.option for pagerduty tests 2015-04-16 12:36:40 -06:00
pam_test.py adding pam unit test 2015-03-25 13:46:11 +05:30
parted_test.py fix tests for the parted module 2015-04-28 13:22:54 -06:00
pecl_test.py adding pecl unit test case. 2015-04-14 17:58:15 +05:30
pillar_test.py Py3 compatibility 2015-01-30 22:27:10 +00:00
pip_test.py Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop 2015-05-15 13:43:40 -06:00
pkg_resource_test.py Changed mock path to be absolute in test_parse_targets 2015-06-04 11:11:33 -06:00
pkgutil_test.py pkgutil unit test case 2015-03-09 13:16:45 +05:30
postfix_test.py adding postfix unit test case 2015-04-21 17:36:07 +05:30
postgres_test.py Fix postgres.db_alter test, add test for owner_recurse=True 2015-04-06 00:19:19 +02:00
poudriere_test.py adding poudriere unit test 2015-03-11 10:24:19 +05:30
powerpath_test.py adding powerpath unit test case 2015-04-22 17:38:44 +05:30
ps_test.py Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop 2015-05-18 11:39:43 -06:00
publish_test.py adding publish unit test 2015-03-27 10:52:25 +05:30
puppet_test.py Fix puppet test to mock cmd.run_all with return value including retcode 2015-04-16 17:18:50 -06:00
pw_group_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00
pw_user_test.py Py3 compatibility 2015-01-30 22:27:07 +00:00
pyenv_test.py adding pyenv unit test 2015-03-17 15:07:41 +05:30
qemu_img_test.py adding qemu_img unit test case 2015-04-23 18:13:27 +05:30
qemu_nbd_test.py adding qemu_nbd unit test 2015-03-12 10:55:36 +05:30
rabbitmq_test.py bugfix: trailing "...done" in rabbitmq output 2015-06-09 17:30:40 -07:00
raet_publish_test.py adding raet_publish unit test case 2015-04-24 17:30:24 +05:30
random_org_test.py Updating unit tests based on changes to module. 2015-06-04 20:33:52 -07:00
rbenv_test.py adding rbenv unit test case 2015-04-27 17:26:24 +05:30
rdp_test.py Add some python 3 compatibility fixes for new test files 2015-02-13 11:30:45 -07:00
reg_test.py Adding Reg.py unit test cases 2015-04-01 11:14:27 +05:30
rest_package_test.py adding rest_package unit test case 2015-04-28 18:04:43 +05:30
rest_sample_test.py Add some python 3 compatibility fixes for new test files 2015-02-13 11:30:45 -07:00
rest_service_test.py adding rest_service unit test case 2015-04-28 18:06:55 +05:30
ret_test.py adding ret unit test case 2015-02-17 18:19:04 +05:30
rh_ip_test.py pylint volation fixes 2015-05-30 02:04:49 +02:00
rh_service_test.py changed FLAG to HAS_UPSTART 2015-04-02 10:50:58 +05:30
riak_test.py adding riak unit test case 2015-05-05 15:39:52 +05:30
rpm_test.py adding rpm unit test case 2015-02-19 14:40:10 +05:30
rsync_test.py adding rsync unit test case 2015-05-06 17:31:04 +05:30
runit_test.py adding runit unit test 2015-03-25 11:14:18 +05:30
rvm_test.py added tests to ensure commands are created accordingly (without additional single quotes) 2015-03-16 14:49:09 -06:00
s3_test.py adding s3 unit test case 2015-05-07 15:43:32 +05:30
saltcloudmod_test.py Adding saltcloudmod.py unit test 2015-03-31 15:32:49 +05:30
schedule_test.py Updating schedule unit tests to align with refactoring changes. 2015-05-22 09:17:53 -07:00
scsi_test.py adding scsi unit test case 2015-05-07 15:44:39 +05:30
sdb_test.py adding sdb unit test case 2015-02-17 18:20:58 +05:30
seed_test.py Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop 2015-05-29 17:33:28 -06:00
sensors_test.py adding sensors unit test case 2015-05-08 16:11:20 +05:30
serverdensity_device_test.py adding serverdensity_device unit test case. 2015-04-09 17:29:48 +05:30
service_test.py adding service unit test case 2015-05-11 18:01:10 +05:30
shadow_test.py Py3 compatibility fixes 2015-01-30 22:25:11 +00:00
slack_notify_test.py adding slack_notify unit test case 2015-02-19 14:38:51 +05:30
smf_test.py adding smf unit test case 2015-05-12 18:06:49 +05:30
smtp_test.py adding smtp unit test case. 2015-04-07 17:39:32 +05:30
solr_test.py adding solr unit test case 2015-05-13 17:14:53 +05:30
sqlite3_test.py adding sqlite3_test unit test 2015-03-31 15:39:26 +05:30
ssh_test.py fix ssh module unit tests 2015-05-15 11:11:29 -06:00
state_test.py Fix Python 2.6 syntax error in unit.modules.state_test.py 2015-04-21 11:01:33 -06:00
supervisord_test.py added requested change. 2015-03-30 17:48:29 +05:30
svn_test.py adding svn unit test case 2015-05-15 17:39:21 +05:30
swift_test.py adding swift unit test case 2015-02-17 18:09:33 +05:30
sysbench_test.py adding sysbench unit test case 2015-05-18 17:43:37 +05:30
syslog_ng_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
sysmod_test.py Remove Python 2.6 incompatible section of test 2015-04-21 12:25:31 -06:00
system_test.py adding system unit test case 2015-05-20 16:06:10 +05:30
systemd_test.py fix centos tests 2015-04-25 18:47:20 +02:00
test_network.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
timezone_test.py removed assertion error 2015-05-21 18:57:58 +05:30
twilio_notify_test.py adding twilio_notify unit test case. 2015-04-03 14:29:49 +05:30
uptime_test.py more lint 2015-03-10 10:30:49 -06:00
useradd_test.py Py3 compatibility 2015-01-30 22:27:07 +00:00
uwsgi_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
varnish_test.py adding varnish unit test case 2015-05-25 16:01:02 +05:30
virt_test.py Merge remote-tracking branch 'upstream/2014.7' into merge-forward-2015.2 2015-03-11 16:09:57 -06:00
virtualenv_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
win_autoruns_test.py adding win_autoruns unit test case 2015-02-20 19:16:09 +05:30
win_disk_test.py adding win_disk unit test case. 2015-04-10 18:01:22 +05:30
win_dns_client_test.py adding win_dns_client test case and used @patch for mocking. 2015-04-15 18:42:38 +05:30
win_firewall_test.py adding win_firewall unit test case 2015-02-24 18:58:55 +05:30
win_ip_test.py adding win_ip unit test case. 2015-04-06 15:35:01 +05:30
win_network_test.py made changes to test_interfaces function. 2015-05-13 10:35:05 -06:00
win_ntp_test.py adding win_ntp unit test case 2015-02-25 18:46:45 +05:30
win_path_test.py Adding win_path.py unit test cases 2015-04-07 14:16:45 +05:30
win_powercfg_test.py Lint fixes 2015-05-12 15:48:53 +02:00
win_repo_test.py Mock __salt__ and call to salt.loader.render to fix win_repo test 2015-04-16 21:22:03 -06:00
win_servermanager_test.py adding win_servermanager unit test case. 2015-04-07 15:44:24 +05:30
win_service_test.py Fixed tests 2015-05-11 15:49:19 +00:00
win_shadow_test.py adding win_shadow unit test case 2015-02-25 18:48:05 +05:30
win_status_test.py Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
win_system_test.py Adding win_system unit test cases 2015-04-06 14:16:38 +05:30
win_timezone_test.py adding win_timezone unit test case 2015-03-03 18:46:53 +05:30
xapi_test.py Adding xapi.py unit test cases 2015-04-13 17:38:19 +05:30
zcbuildout_test.py Merge remote-tracking branch 'upstream/2015.2' into merge-forward-develop 2015-04-21 10:42:22 -06:00
zfs_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00
znc_test.py adding znc unit test 2015-03-10 10:36:10 +05:30
zpool_test.py Py3 compatibility 2015-01-30 22:27:06 +00:00