From af896824a7ae518e07ed5653311d8e6651cab1e0 Mon Sep 17 00:00:00 2001 From: John-Michael Mulesa Date: Thu, 23 Jul 2026 08:01:39 -0700 Subject: [PATCH] Update registry test paths to be unique per test file. Rename the registry paths used in cabbie tests to avoid collisions and improve clarity. Also add a cleanup call in cabbie_test.go to ensure registry keys are properly removed. PiperOrigin-RevId: 952762296 --- cabbie_test.go | 3 ++- cablib/cablib_test.go | 2 +- wsus_test.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cabbie_test.go b/cabbie_test.go index bb24064..2038040 100644 --- a/cabbie_test.go +++ b/cabbie_test.go @@ -22,7 +22,7 @@ import ( ) const ( - testPath = `SOFTWARE\Bar` + testPath = `SOFTWARE\Cabbie_MainTest` ) func createTestKeys() error { @@ -39,6 +39,7 @@ func cleanupTestKey() error { func TestRegLoadKeyMissing(t *testing.T) { // Setup + cleanupTestKey() expected := newSettings() testconfig := newSettings() // End Setup diff --git a/cablib/cablib_test.go b/cablib/cablib_test.go index 898e452..09266da 100644 --- a/cablib/cablib_test.go +++ b/cablib/cablib_test.go @@ -24,7 +24,7 @@ import ( ) const ( - testPath = `SOFTWARE\Bar` + testPath = `SOFTWARE\Cabbie_CablibTest` ) var ( diff --git a/wsus_test.go b/wsus_test.go index 17a9558..b101eab 100644 --- a/wsus_test.go +++ b/wsus_test.go @@ -24,7 +24,7 @@ import ( "golang.org/x/sys/windows/registry" ) -const testRegPath = `SOFTWARE\Cabbie_test` +const testRegPath = `SOFTWARE\Cabbie_WsusTest` type mockConn struct { net.Conn