grim/port-authority
Clone
Summary
Browse
Changes
Graph
Start of moving this to a go http client
draft
default
tip
2020-04-27, Gary Kramlich
dfcf60f69754
Start of moving this to a go http client
package
pa
import
(
"testing"
"github.com/stretchr/testify/assert"
)
func
TestAddRepository
(
t
*
testing
.
T
)
{
assert
:=
assert
.
New
(
t
)
c
:=
NewClient
()
assert
.
NotNil
(
c
)
c
.
AddRegistry
(
"host"
,
"user"
,
"pass"
)
username
,
password
:=
c
.
GetRegistry
(
"host"
)
assert
.
Equal
(
username
,
"user"
)
assert
.
Equal
(
password
,
"pass"
)
c
.
RemoveRegistry
(
"host"
)
username
,
password
=
c
.
GetRegistry
(
"host"
)
assert
.
Equal
(
username
,
""
)
assert
.
Equal
(
password
,
""
)
}