mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
modify code as travis ci required
This commit is contained in:
parent
888604fb0d
commit
a6fd1a5050
@ -12,6 +12,7 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
@ -22,7 +23,7 @@ import (
|
||||
"github.com/vmware/harbor/utils/log"
|
||||
)
|
||||
|
||||
//LogAPi handles request api/logs
|
||||
//LogAPI handles request api/logs
|
||||
type LogAPI struct {
|
||||
BaseAPI
|
||||
userID int
|
||||
|
@ -717,7 +717,7 @@ func TestDeleteUser(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestChangeUserProfile(t *testing.T) {
|
||||
user := models.User{UserID: currentUser.UserID, Email: currentUser.Username + "@vmware.com", Realname: "test", Comment: "Unit Test"}
|
||||
user := models.User{UserID: currentUser.UserID, Email: currentUser.Username + "@163.com", Realname: "test", Comment: "Unit Test"}
|
||||
err := ChangeUserProfile(user)
|
||||
if err != nil {
|
||||
t.Errorf("Error occurred in ChangeUserProfile: %v", err)
|
||||
@ -726,8 +726,8 @@ func TestChangeUserProfile(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("Error occurred in GetUser: %v", err)
|
||||
}
|
||||
if loginedUser.Email != username+"@vmware.com" {
|
||||
t.Errorf("user email does not update, expected: %s, acutal: %s", username+"@vmware.com", loginedUser.Email)
|
||||
if loginedUser.Email != username+"@163.com" {
|
||||
t.Errorf("user email does not update, expected: %s, acutal: %s", username+"@163.com", loginedUser.Email)
|
||||
}
|
||||
if loginedUser.Realname != "test" {
|
||||
t.Errorf("user realname does not update, expected: %s, acutal: %s", "test", loginedUser.Email)
|
||||
|
Loading…
Reference in New Issue
Block a user