Skip to content

Commit

Permalink
Fix insert
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysmeister committed Oct 3, 2024
1 parent 483c73c commit 0ae23ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/mongodb_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ def main():
tmp_db = args[1]
tmp_con_options = tmp_con_options[:-1]
args[1] = "mongodb://{0}:{1}/{2}/{3}".format(module.params['login_host'],
module.params['login_port'],
tmp_db,
tmp_con_options)
module.params['login_port'],
tmp_db,
tmp_con_options)
else:
args = add_arg_to_cmd(args, "--host", module.params['login_host'], omit=omit)
args = add_arg_to_cmd(args, "--port", module.params['login_port'], omit=omit)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/mongodb_shell/tasks/677.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
- name: The test db needs to exist for the connection string test below to work
community.mongodb.mongodb_shell:
<<: *mongo_parameters
eval: 'db.test.insertOne()'
eval: 'db.test.insertOne({"foo": "bar"})'

- name: Test with a single string conn option
community.mongodb.mongodb_shell:
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/targets/mongodb_shell/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,3 @@
- include_tasks: mongod_teardown.yml

- include_tasks: 677.yml


0 comments on commit 0ae23ea

Please sign in to comment.