mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-29 22:07:32 +02:00
add ut
This commit is contained in:
parent
3a5bff1615
commit
2f2bc7f3ef
@ -17,6 +17,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/vmware/harbor/src/common"
|
||||
"github.com/vmware/harbor/src/common/models"
|
||||
)
|
||||
@ -80,3 +81,10 @@ func TestDefaultOnBoardUser(t *testing.T) {
|
||||
t.Fatal("Default implementation should return nil")
|
||||
}
|
||||
}
|
||||
|
||||
func TestErrAuth(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
e := NewErrAuth("test")
|
||||
expectedStr := "Failed to authenticate user, due to error 'test'"
|
||||
assert.Equal(expectedStr, e.Error())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user