Skip to content

Commit e6274aa

Browse files
committed
fix: updates
1 parent f74fb20 commit e6274aa

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

packages/spacecat-shared-data-access/src/models/geo-experiment/geo-experiment.model.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ class GeoExperiment extends BaseModel {
2020
static STATUSES = {
2121
PRE_ANALYSIS_SUBMITTED: 'pre_analysis_submitted',
2222
PRE_ANALYSIS_DONE: 'pre_analysis_done',
23+
PRE_ANALYSIS_FAILED: 'pre_analysis_failed',
2324
OPTIMISATION_DEPLOYED: 'optimisation_deployed',
2425
POST_ANALYSIS_SUBMITTED: 'post_analysis_submitted',
2526
POST_ANALYSIS_DONE: 'post_analysis_done',
27+
POST_ANALYSIS_FAILED: 'post_analysis_failed',
2628
FAILED: 'failed',
2729
};
2830
}

packages/spacecat-shared-data-access/src/models/geo-experiment/geo-experiment.schema.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const schema = new SchemaBuilder(GeoExperiment, GeoExperimentCollection)
3737
.addAttribute('status', {
3838
type: Object.values(GeoExperiment.STATUSES),
3939
required: true,
40-
default: GeoExperiment.STATUSES.PRE_ANALYSIS_SUBMITTED,
4140
})
4241
.addAttribute('skipDeploy', {
4342
type: 'boolean',

packages/spacecat-shared-data-access/test/unit/models/geo-experiment/geo-experiment.model.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ describe('GeoExperimentModel', () => {
7272

7373
it('gets and sets status', () => {
7474
expect(instance.getStatus()).to.equal(GeoExperiment.STATUSES.POST_ANALYSIS_DONE);
75+
instance.setStatus(GeoExperiment.STATUSES.PRE_ANALYSIS_FAILED);
76+
expect(instance.getStatus()).to.equal(GeoExperiment.STATUSES.PRE_ANALYSIS_FAILED);
77+
instance.setStatus(GeoExperiment.STATUSES.POST_ANALYSIS_FAILED);
78+
expect(instance.getStatus()).to.equal(GeoExperiment.STATUSES.POST_ANALYSIS_FAILED);
7579
instance.setStatus(GeoExperiment.STATUSES.FAILED);
7680
expect(instance.getStatus()).to.equal(GeoExperiment.STATUSES.FAILED);
7781
});

0 commit comments

Comments
 (0)