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

Change how it's determined when to run specific acceptance tests #1243

Merged
merged 3 commits into from
Apr 16, 2020

Conversation

treydock
Copy link
Collaborator

Pull Request Checklist

Description

Tests are run based on BEAKER_sensu_mode environment variable which defaults to base

This doesn't change when or how things are tested, just splits tests into smaller groups so things like examples will run separate than custom types. The core centos7 tests will run like all other OSes but also include postgresql tests and bolt which were also only done with centos7 before. It's still only centos7 that is used to test clusters and custom types.

Tests are run based on `BEAKER_sensu_mode` environment variable which defaults to `base`
@treydock treydock requested a review from ghoneycutt April 15, 2020 21:00
@@ -82,6 +82,15 @@ The class tests are ordered with numeric prefixes to control the order they run.

The type of `sensu_check` will have its tests in `sensu_check_spec.rb`. The tests to run are adding resources, updating resources, and deleting resources. Some extra test cases should be added based on any complexities of a given type.

The resources `sensu_cluster_role`, `sensu_cluster_role_binding`, `sensu_role`, and `sensu_role_binding` are grouped into `sensu_rbac_resources_spec.rb` with the goal of speeding up testing times.

By default only tests for class resources run which is the same as setting the enviornment variable `BEAKER_sensu_mode=base`. The other possible modes are the following:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see this in .travis.yml, should I?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default of base is set in spec/spec_helper_acceptance.rb where the setting is defined. If nothing is defined it defaults to base.

stage: acceptance
- rvm: 2.5.7
services: docker
env: BEAKER_set="centos-7" BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_sensu_mode=examples
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we're missing puppet5 for examples

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to have puppet5 tested too.

@ghoneycutt ghoneycutt merged commit ceaa43e into master Apr 16, 2020
@ghoneycutt ghoneycutt deleted the acceptance branch April 16, 2020 19:43
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