Skip to content

Commit 1bb60c4

Browse files
committed
Remove duplication in log file names
1 parent 7dd9c0f commit 1bb60c4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/thread_tests/thread_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ func TestAllClustersAppThread(t *testing.T) {
1818
t.Run("Commission", func(t *testing.T) {
1919
stdout, _, _ := utils.Exec(t, "chip-tool pairing code-thread 110 hex:"+trimmedActiveDataset+" 34970112332 2>&1")
2020

21-
assert.NoError(t, utils.WriteLogFile(t, "chip-tool-thread-pairing", stdout))
21+
assert.NoError(t, utils.WriteLogFile(t, "chip-tool", stdout))
2222
})
2323

2424
t.Run("Control", func(t *testing.T) {
2525
start := time.Now()
2626
stdout, _, _ := utils.Exec(t, "chip-tool onoff toggle 110 1 2>&1")
2727

28-
assert.NoError(t, utils.WriteLogFile(t, "chip-tool-thread-onoff", stdout))
28+
assert.NoError(t, utils.WriteLogFile(t, "chip-tool", stdout))
2929

3030
// 0x6 is the Matter Cluster ID for on-off
3131
// Using cluster ID here because of a buffering issue in the log stream:

tests/upgrade_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestUpgrade(t *testing.T) {
4848

4949
t.Run("Commission", func(t *testing.T) {
5050
stdout, _, _ := utils.Exec(t, "chip-tool pairing onnetwork 110 20202021 2>&1")
51-
assert.NoError(t, utils.WriteLogFile(t, "chip-tool-pairing", stdout))
51+
assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout))
5252
})
5353

5454
t.Run("Control before upgrade", func(t *testing.T) {
@@ -58,7 +58,7 @@ func TestUpgrade(t *testing.T) {
5858

5959
start := time.Now()
6060
stdout, _, _ := utils.Exec(t, "chip-tool onoff on 110 1 2>&1")
61-
assert.NoError(t, utils.WriteLogFile(t, "chip-tool-onoff", stdout))
61+
assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout))
6262

6363
waitForOnOffHandlingByAllClustersApp(t, start)
6464
})
@@ -71,14 +71,14 @@ func TestUpgrade(t *testing.T) {
7171
}
7272
})
7373

74-
t.Run("Control upgraded snap", func(t *testing.T) {
74+
t.Run("Control after upgrade", func(t *testing.T) {
7575
snapVersion := utils.SnapVersion(t, chipToolSnap)
7676
snapRevision := utils.SnapRevision(t, chipToolSnap)
7777
log.Printf("%s installed version %s build %s\n", chipToolSnap, snapVersion, snapRevision)
7878

7979
start := time.Now()
8080
stdout, _, _ := utils.Exec(t, "chip-tool onoff off 110 1 2>&1")
81-
assert.NoError(t, utils.WriteLogFile(t, "chip-tool-onoff", stdout))
81+
assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout))
8282

8383
waitForOnOffHandlingByAllClustersApp(t, start)
8484
})

tests/wifi_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ func TestAllClustersAppWiFi(t *testing.T) {
3636

3737
t.Run("Commission", func(t *testing.T) {
3838
stdout, _, _ := utils.Exec(t, "chip-tool pairing onnetwork 110 20202021 2>&1")
39-
assert.NoError(t, utils.WriteLogFile(t, "chip-tool-pairing", stdout))
39+
assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout))
4040
})
4141

4242
t.Run("Control", func(t *testing.T) {
4343
stdout, _, _ := utils.Exec(t, "chip-tool onoff toggle 110 1 2>&1")
44-
assert.NoError(t, utils.WriteLogFile(t, "chip-tool-toggle", stdout))
44+
assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout))
4545

4646
waitForOnOffHandlingByAllClustersApp(t, start)
4747
})

0 commit comments

Comments
 (0)