Skip to content

Commit 743c5cc

Browse files
committed
some fixes
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
1 parent 58e8cd1 commit 743c5cc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/ovn_leader_checker/ovn.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ func checkOvnIsAlive() bool {
164164
return true
165165
}
166166

167-
// isDBLeader checks whether the ovn db is leader
168-
// return values: string: local ovsdb-server address, bool: is leader or not
167+
// isDBLeader checks whether the ovn db at address is leader for the given database
169168
func isDBLeader(address, database string) bool {
170169
var dbAddr string
171170
switch database {

pkg/ovs/ovsdb-client_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package ovs
22

33
import (
4-
"os"
54
"testing"
65

76
"k8s.io/apimachinery/pkg/util/intstr"
@@ -47,7 +46,7 @@ func TestOvsdbServerAddress(t *testing.T) {
4746

4847
for _, tt := range tests {
4948
t.Run(tt.name, func(t *testing.T) {
50-
os.Setenv("ENABLE_SSL", tt.envValue)
49+
t.Setenv("ENABLE_SSL", tt.envValue)
5150
result := OvsdbServerAddress(tt.host, tt.port)
5251
if result != tt.expected {
5352
t.Errorf("expected %s, got %s", tt.expected, result)

0 commit comments

Comments
 (0)