Skip to content

Commit b855b65

Browse files
committed
Keep a socket file under testdata/
As like other tests, keeping the socket under testadata/ allows us to run multiple builds (e.g. master and PRs) in parallel on a same host. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent a56acdf commit b855b65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

machine_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,8 @@ func createValidConfig(t *testing.T, socketPath string) Config {
12021202
}
12031203

12041204
func TestSignalForwarding(t *testing.T) {
1205+
socketPath := filepath.Join(testDataPath, "TestSignalForwarding.sock")
1206+
12051207
forwardedSignals := []os.Signal{
12061208
syscall.SIGUSR1,
12071209
syscall.SIGUSR2,
@@ -1216,7 +1218,7 @@ func TestSignalForwarding(t *testing.T) {
12161218
cfg := Config{
12171219
Debug: true,
12181220
KernelImagePath: filepath.Join(testDataPath, "vmlinux"),
1219-
SocketPath: "/tmp/TestSignalForwarding.sock",
1221+
SocketPath: socketPath,
12201222
Drives: []models.Drive{
12211223
{
12221224
DriveID: String("0"),
@@ -1228,7 +1230,7 @@ func TestSignalForwarding(t *testing.T) {
12281230
DisableValidation: true,
12291231
ForwardSignals: forwardedSignals,
12301232
}
1231-
defer os.RemoveAll("/tmp/TestSignalForwarding.sock")
1233+
defer os.RemoveAll(socketPath)
12321234

12331235
opClient := fctesting.MockClient{}
12341236

0 commit comments

Comments
 (0)