chore(repo): enable DB and verbose logging for module federation tests (#28792)
This can help us debug issues that come up during these tests. <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
This commit is contained in:
parent
c08d995290
commit
8e4f9f55b7
@ -2,21 +2,16 @@ import { stripIndents } from '@nx/devkit';
|
||||
import {
|
||||
checkFilesExist,
|
||||
cleanupProject,
|
||||
fileExists,
|
||||
killPorts,
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
readJson,
|
||||
runCLI,
|
||||
runCLIAsync,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
tmpProjPath,
|
||||
uniq,
|
||||
updateFile,
|
||||
updateJson,
|
||||
} from '@nx/e2e/utils';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('React Rspack Module Federation', () => {
|
||||
describe('Default Configuration', () => {
|
||||
|
||||
@ -5,14 +5,13 @@ import {
|
||||
killPorts,
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
runCLI,
|
||||
runCLIAsync,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
uniq,
|
||||
updateFile,
|
||||
} from '@nx/e2e/utils';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('React Module Federation', () => {
|
||||
describe('Default Configuration', () => {
|
||||
|
||||
@ -4,7 +4,6 @@ import {
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
readJson,
|
||||
runCLI,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
tmpProjPath,
|
||||
@ -12,7 +11,7 @@ import {
|
||||
updateFile,
|
||||
updateJson,
|
||||
} from '@nx/e2e/utils';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('Dynamic Module Federation', () => {
|
||||
beforeAll(() => {
|
||||
|
||||
@ -4,7 +4,6 @@ import {
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
readJson,
|
||||
runCLI,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
tmpProjPath,
|
||||
@ -12,7 +11,7 @@ import {
|
||||
updateFile,
|
||||
updateJson,
|
||||
} from '@nx/e2e/utils';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('Dynamic Module Federation', () => {
|
||||
beforeAll(() => {
|
||||
|
||||
@ -2,13 +2,12 @@ import {
|
||||
cleanupProject,
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
runCLI,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
uniq,
|
||||
updateFile,
|
||||
} from '@nx/e2e/utils';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('Federate Module', () => {
|
||||
let proj: string;
|
||||
|
||||
@ -2,13 +2,12 @@ import {
|
||||
cleanupProject,
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
runCLI,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
uniq,
|
||||
updateFile,
|
||||
} from '@nx/e2e/utils';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('Federate Module', () => {
|
||||
let proj: string;
|
||||
|
||||
@ -2,7 +2,6 @@ import {
|
||||
cleanupProject,
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
runCLI,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
uniq,
|
||||
@ -10,7 +9,7 @@ import {
|
||||
updateJson,
|
||||
} from '@nx/e2e/utils';
|
||||
import { stripIndents } from 'nx/src/utils/strip-indents';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('Independent Deployability', () => {
|
||||
let proj: string;
|
||||
|
||||
@ -2,7 +2,6 @@ import {
|
||||
cleanupProject,
|
||||
killProcessAndPorts,
|
||||
newProject,
|
||||
runCLI,
|
||||
runCommandUntil,
|
||||
runE2ETests,
|
||||
uniq,
|
||||
@ -10,7 +9,7 @@ import {
|
||||
updateJson,
|
||||
} from '@nx/e2e/utils';
|
||||
import { stripIndents } from 'nx/src/utils/strip-indents';
|
||||
import { readPort } from './utils';
|
||||
import { readPort, runCLI } from './utils';
|
||||
|
||||
describe('Independent Deployability', () => {
|
||||
let proj: string;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { readJson } from '@nx/e2e/utils';
|
||||
import { readJson, runCLI as _runCLI } from '@nx/e2e/utils';
|
||||
import { join } from 'path';
|
||||
|
||||
export function readPort(appName: string): number {
|
||||
@ -10,3 +10,15 @@ export function readPort(appName: string): number {
|
||||
}
|
||||
return config.targets.serve.options.port;
|
||||
}
|
||||
|
||||
// Using this function to debug when DB errors occur during MF e2e tests.
|
||||
export function runCLI(cmd: string, opts?: { env?: Record<string, string> }) {
|
||||
return _runCLI(cmd, {
|
||||
verbose: true,
|
||||
env: {
|
||||
...opts?.env,
|
||||
NX_VERBOSE_LOGGING: 'true',
|
||||
NX_NATIVE_LOGGING: 'nx::native::db',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user