修复缓存
Build docker and publish / build (20.15.1) (push) Successful in 7m26s

This commit is contained in:
2026-03-06 21:58:29 -08:00
parent 19932bb9f7
commit 4d913c1728
175 changed files with 437 additions and 12104 deletions
-59
View File
@@ -1,59 +0,0 @@
package snowflake
import (
"testing"
)
func TestGetLocalIp(t *testing.T) {
tests := []struct {
name string
// want byte
wantErr bool
wantFunc func(byte) (bool, string)
}{
// TODO: Add test cases.
{
name: "",
wantErr: false,
wantFunc: func(got byte) (bool, string) { return got > 0, "got > 0" },
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := GetLocalIp()
if (err != nil) != tt.wantErr {
t.Errorf("GetLocalIp() error = %v, wantErr %v", err, tt.wantErr)
return
}
if r, s := tt.wantFunc(got); !r {
t.Errorf("GetLocalIp() = %v, want %v", got, s)
}
})
}
}
func TestGetID(t *testing.T) {
tests := []struct {
name string
// want int64
wantErr bool
wantFunc func(int64) (bool, string)
}{
// TODO: Add test cases.
{
name: "",
wantErr: false,
wantFunc: func(got int64) (bool, string) {
return got > 0, "got > 0"
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := GetID()
if r, s := tt.wantFunc(got); !r {
t.Errorf("GetID() = %v, want %v", got, s)
}
})
}
}