modify code as travis ci required

This commit is contained in:
wemeya 2016-05-20 17:12:23 +08:00
parent 888604fb0d
commit a6fd1a5050
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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)