scaffolder-backend: rename to ScaffolderEntitiesProcessor
Co-authored-by: Johan Haals <johan.haals@gmail.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
+4
-4
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateEntityProcessor } from './TemplateEntityProcessor';
|
||||
import { ScaffolderEntitiesProcessor } from './ScaffolderEntitiesProcessor';
|
||||
|
||||
const mockLocation = { type: 'a', target: 'b' };
|
||||
const mockEntity: TemplateEntityV1beta3 = {
|
||||
@@ -30,10 +30,10 @@ const mockEntity: TemplateEntityV1beta3 = {
|
||||
},
|
||||
};
|
||||
|
||||
describe('TemplateEntityProcessor', () => {
|
||||
describe('ScaffolderEntitiesProcessor', () => {
|
||||
describe('validateEntityKind', () => {
|
||||
it('validates the entity kind', async () => {
|
||||
const processor = new TemplateEntityProcessor();
|
||||
const processor = new ScaffolderEntitiesProcessor();
|
||||
|
||||
await expect(processor.validateEntityKind(mockEntity)).resolves.toBe(
|
||||
true,
|
||||
@@ -52,7 +52,7 @@ describe('TemplateEntityProcessor', () => {
|
||||
|
||||
describe('postProcessEntity', () => {
|
||||
it('generates relations for component entities', async () => {
|
||||
const processor = new TemplateEntityProcessor();
|
||||
const processor = new ScaffolderEntitiesProcessor();
|
||||
|
||||
const emit = jest.fn();
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import {
|
||||
templateEntityV1beta3Schema,
|
||||
} from '@backstage/plugin-scaffolder-common';
|
||||
|
||||
export class TemplateEntityProcessor implements CatalogProcessor {
|
||||
export class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
||||
private readonly validators = [
|
||||
entityKindSchemaValidator(templateEntityV1beta3Schema),
|
||||
];
|
||||
@@ -14,4 +14,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { TemplateEntityProcessor } from './TemplateEntityProcessor';
|
||||
export { ScaffolderEntitiesProcessor } from './ScaffolderEntitiesProcessor';
|
||||
|
||||
Reference in New Issue
Block a user