修复待升级节点版本号对比错误

This commit is contained in:
GoEdgeLab
2021-01-18 12:35:29 +08:00
parent ce664ebf69
commit 9b60ed9ba9
5 changed files with 77 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
package utils
import "testing"
func TestNodeStatus_ComputerBuildVersionCode(t *testing.T) {
{
t.Log("", VersionToLong(""))
}
{
t.Log("0.0.6", VersionToLong("0.0.6"))
}
{
t.Log("0.0.6.1", VersionToLong("0.0.6.1"))
}
{
t.Log("0.0.7", VersionToLong("0.0.7"))
}
{
t.Log("0.7", VersionToLong("0.7"))
}
{
t.Log("7", VersionToLong("7"))
}
{
t.Log("7.0.1", VersionToLong("7.0.1"))
}
}