fix test and update invalid ids
Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
import { BackendInitializer } from './BackendInitializer';
|
||||
import { mockServices } from '@backstage/backend-test-utils';
|
||||
import { BackendStartupError } from './BackendStartupError';
|
||||
import { CONFIG_KEY_PART_PATTERN } from '@backstage/config';
|
||||
|
||||
const baseFactories = [
|
||||
mockServices.rootLifecycle.factory(),
|
||||
@@ -1025,7 +1026,7 @@ describe('BackendInitializer', () => {
|
||||
}),
|
||||
);
|
||||
await expect(init.start()).rejects.toThrow(
|
||||
"Invalid pluginId 'test:invalid&id', must match the pattern /^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i (letters, digits, dashes, and underscores only, starting with a letter)",
|
||||
`Invalid pluginId 'test:invalid&id', must match the pattern ${CONFIG_KEY_PART_PATTERN} (letters, digits, dashes, and underscores only, starting with a letter)`,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1055,7 +1056,7 @@ describe('BackendInitializer', () => {
|
||||
}),
|
||||
);
|
||||
await expect(init.start()).rejects.toThrow(
|
||||
"Invalid moduleId 'invalid:module&id' for plugin 'test', must match the pattern /^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i (letters, digits, dashes, and underscores only, starting with a letter)",
|
||||
`Invalid moduleId 'invalid:module&id' for plugin 'test', must match the pattern ${CONFIG_KEY_PART_PATTERN} (letters, digits, dashes, and underscores only, starting with a letter)`,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
*/
|
||||
export const dynamicPluginsFrontendSchemas = createBackendModule({
|
||||
pluginId: 'app',
|
||||
moduleId: 'core.dynamicplugins.frontendSchemas',
|
||||
moduleId: 'core-dynamicplugins-frontendSchemas',
|
||||
register(reg) {
|
||||
reg.registerInit({
|
||||
deps: {
|
||||
|
||||
Reference in New Issue
Block a user