64KB length for mysql support, dbms option for e2e

Signed-off-by: lpete@vmware.com <lpete@vmware.com>
This commit is contained in:
lpete@vmware.com
2023-08-15 16:07:28 -04:00
parent 274a321cea
commit ba7bdec126
4 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -12,7 +12,7 @@ Options:
-h, --help
Commands:
run
run [options]
help [command]
```
@@ -22,5 +22,6 @@ Commands:
Usage: e2e-test run [options]
Options:
-db, --dbms <value>
-h, --help
```
+2 -1
View File
@@ -22,8 +22,9 @@ export function registerCommands(program: Command) {
.command('run')
.description('Run e2e tests')
.option(
'-db, --dbms',
'-db, --dbms <value>',
'Selected database management system for e2e testing, (eg. mysql, postgres)',
'postgres',
)
.action(run);
}
+2 -2
View File
@@ -46,7 +46,7 @@ const templatePackagePaths = [
'packages/create-app/templates/default-app/packages/backend/package.json.hbs',
];
export async function run(dbms: string = 'postgres') {
export async function run(options: { dbms: string }) {
const rootDir = await fs.mkdtemp(resolvePath(os.tmpdir(), 'backstage-e2e-'));
print(`CLI E2E test root: ${rootDir}\n`);
@@ -74,7 +74,7 @@ export async function run(dbms: string = 'postgres') {
Boolean(process.env.BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING)
) {
print('Testing the datbase backend startup');
await dropClientDatabases(dbms);
await dropClientDatabases(options.dbms);
const appConfig = path.resolve(appDir, 'app-config.yaml');
const productionConfig = path.resolve(appDir, 'app-config.production.yaml');
@@ -24,8 +24,9 @@ exports.up = async function up(knex) {
table.comment(
'A cache of static assets that where previously deployed and may still be lazy-loaded by clients',
);
// setting to 64KB to account for long paths
table
.text('path', 'longtext')
.string('path', 65535)
.primary()
.notNullable()
.comment('The path of the file');