Browse Source

fix: database reset path correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
e5eb47af18
  1. 4
      packages/nocodb-nest/src/guards/global/global.guard.ts
  2. 4
      packages/nocodb-nest/src/modules/test/TestResetService/resetMetaSakilaSqliteProject.ts
  3. 2
      packages/nocodb-nest/src/modules/test/TestResetService/resetMysqlSakilaProject.ts
  4. 2
      packages/nocodb-nest/src/modules/test/TestResetService/resetPgSakilaProject.ts

4
packages/nocodb-nest/src/guards/global/global.guard.ts

@ -1,7 +1,5 @@
import { Inject, Injectable } from '@nestjs/common';
import { ExecutionContextHost } from '@nestjs/core/helpers/execution-context-host';
import { Injectable } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import passport from 'passport';
import { lastValueFrom, Observable } from 'rxjs';
import { JwtStrategy } from '../../strategies/jwt.strategy';
import type { ExecutionContext } from '@nestjs/common';

4
packages/nocodb-nest/src/modules/test/TestResetService/resetMetaSakilaSqliteProject.ts

@ -3,7 +3,7 @@ import axios from 'axios';
const sqliteFilePath = (parallelId: string) => {
const rootDir = __dirname.replace(
'/src/lib/services/test/TestResetService',
'/src/modules/test/TestResetService',
'',
);
@ -79,7 +79,7 @@ const deleteSqliteFileIfExists = async (parallelId: string) => {
const seedSakilaSqliteFile = async (parallelId: string) => {
const testsDir = __dirname.replace(
'/src/lib/services/test/TestResetService',
'/src/modules/test/TestResetService',
'/tests',
);

2
packages/nocodb-nest/src/modules/test/TestResetService/resetMysqlSakilaProject.ts

@ -86,7 +86,7 @@ const resetSakilaMysql = async (
isEmptyProject: boolean,
) => {
const testsDir = __dirname.replace(
'/src/lib/services/test/TestResetService',
'/src/modules/test/TestResetService',
'/tests',
);

2
packages/nocodb-nest/src/modules/test/TestResetService/resetPgSakilaProject.ts

@ -79,7 +79,7 @@ const isSakilaPgToBeReset = async (parallelId: string, project?: Project) => {
const resetSakilaPg = async (parallelId: string, isEmptyProject: boolean) => {
const testsDir = __dirname.replace(
'/src/lib/services/test/TestResetService',
'/src/modules/test/TestResetService',
'/tests',
);

Loading…
Cancel
Save