Rename unittest for metricsinfo (#7795)

Signed-off-by: yhmo <yihua.mo@zilliz.com>
This commit is contained in:
groot 2021-09-13 16:33:27 +08:00 committed by GitHub
parent a953c912b2
commit 203010524d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestNewMetricsCacheManager(t *testing.T) {
func Test_NewMetricsCacheManager(t *testing.T) {
manager := NewMetricsCacheManager()
assert.NotNil(t, manager)
}

View File

@ -18,7 +18,7 @@ import (
"go.uber.org/zap"
)
func TestGetCPUCoreCount(t *testing.T) {
func Test_GetCPUCoreCount(t *testing.T) {
log.Info("TestGetCPUCoreCount",
zap.Int("physical CPUCoreCount", GetCPUCoreCount(false)))
@ -26,27 +26,27 @@ func TestGetCPUCoreCount(t *testing.T) {
zap.Int("logical CPUCoreCount", GetCPUCoreCount(true)))
}
func TestGetCPUUsage(t *testing.T) {
func Test_GetCPUUsage(t *testing.T) {
log.Info("TestGetCPUUsage",
zap.Float64("CPUUsage", GetCPUUsage()))
}
func TestGetMemoryCount(t *testing.T) {
func Test_GetMemoryCount(t *testing.T) {
log.Info("TestGetMemoryCount",
zap.Uint64("MemoryCount", GetMemoryCount()))
}
func TestGetUsedMemoryCount(t *testing.T) {
func Test_GetUsedMemoryCount(t *testing.T) {
log.Info("TestGetUsedMemoryCount",
zap.Uint64("UsedMemoryCount", GetUsedMemoryCount()))
}
func TestGetDiskCount(t *testing.T) {
func Test_GetDiskCount(t *testing.T) {
log.Info("TestGetDiskCount",
zap.Uint64("DiskCount", GetDiskCount()))
}
func TestGetDiskUsage(t *testing.T) {
func Test_GetDiskUsage(t *testing.T) {
log.Info("TestGetDiskUsage",
zap.Uint64("DiskUsage", GetDiskUsage()))
}

View File

@ -21,7 +21,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestParseMetricType(t *testing.T) {
func Test_ParseMetricType(t *testing.T) {
m1 := make(map[string]interface{})
b1, err := json.Marshal(m1)
assert.Equal(t, nil, err)
@ -61,7 +61,7 @@ func TestParseMetricType(t *testing.T) {
}
func TestConstructRequestByMetricType(t *testing.T) {
func Test_ConstructRequestByMetricType(t *testing.T) {
cases := []struct {
metricType string
errIsNil bool

View File

@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert"
)
func TestConstructComponentName(t *testing.T) {
func Test_ConstructComponentName(t *testing.T) {
roleList := []string{
typeutil.QueryNodeRole,
}