Merge pull request #723 from huanggze/pvc

add pvc utilisation metrics
This commit is contained in:
KubeSphere CI Bot
2019-09-11 16:48:06 +08:00
committed by GitHub
3 changed files with 29 additions and 21 deletions

View File

@@ -576,7 +576,7 @@ func parseCronJobTime(msg string) (string, string, error) {
lastUinx, err := time.Parse(cronJobLayout, lastTime[0])
if err != nil {
log.Error(err)
return "","",err
return "", "", err
}
last := lastUinx.Format(time.RFC3339)
@@ -585,7 +585,7 @@ func parseCronJobTime(msg string) (string, string, error) {
nextUinx, err := time.Parse(cronJobLayout, nextTime[0])
if err != nil {
log.Error(err)
return "","",err
return "", "", err
}
next := nextUinx.Format(time.RFC3339)

View File

@@ -18,7 +18,7 @@ func Test_parseCronJobTime(t *testing.T) {
{"上次运行的时间 Tuesday, September 10, 2019 9:15:26 AM UTC; 下次运行的时间 Tuesday, September 10, 2019 10:03:26 AM UTC.", Except{Last: "2019-09-10T09:15:26Z", Next: "2019-09-10T10:03:26Z"}},
}
for _, item:=range Items {
for _, item := range Items {
last, next, err := parseCronJobTime(item.Input)
if err != nil {
t.Fatalf("should not get error %+v", err)