File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
ui/apps/dashboard/e2e/workload/deployment Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { Page, expect } from '@playwright/test';
14
14
import * as k8s from '@kubernetes/client-node' ;
15
15
import { parse } from 'yaml' ;
16
16
import _ from 'lodash' ;
17
+ import { readFileSync } from 'fs' ;
17
18
18
19
// Set webServer.url and use.baseURL with the location of the WebServer
19
20
const HOST = process . env . HOST || 'localhost' ;
@@ -37,8 +38,7 @@ function createKarmadaApiClient(): k8s.AppsV1Api {
37
38
// Debug: Check if kubeconfig exists and read its content
38
39
if ( process . env . KUBECONFIG ) {
39
40
try {
40
- const fs = require ( 'fs' ) ;
41
- const kubeconfigContent = fs . readFileSync ( process . env . KUBECONFIG , 'utf8' ) ;
41
+ const kubeconfigContent = readFileSync ( process . env . KUBECONFIG , 'utf8' ) ;
42
42
console . log ( 'KUBECONFIG content:' , kubeconfigContent ) ;
43
43
44
44
// Try loading from file
You can’t perform that action at this time.
0 commit comments