Skip to content

Commit

Permalink
fix: resolve potential fsnotify leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Feb 10, 2021
1 parent 0a72f96 commit 3159c0a
Show file tree
Hide file tree
Showing 134 changed files with 1,171 additions and 3,400 deletions.
102 changes: 52 additions & 50 deletions .schema/api.swagger.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cmd/identities/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (_ *outputIdentity) Header() []string {

func (i *outputIdentity) Columns() []string {
data := [5]string{
string(*i.ID),
string(i.ID),
cmdx.None,
cmdx.None,
cmdx.None,
Expand Down Expand Up @@ -67,7 +67,7 @@ func (c *outputIdentityCollection) Table() [][]string {
rows := make([][]string, len(c.identities))
for i, ident := range c.identities {
data := [5]string{
string(*ident.ID),
string(ident.ID),
cmdx.None,
cmdx.None,
cmdx.None,
Expand Down
2 changes: 1 addition & 1 deletion cmd/identities/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var GetCmd = &cobra.Command{

if len(identities) == 1 {
cmdx.PrintRow(cmd, (*outputIdentity)(identities[0]))
} else {
} else if len(identities) > 1 {
cmdx.PrintTable(cmd, &outputIdentityCollection{identities})
}
cmdx.PrintErrors(cmd, failed)
Expand Down
2 changes: 1 addition & 1 deletion cmd/identities/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ func TestGetCmd(t *testing.T) {
t.Run("case=fails with unknown ID", func(t *testing.T) {
stdErr := execErr(t, GetCmd, x.NewUUID().String())

assert.Contains(t, stdErr, "status 404", stdErr)
assert.Contains(t, stdErr, "getIdentityNotFound", stdErr)
})
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ require (
github.com/ory/kratos/corp v0.0.0-00010101000000-000000000000
github.com/ory/mail/v3 v3.0.0
github.com/ory/nosurf v1.2.4
github.com/ory/x v0.0.179
github.com/ory/x v0.0.181
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.4.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,8 @@ github.com/ory/x v0.0.127/go.mod h1:FwUujfFuCj5d+xgLn4fGMYPnzriR5bdAIulFXMtnK0M=
github.com/ory/x v0.0.166/go.mod h1:gT/3K0mSFaPllJgoFrvKYIBYI5W1Nz5RxQTJCGrIwDY=
github.com/ory/x v0.0.179 h1:ewzGC1n2uWEmGRDVzYYzHsbdHrxNtkCwGjbkpZeeNKI=
github.com/ory/x v0.0.179/go.mod h1:SGETCUk1DgQC30bb7y4hjhkKGQ1x0YOsldrmGmy6MNc=
github.com/ory/x v0.0.181 h1:IWvv41/uAOO0gmZm4QL6NJEWTOH1GnVyaE9s8OPQPO8=
github.com/ory/x v0.0.181/go.mod h1:SGETCUk1DgQC30bb7y4hjhkKGQ1x0YOsldrmGmy6MNc=
github.com/parnurzeal/gorequest v0.2.15/go.mod h1:3Kh2QUMJoqw3icWAecsyzkpY7UzRfDhbRdTjtNwNiUE=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
Expand Down
1 change: 1 addition & 0 deletions identity/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ type getIdentityParameters struct {
// Responses:
// 200: identityResponse
// 400: genericError
// 404: genericError
// 500: genericError
func (h *Handler) get(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
i, err := h.r.IdentityPool().GetIdentity(r.Context(), x.ParseUUID(ps.ByName("id")))
Expand Down
2 changes: 1 addition & 1 deletion identity/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestPool(ctx context.Context, conf *config.Config, p interface {

count, err := p.CountIdentities(ctx)
require.NoError(t, err)
assert.EqualValues(t, 1, count)
assert.EqualValues(t, int64(1), count)
})

t.Run("case=create with default values", func(t *testing.T) {
Expand Down
45 changes: 16 additions & 29 deletions internal/httpclient/client/admin/create_identity_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions internal/httpclient/client/admin/create_identity_responses.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 16 additions & 29 deletions internal/httpclient/client/admin/create_recovery_link_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3159c0a

Please sign in to comment.