Commit 911a59d5 authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh

Update algorithm common schema from beat.core

Restricts the algorithm schema to properly require inputs &
outputs in endpoints. See beat.core MR 52

See #174
parent 611820c1
......@@ -20,6 +20,8 @@ describe('<ValidSchemaBadge />', () => {
wrapper.unmount();
});
const invalidTestAlgNames = [`test/pcatest/1`, `test/testing/1`];
describe('should accept', () => {
describe('database', () => {
const dbs = [
......@@ -93,12 +95,16 @@ describe('<ValidSchemaBadge />', () => {
},
// non-analyzer
splittable: false,
schema_version: 3.0,
api_version: 2.0,
type: 'sequential',
schema_version: 3.0,
api_version: 2.0,
type: 'sequential',
}
}
].concat(testAlgs.map(a => getValidObj(a)));
].concat(
testAlgs
.filter(a => !invalidTestAlgNames.includes(a.name))
.map(a => getValidObj(a))
);
algs.forEach(function(alg) {
it(`${ alg.name }`, () => {
......@@ -207,5 +213,18 @@ describe('<ValidSchemaBadge />', () => {
});
});
});
describe('algorithm', () => {
const algs = testAlgs
.filter(a => invalidTestAlgNames.includes(a.name))
.map(a => getValidObj(a));
algs.forEach(function(alg) {
it(`${ alg.name }`, () => {
wrapper = mount(<C entity='algorithm' obj={alg} />);
expect(wrapper.find('Badge')).to.have.prop('color', 'danger');
});
});
});
});
});
......@@ -26,6 +26,7 @@
}
},
"uniqueItems": true,
"minProperties": 1,
"additionalProperties": false
},
......@@ -169,6 +170,7 @@
}
},
"uniqueItems": true,
"minProperties": 1,
"additionalProperties": false
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment