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

Test a simple replicaset setup #729

Closed
wants to merge 4 commits into from

Conversation

stevenpost
Copy link
Contributor

This PR add an additional set of server-spec tests.

Like the ones for replica, but they test the simplest replica setup using just the mongodb::globals, mongodb::server and mongodb::client classes. These simulate the use of PuppetDB by fully setting up the first node, then expanding the set with the new member.

Tests are performed with and without authentication enabled.

stevenpost and others added 4 commits April 3, 2024 11:39
@stevenpost stevenpost mentioned this pull request Apr 3, 2024
@stevenpost
Copy link
Contributor Author

Not sure how to get the test to actually run...

@h-haaks
Copy link
Contributor

h-haaks commented Apr 3, 2024

If you look at https://github.com/voxpupuli/puppet-mongodb/blob/master/spec/acceptance/replset_spec.rb#L8 the if test ensure that the test have to be run in an environment ( beaker controlled ) with more than one host.
At

apply_manifest_on(hosts.reverse, pp, catch_failures: true)
there is code to run puppet apply on all hosts.

I suspect the entire file has been used with a beaker hosts file at some time.
As gha now auto generates host files the multihost beaker set file may have been deleted at som time.
( its not supported in gha I think )

I think we need to figure out how to create such a beaker set file to at least be able to run these tests locally.

@stevenpost
Copy link
Contributor Author

I get the if, I started out with a copy of the acceptance tests for a replicaset, but these new ones doesn't seem to be processed. Currently no clue on how to proceed.

@h-haaks
Copy link
Contributor

h-haaks commented Apr 4, 2024

There is some tutorials here https://github.com/voxpupuli/beaker that may get you started on beaker :)

@h-haaks
Copy link
Contributor

h-haaks commented Apr 11, 2024

Started looking at nodeset definitions. See #743

@h-haaks
Copy link
Contributor

h-haaks commented Apr 17, 2024

@stevenpost With #743 acceptance/replset_spec.rb and acceptance/sharding_spec.rb is run with github actions.
Close this draft?

@stevenpost
Copy link
Contributor Author

Closing, see #729 (comment)

@stevenpost stevenpost closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants