@@ -31,7 +31,7 @@ func Test_GetEndpoints(t *testing.T) {
3131
3232func Test_AddEndpoint (t * testing.T ) {
3333 t .Run ("Add new endpoint" , func (t * testing.T ) {
34- err := AddRegistryEndpoint ("example.com" , "Example" , "https://example.com" , "" , "" , false )
34+ err := AddRegistryEndpoint ("example.com" , "Example" , "https://example.com" , "" , "" , false , SortUnsorted )
3535 require .NoError (t , err )
3636 })
3737 t .Run ("Get example.com endpoint" , func (t * testing.T ) {
@@ -43,15 +43,17 @@ func Test_AddEndpoint(t *testing.T) {
4343 assert .Equal (t , ep .RegistryAPI , "https://example.com" )
4444 assert .Equal (t , ep .Insecure , false )
4545 assert .Equal (t , ep .DefaultNS , "" )
46+ assert .Equal (t , ep .TagListSort , SortUnsorted )
4647 })
4748 t .Run ("Change existing endpoint" , func (t * testing.T ) {
48- err := AddRegistryEndpoint ("example.com" , "Example" , "https://example.com" , "" , "library" , true )
49+ err := AddRegistryEndpoint ("example.com" , "Example" , "https://example.com" , "" , "library" , true , SortLatestFirst )
4950 require .NoError (t , err )
5051 ep , err := GetRegistryEndpoint ("example.com" )
5152 require .NoError (t , err )
5253 require .NotNil (t , ep )
5354 assert .Equal (t , ep .Insecure , true )
5455 assert .Equal (t , ep .DefaultNS , "library" )
56+ assert .Equal (t , ep .TagListSort , SortLatestFirst )
5557 })
5658}
5759
0 commit comments