Add cycling to factory healthy flags

This is meant to address the plugin test failure seen here:
https://app.circleci.com/pipelines/github/hashicorp/nomad/10015/workflows/ace5d615-db03-4cfc-86b2-31e9e00473ec/jobs/77014/tests

I believe the problem was that on rare occasions, the set
of mock storage controllers and nodes were all unhealthy,
so the facet test had no rows to iterate through. Since
there are always three of each, this guarantees some
healthy ones will be present.
This commit is contained in:
Buck Doyle 2020-06-19 15:43:32 -05:00
parent 8a354f828f
commit 0dd9ffdab3
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ export default Factory.extend({
provider: faker.helpers.randomize(STORAGE_PROVIDERS),
providerVersion: '1.0.1',
healthy: faker.random.boolean,
healthy: i => [true, false][i % 2],
healthDescription() {
this.healthy ? 'healthy' : 'unhealthy';
},

View File

@ -7,7 +7,7 @@ export default Factory.extend({
provider: faker.helpers.randomize(STORAGE_PROVIDERS),
providerVersion: '1.0.1',
healthy: faker.random.boolean,
healthy: i => [true, false][i % 2],
healthDescription() {
this.healthy ? 'healthy' : 'unhealthy';
},