File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 11package capture
22
33import (
4+ "os"
45 "testing"
6+
7+ "github.com/stretchr/testify/require"
58 "yc-agent/internal/capture/executils"
69)
710
811func TestHDSub (t * testing.T ) {
12+ // Create temporary directory for test execution
13+ tmpDir , err := os .MkdirTemp ("" , "hdsub-capture-test-*" )
14+ require .NoError (t , err , "Failed to create temp directory" )
15+ defer os .RemoveAll (tmpDir )
16+
17+ // Change to temp directory for test execution
18+ originalDir , err := os .Getwd ()
19+ require .NoError (t , err , "Failed to get current directory" )
20+ defer os .Chdir (originalDir )
21+
22+ err = os .Chdir (tmpDir )
23+ require .NoError (t , err , "Failed to change to temp directory" )
24+
925 noGC , err := executils .CommandStartInBackground (executils.Command {"java" , "MyClass" })
1026 if err != nil {
1127 t .Fatal (err )
You can’t perform that action at this time.
0 commit comments