zero: only leave public packages in pkg/zero

This commit is contained in:
Denis Mishin 2023-12-12 13:56:08 -05:00
parent a6ae9d3f2d
commit 8219823622
24 changed files with 22 additions and 22 deletions

View file

@ -1,40 +0,0 @@
package apierror_test
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"github.com/pomerium/pomerium/pkg/zero/apierror"
"github.com/pomerium/pomerium/pkg/zero/cluster"
)
func TestResponse(t *testing.T) {
t.Parallel()
for _, tc := range []struct {
name string
err error
response apierror.APIResponse[cluster.ExchangeTokenResponse]
wantVal *cluster.ExchangeTokenResponse
wantErr error
}{
{
name: "success",
response: &cluster.ExchangeClusterIdentityTokenResp{
HTTPResponse: &http.Response{},
JSON200: &cluster.ExchangeTokenResponse{},
},
err: nil,
wantVal: &cluster.ExchangeTokenResponse{},
wantErr: nil,
},
} {
t.Run(tc.name, func(t *testing.T) {
gotVal, gotErr := apierror.CheckResponse(tc.response, tc.err)
assert.Equal(t, tc.wantVal, gotVal)
assert.Equal(t, tc.wantErr, gotErr)
})
}
}