Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests for MongoDB modules #53230

Closed
wants to merge 461 commits into
base: devel
from

Conversation

Projects
None yet
@rhysmeister
Copy link
Contributor

rhysmeister commented Mar 3, 2019

SUMMARY

Integration tests for MongoDB modules: mongodb_replicaset and mongodb_shard module tests included.

ISSUE TYPE
  • Feature Pull Request
ADDITIONAL INFORMATION

Tests can be executed as follows...

test/runner/ansible-test integration -v mongodb_replicaset --docker ubuntu1604
test/runner/ansible-test integration -v mongodb_shard --docker ubuntu1604
@rhysmeister

This comment has been minimized.

Copy link
Contributor Author

rhysmeister commented Mar 3, 2019

Not sure why this is a problem...

ERROR: test/integration/targets/mongodb_replicaset/files/bash/mongodb_replicaset.sh:1:1: unexpected non-module shebang: b'#!/bin/bash' (100%)

I've checked the test code and the shebang in these scripts seems to be allowed.

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 3, 2019

The test ansible-test sanity --test shebang [explain] failed with 4 errors:

test/integration/targets/mongodb_replicaset/files/bash/mongod_teardown.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'
test/integration/targets/mongodb_replicaset/files/bash/mongodb_replicaset.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'
test/integration/targets/mongodb_shard/files/bash/mongod_teardown.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'
test/integration/targets/mongodb_shard/files/bash/mongodb_replicaset.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 3, 2019

The test ansible-test sanity --test shebang [explain] failed with 4 errors:

test/integration/targets/mongodb_replicaset/files/bash/mongod_teardown.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'
test/integration/targets/mongodb_replicaset/files/bash/mongodb_replicaset.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'
test/integration/targets/mongodb_shard/files/bash/mongod_teardown.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'
test/integration/targets/mongodb_shard/files/bash/mongodb_replicaset.sh:1:1: unexpected non-module shebang: b'#!/bin/bash'

click here for bot help

@mattclay mattclay added the ci_verified label Mar 6, 2019

@ansibot ansibot removed the needs_triage label Mar 6, 2019

timorunge and others added some commits Mar 8, 2019

Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#…
…49191) (#53445)

* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191) (#1)

* Fix for "AttributeError: 'module' object has no attribute 'cursors'" (#49191)

* Adding changelog fragment for issue #49191 and the following PR.

* Update lib/ansible/module_utils/mysql.py

Co-Authored-By: timorunge <timorunge@users.noreply.github.com>
Warn user to send a password if the privatekey is password protected (#…
…53360)

* Warn user to send a password if the privatekey is password protected

* Edit openssl_cert doc change

* remove trailing whitespace

* update openssl_csr doc to warn user of private key passphrase requirement.

* Update lib/ansible/modules/crypto/openssl_csr.py

Co-Authored-By: johnwesley <johnwesley@users.noreply.github.com>

* grammer correction, privatekey => private key
[docker_image] fix the changed state for tagging and pushing (#53451)
* [docker_image] fix the changed state for tagging and pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add tests for (force) tagging and force pushing

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker_image] add a news fragment for the fixed force tag/push behavior

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
docker_swarm_service: Add read_only option (#53482)
* Add read_only option

* Add changelog fragment

* Add version_added

* Fix broken test
postgresql_privs: Support FOREIGN DATA WRAPPER and FOREIGN SERVER (#3…
…8803)

* Support FOREIGN DATA WRAPPER and FOREIGN SERVER in postgresql_privs module
* Added available from note to fdw and fs object types
* Integration tests, examples in documentation
* Complete integration tests
nxos_pim_rp_address: update sanity test to work with legacy N3K (#53471)
Test yaml fixes for n3048:

* 3048 does not support bidir option
* 3048 cannot remove rp-address if prefix-list/route-map is present
  * yes: no ip pim rp-address x.x.x.x
  *  no: no ip pim rp-address x.x.x.x prefix-list foo
  *  no: no ip pim rp-address x.x.x.x route-map bar

This test now passes on N9k/N7k/N6k/N3k.
nxos_igmp_snooping: group-timeout fails when igmp snooping disabled (#…
…53079)

* nxos_igmp_snooping: group-timeout fails when igmp snooping disabled

group-timeout config will be rejected by the device if `ip igmp snooping` is disabled.

  * raise a failure for this condition

  * reorder the command list so that group-timeout is always last

* SA fixes

* SA fixes

* only call gt_dependency if gt
ovirt_vnic_profile: Fix issue in resetting the network filter (#53392)
Currently, there is no way to reset the network profile of vNIC profiles
to "No Network Filter". To reset the vNIC profile, we have to pass an
None value to "types.NetworkFilter". The patch allows to reset it by
passing empty string ('') to "network_filter".
Minor Undefined variable fixes (#53383)
Signed-off-by: Bhavik Bhavsar <bbhavsar@redhat.com>
Make "absent" runnable with specifying NVR in DNF module. (#53206)
* Make "absent" runnable with specifying NVR in DNF module.

* Fix indent and comment.

* Adjust indent.

* Fix removing multiple packages with NVR.

* Replace nevra_strict with nevra , since it's not included in libdnf on Fedora 28.
Ensure Clear Linux parsing is actually parsing a Clear Linux host and…
… all others fall back to NA (#53298)

Fixes a bug where parse_distribution_file_ClearLinux() was called on CoreOS (and probably many other distros) and it returned True since it successfully parses the distribution file. Since this file exists on many Linux distributions and they are a very similar format, add an additional check to make sure it is Clear Linux.

Change the order in which distribution files are processed so NA is last. This prevents a match on CoreOS hosts since they also have /etc/os-release and the called matching function for NA is very general and will match CoreOS.

* Add changelog

* Add unit tests

Only add tests for Clear Linux parsing since that was the cause of this issue.
openssl_*: improve passphrase handling for private keys in PyOpenSSL (#…
…53489)

* Raise OpenSSLBadPassphraseError if passphrase is wrong.

* Improve handling of passphrase errors.

Current behavior for modules is: if passphrase is wrong (or wrongly specified), fail.
Current behavior for openssl_privatekey is: if passphrase is worng (or wrongly specified), regenerate.

* Add changelog.

* Add tests.

* Adjustments for some versions of PyOpenSSL.

* Update lib/ansible/modules/crypto/openssl_certificate.py

Improve text.

Co-Authored-By: felixfontein <felix@fontein.de>
Configurable and parallel gather facts (#49399)
* Configurable list of facts modules (#31783)

 - allow for args dict for specific modules
 - add way to pass parameters
 - avoid facts poluting test
 - move to 'facts gathered' flag
 - add 'gathering' setting tests
 - allow parallel option in case serialization is too slow
 - added support to automatically map network facts
   uses "smart" connection mapping

modular-magician and others added some commits Mar 15, 2019

Parameter change from orgAccess to org_access (#53574)
- It should be in another PR, not sure why it got removed
inventory: find required binary for plugin to work (#53052)
Use existing "get_bin_path" API to find the binary path
required for inventory plugins to work.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
dataloader: check exact value of dir (#52021)
Include path in role with directory which has 'tasks' as end.
For example, roles/sometasks/templates is now considered while searching path.

Fixes: #42585

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 16, 2019

@rhysmeister this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 16, 2019

@rhysmeister This PR was evaluated as a potentially problematic PR for the following reasons:

  • More than 50 changed files.
  • More than 50 commits.

Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: #ansible-devel on irc.freenode.net

click here for bot help

@rhysmeister

This comment has been minimized.

Copy link
Contributor Author

rhysmeister commented Mar 16, 2019

Rebase & merge failed. Will resubmit.

@kcfedun

This comment has been minimized.

Copy link

kcfedun commented on cac3c6e Mar 19, 2019

Hi @jborean93,

Will this be getting back-ported to previous versions of ansible? We are currently dependent on 2.5.x and are experiencing issues now that choco v0.10.12+ returns 2 for no package.

This comment has been minimized.

Copy link
Contributor Author

jborean93 replied Mar 19, 2019

@kcfedun it has been backported to stable-2.7 and stable-2.6 but not stable-2.5 as that is only taking bug security fixes. Your best bet is to set the enhanced exit code feature to off using the choco executable or copying your own patched version of win_chocolately to the library folder to override the built in one. It’s unfortunate but it’s unfortunately what has to be done if you are on this version.

This comment has been minimized.

Copy link

kcfedun replied Mar 19, 2019

@jborean93,

Thanks for your response. We'll review our options and proceed accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.