@@ -97,7 +97,7 @@ func TestReconcileNCStatePrimaryIPChangeShouldFail(t *testing.T) {
9797
9898 // Create dummy CNS state file
9999 stateFile := "/var/lib/azure-network/azure-cns.json"
100- _ = os .WriteFile (stateFile , []byte ("dummy" ), 0644 )
100+ _ = os .WriteFile (stateFile , []byte ("dummy" ), 0600 )
101101 defer os .Remove (stateFile )
102102
103103 defer func () {
@@ -1701,13 +1701,13 @@ func TestCreateOrUpdateNCInternal_PrimaryCAMismatchShouldPanicAndDeleteStateFile
17011701 // Step 1: Create initial NC with PrimaryCA "10.0.0.5/24"
17021702 secondaryIPConfigs := make (map [string ]cns.SecondaryIPConfig )
17031703 ipaddress := "10.0.0.6"
1704- secIpConfig := newSecondaryIPConfig (ipaddress , - 1 )
1705- ipId := uuid .New ()
1706- secondaryIPConfigs [ipId .String ()] = secIpConfig
1704+ secIPConfig := newSecondaryIPConfig (ipaddress , - 1 )
1705+ ipID := uuid .New ()
1706+ secondaryIPConfigs [ipID .String ()] = secIPConfig
17071707
1708- ncId := "test-nc"
1708+ ncID := "test-nc"
17091709 ncVersion := "-1"
1710- req := generateNetworkContainerRequest (secondaryIPConfigs , ncId , ncVersion )
1710+ req := generateNetworkContainerRequest (secondaryIPConfigs , ncID , ncVersion )
17111711 req .IPConfiguration .IPSubnet .IPAddress = "10.0.0.5"
17121712 req .IPConfiguration .IPSubnet .PrefixLength = 24
17131713 returnCode := svc .CreateOrUpdateNetworkContainerInternal (req )
@@ -1717,13 +1717,13 @@ func TestCreateOrUpdateNCInternal_PrimaryCAMismatchShouldPanicAndDeleteStateFile
17171717 validateNetworkRequest (t , * req )
17181718
17191719 // Step 2: Prepare a request with a different PrimaryCA
1720- reqMismatch := generateNetworkContainerRequest (secondaryIPConfigs , ncId , ncVersion )
1720+ reqMismatch := generateNetworkContainerRequest (secondaryIPConfigs , ncID , ncVersion )
17211721 reqMismatch .IPConfiguration .IPSubnet .IPAddress = "10.0.0.7" // different IP
17221722 reqMismatch .IPConfiguration .IPSubnet .PrefixLength = 24
17231723
17241724 // Step 3: Create dummy CNS state file
17251725 stateFile := "/var/lib/azure-network/azure-cns.json"
1726- _ = os .WriteFile (stateFile , []byte ("dummy" ), 0644 )
1726+ _ = os .WriteFile (stateFile , []byte ("dummy" ), 0600 )
17271727 defer os .Remove (stateFile )
17281728
17291729 defer func () {
0 commit comments