1 Star 0 Fork 18

吴磊磊/grafana

forked from src-openEuler/grafana 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
005-fix-gtime-test-32bit.patch 1020 Bytes
一键复制 编辑 原始数据 按行查看 历史
wk333 提交于 2021-11-17 15:28 . Update Patch Source Provides
diff --git a/pkg/components/gtime/gtime_test.go b/pkg/components/gtime/gtime_test.go
index 0b1b23a1db..eb9fe718c7 100644
--- a/pkg/components/gtime/gtime_test.go
+++ b/pkg/components/gtime/gtime_test.go
@@ -20,9 +20,9 @@ func TestParseInterval(t *testing.T) {
{inp: "1d", duration: 24 * time.Hour},
{inp: "1w", duration: 168 * time.Hour},
{inp: "2w", duration: 2 * 168 * time.Hour},
- {inp: "1M", duration: time.Duration(daysInMonth * 24 * int(time.Hour))},
- {inp: "1y", duration: time.Duration(daysInYear * 24 * int(time.Hour))},
- {inp: "5y", duration: time.Duration(calculateDays5y() * 24 * int(time.Hour))},
+ {inp: "1M", duration: time.Duration(int64(daysInMonth) * 24 * int64(time.Hour))},
+ {inp: "1y", duration: time.Duration(int64(daysInYear) * 24 * int64(time.Hour))},
+ {inp: "5y", duration: time.Duration(int64(calculateDays5y()) * 24 * int64(time.Hour))},
{inp: "invalid-duration", err: regexp.MustCompile(`^time: invalid duration "?invalid-duration"?$`)},
}
for i, tc := range tcs {
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu-leilei/grafana.git
git@gitee.com:wu-leilei/grafana.git
wu-leilei
grafana
grafana
master

搜索帮助