voxpupuli / puppet-mongodb

mongodb installation
Apache License 2.0
93 stars 451 forks source link

Test a simple replicaset setup #729

Closed stevenpost closed 7 months ago

stevenpost commented 8 months ago

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 commented 8 months ago

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

h-haaks commented 8 months ago

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 https://github.com/voxpupuli/puppet-mongodb/blob/5d80bfa2dcaa65dcad6e3c8038bde540d21a0179/spec/acceptance/replset_spec.rb#L47 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 commented 8 months ago

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 commented 8 months ago

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

h-haaks commented 7 months ago

Started looking at nodeset definitions. See #743

h-haaks commented 7 months ago

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

stevenpost commented 7 months ago

Closing, see https://github.com/voxpupuli/puppet-mongodb/pull/729#issuecomment-2061175472