Skip to content

Commit 0b3595a

Browse files
committed
debug
Signed-off-by: SunsetB612 <[email protected]>
1 parent caaeb32 commit 0b3595a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/apps/dashboard/e2e/workload/deployment/test-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { Page, expect } from '@playwright/test';
1414
import * as k8s from '@kubernetes/client-node';
1515
import { parse } from 'yaml';
1616
import _ from 'lodash';
17+
import { readFileSync } from 'fs';
1718

1819
// Set webServer.url and use.baseURL with the location of the WebServer
1920
const HOST = process.env.HOST || 'localhost';
@@ -37,8 +38,7 @@ function createKarmadaApiClient(): k8s.AppsV1Api {
3738
// Debug: Check if kubeconfig exists and read its content
3839
if (process.env.KUBECONFIG) {
3940
try {
40-
const fs = require('fs');
41-
const kubeconfigContent = fs.readFileSync(process.env.KUBECONFIG, 'utf8');
41+
const kubeconfigContent = readFileSync(process.env.KUBECONFIG, 'utf8');
4242
console.log('KUBECONFIG content:', kubeconfigContent);
4343

4444
// Try loading from file

0 commit comments

Comments
 (0)