mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-07 07:21:22 +01:00
change dao_test file
This commit is contained in:
parent
53edb50eef
commit
97b5d16e26
@ -725,6 +725,16 @@ func TestChangeUserProfile(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetRecentLogs(t *testing.T) {
|
||||
logs, err := GetRecentLogs(currentUser.UserID, 10, "2016-05-13 00:00:00", time.Now().String())
|
||||
if err != nil {
|
||||
t.Errorf("error occured in getting recent logs, error: %v", err)
|
||||
}
|
||||
if len(logs) <= 0 {
|
||||
t.Errorf("get logs error, expected: %d, actual: %d", 1, len(logs))
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeleteUser(t *testing.T) {
|
||||
err := DeleteUser(currentUser.UserID)
|
||||
if err != nil {
|
||||
@ -739,16 +749,6 @@ func TestDeleteUser(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetRecentLogs(t *testing.T) {
|
||||
logs, err := GetRecentLogs(10, "2016-05-13 00:00:00", time.Now().String())
|
||||
if err != nil {
|
||||
t.Errorf("error occured in getting recent logs, error: %v", err)
|
||||
}
|
||||
if len(logs) <= 0 {
|
||||
t.Errorf("get logs error, expected: %d, actual: %d", 1, len(logs))
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetOrmer(t *testing.T) {
|
||||
o := GetOrmer()
|
||||
if o == nil {
|
||||
|
@ -671,9 +671,9 @@ paths:
|
||||
description: Unexpected internal errors.
|
||||
/logs:
|
||||
get:
|
||||
summary: Get recent logs in the Harbor
|
||||
summary: Get recent logs relevant to the user in Harbor
|
||||
description: |
|
||||
This endpoint let user see the recent operation logs in the Harbor
|
||||
This endpoint let user see his recent operation logs in Harbor
|
||||
parameters:
|
||||
- name: lines
|
||||
in: query
|
||||
@ -685,13 +685,13 @@ paths:
|
||||
in: query
|
||||
type: string
|
||||
format: date
|
||||
required: true
|
||||
required: false
|
||||
description: The start time of the logs to be shown
|
||||
- name: end_time
|
||||
in: query
|
||||
type: string
|
||||
format: date
|
||||
required: true
|
||||
required: false
|
||||
description: The end time of the logs to be shown
|
||||
tags:
|
||||
- Products
|
||||
|
Loading…
Reference in New Issue
Block a user