refactor: refactor code and fix ut (#709)

* feat: ut (#707)

* feat: ut (#708)
This commit is contained in:
naison
2025-08-24 16:46:09 +08:00
committed by GitHub
parent 3a4dbe41c7
commit 0548c5a8a0
7 changed files with 86 additions and 52 deletions

View File

@@ -164,7 +164,8 @@ func (u *ut) checkContent(ctx context.Context, t *testing.T, podName string, con
}
}
func (u *ut) TestCompile(t *testing.T) {
func TestCompile(t *testing.T) {
u := &ut{}
u.writeTempFile(t)
}
@@ -187,7 +188,11 @@ func (u *ut) writeTempFile(t *testing.T) string {
if err != nil {
t.Fatal(err)
}
return temp.Name()
absPath, err := filepath.Abs(temp.Name())
if err != nil {
t.Fatal(err)
}
return absPath
}
func (u *ut) checkSyncWithFullProxyStatus(t *testing.T) {