Commit Graph

336 Commits

Author SHA1 Message Date
Pedro Algarvio
a17aefd04a
Handle connection errors 2016-05-23 13:56:05 +01:00
Pedro Algarvio
e0b177a493
We need to import logging within the threaded call 2016-05-23 13:56:04 +01:00
Pedro Algarvio
cdfd5224c8
log was out of scope, better use the module 2016-05-23 13:56:04 +01:00
Pedro Algarvio
e1e1aeb3d7
Keep ports open throughout the tests execution 2016-05-23 13:56:02 +01:00
Pedro Algarvio
7a8460856c
Define IDs and ports on sample configs 2016-05-23 13:56:01 +01:00
Pedro Algarvio
184c3c83ad
Run the test daemons from CLI
This should help running the test suite on Windows machines
2016-05-23 13:56:00 +01:00
rallytime
7bf9f5d0f5 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/man/salt.7
  - doc/ref/executors/all/salt.executors.direct_call.rst
  - doc/ref/executors/all/salt.executors.splay.rst
  - doc/ref/executors/all/salt.executors.sudo.rst
  - salt/cloud/clouds/vultrpy.py
2016-05-18 09:40:48 -06:00
C. R. Oldham
8387657d9a Prevent salt-cloud from hanging when spinning up new Vultr instances (#33272)
* better support for named images, locations, sizes

* better support for named images, locations, sizes

* Tests for Vultr driver

* Add sleep so test instance will be old enough to delete as part of the test

* Lint.
2016-05-16 13:11:29 -07:00
rallytime
ced033c0a4 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/topics/releases/2016.3.0.rst
  - salt/scripts.py
  - salt/states/glusterfs.py
2016-05-06 16:05:58 -06:00
rallytime
180c03ca24 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/cli/salt.py
  - salt/modules/zypper.py
  - salt/scripts.py
  - salt/states/boto_elb.py
  - tests/integration/states/user.py
  - tests/unit/states/file_test.py
2016-05-06 09:20:05 -06:00
Nicole Thomas
111701c8bb [2015.8] Merge forward from 2015.5 to 2015.8 (#33054)
* Add run_on_start docs to schedule.rst (#32958)

Fixes #22580

* Backport #33021 manually to 2015.5 (#33044)

* Saltfile with pillar tests (#33045)

* add file.managed with pillar data tests

* do not require git for other tests

* Whitespace...
2016-05-05 07:05:55 -07:00
rallytime
16c9ce70ad Merge branch '2016.3' into 'develop'
No conflicts.
2016-05-02 12:58:24 -06:00
Justin Findlay
cc854f1464 update pip state and integration tests for newer pip versions (#32905)
* modules.virtualenv_mod: use correct pip bootstrap url

* modules.pip: raise error on mirrors arg

* states.pip: run mirrors test on < 7.0.0

* update pip integration test states to not use mirrors

* modules.pip: run mirrors tests on pip < 7.0.0
2016-04-29 10:49:29 -07:00
Nicole Thomas
216d9fdc9a [develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute

* remove reference to master_alive_check

* Fixes saltstack/salt#28262

* Resolve memory leak in authentication

* outputter virt_list does not exist anymore

* Update proxmox documentation

* Fix documentation on boto_asg and boto_elb modules and states

* modules.win_timezone: don't list all zones in debug log

* Correcty index glusterfs bricks

Fixes issue #32311

* Cleaner deprecation process with decorators

* Add deprecation decorator scaffold

* Capture type error and unhandled exceptions while function calls

* Aware of the current and future version of deprecation

* Implement initially is_deprecated decorator

* Add an alias for the capitalization

* Fix capitalization easier way

* Remove an extra line

* Add successor name to the deprecation decorator.

* Granulate logging and error messages.

* Implement function swapper

* Raise later the caught exception

* Clarify exception message

* Save function original name

* Remove an extra line

* Hide an alternative hidden function name in the error message, preserving the error itself

* Rename variable as private

* Add a method to detect if a function is using its previous version

* Message to the log and/or raise an exception accordingly to the status of used function

* Log an error along with the exception

* Add internal method documentation

* Add documentation and usage process for decorator "is_deprecated"

* Add documentation and process usage for the decorator "with_deprecated"

* Hide private method name

* Fix PEP8, re-word the error message

* Deprecate basic uptime function

* Add initial decorator unit test

* Rename old/new functions, mock versions

* Move frequent data to the test setup

* Add logging on EOL exception

* Rename and document high to low version test on is_deprecated

* Implement a test on low to high version of is_deprecated decorator

* Add a correction to the test description

* Remove a dead code

* Implement a test for high to low version on is_deprecated, using with_successor param

* Correct typso adn mistaeks

* Implement high to low version with successor param on is_deprecated

* Setup a virtual name for the module

* Implement test for with_deprecated should raise an exception if same deprecated function not found

* Implement test for with_deprecated an old function is picked up if configured

* Correct test description purpose

* Implement test with_deprecated when no deprecation is requested

* Add logging test to the configured deprecation request

* Add logging testing when deprecated version wasn't requested

* Implement test EOL for with_deprecated decorator

* Correct test explanation

* Rename the test

* Implement with_deprecated no EOL, deprecated other function name

* Implement with_deprecated, deprecated other function name, EOL reached

* Add test description for the with_deprecated + with_name + EOL

* Fix confusing test names

* Add logging test to the is_deprecated decorator when function as not found.

* Add more test point to each test, remove empty lines

* Bugfix: at certain conditions a wrong alias name is reported to the log

* Fix a typo in a comment

* Add test for the logging

* Disable a pylint: None will _never_ be raised

* Fix test for the deprecated "status.uptime" version

* Bugfix: Do not yank raised exceptions

* Remove unnecessary decorator

* Add test for the new uptime

* Add test for the new uptime fails when /proc/uptime does not exists

* Rename old test case

* Skip test for the UTC time, unless freeze time is used.

* Fix pylint

* Fix documentation

* Bugfix: proxy-pass the docstring of the decorated function

* Lint fix

* Fixes saltstack/salt#28262 for 2015.5 branch

* Update master config docs

* Improve git_pillar documentation/logging

* Add note about different behavior of top file in git_pillar

* Make log entry for a missing pillar SLS file more accurate for git_pillar

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.

* Update glusterfs_test to be inline with #32312

* Fix salt-cloud paralell provisioning

Closes #31632

* Ignore Raspbian in service.py __virtual__ (#32421)

* Ignore Raspbian in service.py __virtual__

This prevents more than one execution module from trying to load as the
service virtual module.

Refs: #32413

* pack __salt__ before loading provider overrides

We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides

* Fix broken __salt__ dict in provider override

Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.

* Merge #32293 with test fixes (#32418)

* Fix issue #11497

* Remove check for working directory presence in tests

* Fix Domainname introspection

Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.

* Add pgjsonb_queue to queue doc index

* Pylint fixes

* Pass parser options into batch mode

Resolves #31738

* Changed the target file in file.symlink test (#32443)

* Argument name in docs should match actual arg name (#32445)

Fixes #31851

* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)

Updates 0edd532, 8f558a5.

When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.

My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.

* Issue #28706: Fix state user.present behavior. (#32448)

- As mentionned in issue #28706, state user.present no longer remove
      user from groups if the keyword 'groups' with empty value '[]' is not
      explicitly set, salt will assume current groups are still wanted.

* tests.integration: fix 4230c8a

* Move the tables of virtual modules to individual documentation pages

* Add new doc pages to toctree

* Add external ref to windows package manager docs

* Improve docstrings

* Add documentation on virtual module provider overrides to the module docs

* Clarify the scope of the provider param in states.

* Add link to provider override docs to all package providers

* Add link to provider override docs to all service providers

* Add link to provider override docs to all user providers

* dd link to provider override docs to all shadow providers

* Add link to provider override docs to all group providers

* Backport 31164 and 31364 (#32474)

* Don't send REQ while another one is waiting for response.

The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.

* Fixed zeromq ReqMessageClient destroy

* Add link to provider override docs to opkg.py

This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.

* Add documentation for some master/minion configs (#32454)

Refs #32400

Adds docs for:

- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal

* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)

* Automatically detect MySQL password column

* Fix changing password in MySQL 5.7

* Fix lint test

* Fix unit tests (?)

They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.

* Additional unit test fix

* Only unsub if we have a jid

Closes #32479
2016-04-11 17:07:15 -06:00
Justin Findlay
117d641830 tests.integration: fix 4230c8a 2016-04-08 16:54:00 -06:00
Justin Findlay
fa8d030ab7 tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.

When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.

My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
2016-04-08 16:00:48 -06:00
rallytime
eb6773823b Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/modules/rh_service.py
2016-04-01 10:33:44 -06:00
Justin Findlay
8f558a5f41 tests...runtests_helpers: TMPDIR on MacOS gives too long paths 2016-03-30 21:09:40 -06:00
Justin Findlay
c74c241831 tests.integration: use os.path.realpath
This reverts bf894c37, 6b99798b, and 4028d80e.  `os.path.realpath`
behaves identically to `salt.utils.abs_readlink` on the doc tests in
that function.
2016-03-30 21:09:39 -06:00
rallytime
d684d49490 Merge branch '2016.3' into 'develop'
Conflicts:
  - doc/topics/releases/2015.5.10.rst
  - doc/topics/releases/2015.8.8.rst
2016-03-28 11:16:22 -06:00
Ch3LL
b8f271bdc9 add mac_keychain test 2016-03-26 20:30:22 -06:00
rallytime
308aa5fd61 Merge branch '2016.3' into 'develop'
Conflicts:
  - conf/master
  - conf/minion
  - doc/ref/proxy/all/index.rst
  - salt/cli/daemons.py
  - salt/modules/key.py
  - salt/modules/reg.py
  - salt/modules/win_pkg.py
  - salt/utils/__init__.py
  - salt/utils/cloud.py
  - tests/unit/daemons_test.py
2016-03-18 10:57:15 -06:00
Justin Findlay
4028d80eee tests...runtests_helpers: use system tmpdir 2016-03-10 10:57:18 -07:00
rallytime
2ee175c6d3 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/fileclient.py
  - salt/modules/glusterfs.py
2016-03-02 13:48:11 -07:00
rallytime
031a75ca33 Merge branch '2015.8' into '2016.3'
Conflicts:
  - Contributing.rst
  - conf/master
  - doc/index.rst
  - doc/man/salt.7
  - pkg/suse/README.suse
  - salt/client/ssh/state.py
  - salt/minion.py
  - salt/modules/zypper.py
  - salt/utils/schedule.py
  - tests/unit/modules/zypper_test.py
2016-03-02 10:26:13 -07:00
Denys Havrysh
86433f2378 Revert changes in files used by roots_test.py integration test 2016-03-02 10:00:45 +02:00
Denys Havrysh
e7a8dbf498 Remove trailing white spaces in tests files 2016-03-01 17:40:02 +02:00
rallytime
40cd0ac8fe Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/states/file.py
  - tests/runtests.py
2016-02-25 16:21:15 -07:00
Nicole Thomas
625da0d261 Merge pull request #31471 from cachedout/issue_31427
Correct issue where duplicate items in grains list during state run will result in duplicate grains
2016-02-25 13:15:20 -07:00
rallytime
3b74d123af Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/selinux.py
  - salt/modules/zypper.py
  - salt/pillar/__init__.py
  - salt/states/dockerng.py
  - tests/runtests.py
2016-02-25 12:36:22 -07:00
Mike Place
30eb5fccf7 Additional tests, but disable the test for distinct lists, because of a problem with context in test suite 2016-02-24 13:53:49 -07:00
justinta89
421a112914 Added config_dir to test minion config 2016-02-23 19:40:22 -07:00
Mike Place
e1ade05e54 Merge pull request #31355 from rallytime/fix-31330
Fix orchestrate outputter when retcode is appended to orchestrate run
2016-02-22 11:13:07 -07:00
rallytime
38f89bf8fd Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/beacons/inotify.py
  - salt/beacons/load.py
2016-02-21 15:23:24 -07:00
Justin Findlay
8623c24335 add integration tests for minion blackout
Related to #30868.
2016-02-19 18:04:31 -07:00
rallytime
9b52e39e90 Add testcase for state.orchestrate output 2016-02-19 09:14:46 -07:00
rallytime
cc29092dcb Merge branch '2016.3' into 'develop' 2016-02-18 11:33:24 -07:00
rallytime
7ea9dacbdd Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/beacons/inotify.py
  - salt/beacons/load.py
  - salt/minion.py
  - salt/modules/win_update.py
  - salt/modules/yumpkg.py
  - salt/utils/pkg/rpm.py
2016-02-18 11:10:44 -07:00
Mike Place
9281ff5b1f Merge pull request #31307 from LoveIsGrief/salt-27089-new
[Recreated]Saltcloud virtualbox provider
2016-02-18 08:56:21 -07:00
Ch3LL
da9bca625e pkg.latest epoch test for 2016 2016-02-17 09:51:11 -07:00
Mike Place
c5e5af827c Merge pull request #31171 from Ch3LL/megan-20158
added logic to check for installed package
2016-02-12 15:10:21 -07:00
Ch3LL
9204e3f562 add integration test for issue 30934w 2016-02-12 12:21:50 -07:00
Ch3LL
a123efd4ef added logic to check for installed package 2016-02-12 11:01:35 -07:00
Colton Myers
076b49a4ca Merge remote-tracking branch 'upstream/2015.8' into merge-forward-2016.3
Conflicts:
    README.rst
    doc/conf.py
    doc/ref/index.rst
    doc/ref/proxy/all/salt.proxy.ssh_sample.rst
    doc/topics/installation/rhel.rst
    doc/topics/releases/2015.8.4.rst
    doc/topics/tutorials/states_pt5.rst
    salt/cloud/clouds/ec2.py
    salt/cloud/clouds/opennebula.py
    salt/config/__init__.py
    salt/modules/boto_dynamodb.py
    salt/modules/boto_ec2.py
    salt/modules/boto_elasticache.py
    salt/modules/boto_elb.py
    salt/modules/boto_iam.py
    salt/modules/boto_rds.py
    salt/modules/boto_sns.py
    salt/modules/boto_sqs.py
    salt/modules/dracr.py
    salt/modules/git.py
    salt/modules/mine.py
    salt/modules/systemd.py
    salt/modules/win_pkg.py
    salt/modules/yumpkg.py
    salt/pillar/__init__.py
    salt/states/git.py
    salt/states/rabbitmq_vhost.py
    salt/states/saltmod.py
    salt/utils/pkg/rpm.py
    setup.py
    tests/unit/modules/systemd_test.py
    tests/unit/states/rabbitmq_vhost_test.py
2016-02-11 22:33:49 -07:00
Ch3LL
af82b1233a integration test for issue #31014 2016-02-10 21:46:22 -07:00
LoveIsGrief
6cfb447cff Introduce profiles for testing
* virtualbox-deploy-conf won't deploy a script
* virtualbox-minion will do a full deploy with a minion config

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
1a8cd747c5 Feature: deploy salt on machine when creating
We need to setup the tests with a profile that wants to deploy and use the profile

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
59d212acb1 Provider is getting deprecated in the config
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
b0752a3d82 Implement list_nodes_select
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
98ad2cbe71 Add virtualbox to profile checks
Virtualbox needs the 'clonefrom' property and it doesn't need size

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00