mirror of
https://github.com/goharbor/harbor.git
synced 2025-03-02 10:41:59 +01:00
modify code as travis ci required
This commit is contained in:
parent
45136996eb
commit
27efcc133d
@ -43,7 +43,6 @@ func (l *LogAPI) Get() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Get parameters error--lines, err: %v", err)
|
log.Errorf("Get parameters error--lines, err: %v", err)
|
||||||
l.CustomAbort(http.StatusBadRequest, "bad request of lines")
|
l.CustomAbort(http.StatusBadRequest, "bad request of lines")
|
||||||
log.e
|
|
||||||
}
|
}
|
||||||
if lines <= 0 {
|
if lines <= 0 {
|
||||||
lines = 10
|
lines = 10
|
||||||
|
@ -17,6 +17,7 @@ package dao
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -726,6 +727,10 @@ func TestChangeUserProfile(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Error occurred in GetUser: %v", err)
|
t.Errorf("Error occurred in GetUser: %v", err)
|
||||||
}
|
}
|
||||||
|
log.Debugf("loginedUser: %v", loginedUser)
|
||||||
|
log.Debugf("loginedUser: %v", loginedUser.Email)
|
||||||
|
log.Debugf("loginedUser: %v", loginedUser.Realname)
|
||||||
|
log.Debugf("loginedUser: %v", loginedUser.Comment)
|
||||||
if loginedUser.Email != username+"@163.com" {
|
if loginedUser.Email != username+"@163.com" {
|
||||||
t.Errorf("user email does not update, expected: %s, acutal: %s", username+"@163.com", loginedUser.Email)
|
t.Errorf("user email does not update, expected: %s, acutal: %s", username+"@163.com", loginedUser.Email)
|
||||||
}
|
}
|
||||||
@ -736,6 +741,7 @@ func TestChangeUserProfile(t *testing.T) {
|
|||||||
t.Errorf("user email does not update, expected: %s, acutal: %s", "Unit Test", loginedUser.Comment)
|
t.Errorf("user email does not update, expected: %s, acutal: %s", "Unit Test", loginedUser.Comment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetRecentLogs(t *testing.T) {
|
func TestGetRecentLogs(t *testing.T) {
|
||||||
logs, err := GetRecentLogs(10, "2016-05-13 00:00:00", time.Now().String())
|
logs, err := GetRecentLogs(10, "2016-05-13 00:00:00", time.Now().String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user