Skip to content

Commit

Permalink
chore: update package locks
Browse files Browse the repository at this point in the history
  • Loading branch information
grantzvolsky authored and aeneasr committed Sep 7, 2022
1 parent 51a586b commit 686d59c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -17,7 +17,7 @@ define make-go-dependency
endef

.bin/golangci-lint: Makefile
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b .bin
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b .bin v1.45.2

$(foreach dep, $(GO_DEPENDENCIES), $(eval $(call make-go-dependency, $(dep))))

Expand Down
5 changes: 3 additions & 2 deletions consent/handler_test.go
Expand Up @@ -25,12 +25,13 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/ory/hydra/internal/httpclient/models"
"net/http"
"net/http/httptest"
"testing"
"time"

"github.com/ory/hydra/internal/httpclient/models"

"github.com/ory/hydra/consent"
"github.com/ory/hydra/x"
"github.com/ory/hydra/x/contextx"
Expand Down Expand Up @@ -235,7 +236,7 @@ func TestGetLoginRequestWithDuplicateAccept(t *testing.T) {
requestURL := "http://192.0.2.1"

conf := internal.NewConfigurationWithDefaults()
reg := internal.NewRegistryMemory(t, conf)
reg := internal.NewRegistryMemory(t, conf, &contextx.DefaultContextualizer{})

cl := &client.Client{OutfacingID: "client"}
require.NoError(t, reg.ClientManager().CreateClient(context.Background(), cl))
Expand Down
9 changes: 3 additions & 6 deletions consent/strategy_oauth_test.go
Expand Up @@ -678,7 +678,7 @@ func TestStrategyLoginConsentNext(t *testing.T) {

subject := "aeneas-rekkas"
c := createDefaultClient(t)
testhelpers.NewLoginConsentUI(t, reg.Config(),
testhelpers.NewLoginConsentUI(t, reg.Config(ctx),
acceptLoginHandler(t, subject, &models.AcceptLoginRequest{
Subject: &subject,
Context: map[string]interface{}{"fooz": "barz"},
Expand All @@ -705,7 +705,7 @@ func TestStrategyLoginConsentNext(t *testing.T) {
t.Run("case=should be able to retry accept login request", func(t *testing.T) {
subject := "aeneas-rekkas"
c := createDefaultClient(t)
testhelpers.NewLoginConsentUI(t, reg.Config(),
testhelpers.NewLoginConsentUI(t, reg.Config(ctx),
checkAndDuplicateAcceptLoginHandler(t, adminClient.Admin, subject, func(*testing.T, *admin.GetLoginRequestOK, error) *models.AcceptLoginRequest {
return &models.AcceptLoginRequest{
Subject: &subject,
Expand All @@ -731,10 +731,9 @@ func TestStrategyLoginConsentNext(t *testing.T) {
})

t.Run("case=should be able to retry both accept login and consent requests", func(t *testing.T) {

subject := "aeneas-rekkas"
c := createDefaultClient(t)
testhelpers.NewLoginConsentUI(t, reg.Config(),
testhelpers.NewLoginConsentUI(t, reg.Config(ctx),
checkAndDuplicateAcceptLoginHandler(t, adminClient.Admin, subject, func(*testing.T, *admin.GetLoginRequestOK, error) *models.AcceptLoginRequest {
return &models.AcceptLoginRequest{
Subject: &subject,
Expand All @@ -757,7 +756,5 @@ func TestStrategyLoginConsentNext(t *testing.T) {

hc := testhelpers.NewEmptyJarClient(t)
makeRequestAndExpectCode(t, hc, c, url.Values{"redirect_uri": {c.RedirectURIs[0]}})

})

}
1 change: 1 addition & 0 deletions flow/flow_test.go
Expand Up @@ -133,6 +133,7 @@ func TestFlow_HandleLoginRequest(t *testing.T) {
r.ID = f.ID
r.Subject = f.Subject
r.ForceSubjectIdentifier = f.ForceSubjectIdentifier
f.LoginWasUsed = false

assert.NoError(t, f.HandleLoginRequest(&r))

Expand Down
2 changes: 1 addition & 1 deletion x/contextx/root_context.go
Expand Up @@ -2,4 +2,4 @@ package contextx

import "context"

var RootContext = context.WithValue(context.Background(), "root", true)
var RootContext = context.WithValue(context.Background(), "root", true) //nolint:staticcheck
2 changes: 1 addition & 1 deletion x/contextx/test_context.go
Expand Up @@ -16,7 +16,7 @@ const fakeNIDContext = "fake nid context"

// SetNIDContext sets the nid context for the given context.
func SetNIDContext(ctx context.Context, nid uuid.UUID) context.Context {
return context.WithValue(ctx, fakeNIDContext, nid)
return context.WithValue(ctx, fakeNIDContext, nid) //nolint:staticcheck
}

func (d *TestContextualizer) Network(ctx context.Context, network uuid.UUID) uuid.UUID {
Expand Down

0 comments on commit 686d59c

Please sign in to comment.