From 1bb60c4f15cba5cf4644267c1cdcc9209794ecf4 Mon Sep 17 00:00:00 2001 From: JP Meijers Date: Wed, 7 Aug 2024 13:34:05 +0200 Subject: [PATCH] Remove duplication in log file names --- tests/thread_tests/thread_test.go | 4 ++-- tests/upgrade_test.go | 8 ++++---- tests/wifi_test.go | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/thread_tests/thread_test.go b/tests/thread_tests/thread_test.go index 1fc38ff..0bb4b18 100644 --- a/tests/thread_tests/thread_test.go +++ b/tests/thread_tests/thread_test.go @@ -18,14 +18,14 @@ func TestAllClustersAppThread(t *testing.T) { t.Run("Commission", func(t *testing.T) { stdout, _, _ := utils.Exec(t, "chip-tool pairing code-thread 110 hex:"+trimmedActiveDataset+" 34970112332 2>&1") - assert.NoError(t, utils.WriteLogFile(t, "chip-tool-thread-pairing", stdout)) + assert.NoError(t, utils.WriteLogFile(t, "chip-tool", stdout)) }) t.Run("Control", func(t *testing.T) { start := time.Now() stdout, _, _ := utils.Exec(t, "chip-tool onoff toggle 110 1 2>&1") - assert.NoError(t, utils.WriteLogFile(t, "chip-tool-thread-onoff", stdout)) + assert.NoError(t, utils.WriteLogFile(t, "chip-tool", stdout)) // 0x6 is the Matter Cluster ID for on-off // Using cluster ID here because of a buffering issue in the log stream: diff --git a/tests/upgrade_test.go b/tests/upgrade_test.go index 5299ba9..90488bd 100644 --- a/tests/upgrade_test.go +++ b/tests/upgrade_test.go @@ -48,7 +48,7 @@ func TestUpgrade(t *testing.T) { t.Run("Commission", func(t *testing.T) { stdout, _, _ := utils.Exec(t, "chip-tool pairing onnetwork 110 20202021 2>&1") - assert.NoError(t, utils.WriteLogFile(t, "chip-tool-pairing", stdout)) + assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout)) }) t.Run("Control before upgrade", func(t *testing.T) { @@ -58,7 +58,7 @@ func TestUpgrade(t *testing.T) { start := time.Now() stdout, _, _ := utils.Exec(t, "chip-tool onoff on 110 1 2>&1") - assert.NoError(t, utils.WriteLogFile(t, "chip-tool-onoff", stdout)) + assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout)) waitForOnOffHandlingByAllClustersApp(t, start) }) @@ -71,14 +71,14 @@ func TestUpgrade(t *testing.T) { } }) - t.Run("Control upgraded snap", func(t *testing.T) { + t.Run("Control after upgrade", func(t *testing.T) { snapVersion := utils.SnapVersion(t, chipToolSnap) snapRevision := utils.SnapRevision(t, chipToolSnap) log.Printf("%s installed version %s build %s\n", chipToolSnap, snapVersion, snapRevision) start := time.Now() stdout, _, _ := utils.Exec(t, "chip-tool onoff off 110 1 2>&1") - assert.NoError(t, utils.WriteLogFile(t, "chip-tool-onoff", stdout)) + assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout)) waitForOnOffHandlingByAllClustersApp(t, start) }) diff --git a/tests/wifi_test.go b/tests/wifi_test.go index 43352cb..8ded1b6 100644 --- a/tests/wifi_test.go +++ b/tests/wifi_test.go @@ -36,12 +36,12 @@ func TestAllClustersAppWiFi(t *testing.T) { t.Run("Commission", func(t *testing.T) { stdout, _, _ := utils.Exec(t, "chip-tool pairing onnetwork 110 20202021 2>&1") - assert.NoError(t, utils.WriteLogFile(t, "chip-tool-pairing", stdout)) + assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout)) }) t.Run("Control", func(t *testing.T) { stdout, _, _ := utils.Exec(t, "chip-tool onoff toggle 110 1 2>&1") - assert.NoError(t, utils.WriteLogFile(t, "chip-tool-toggle", stdout)) + assert.NoError(t, utils.WriteLogFile(t, chipToolSnap, stdout)) waitForOnOffHandlingByAllClustersApp(t, start) })