diff --git a/cmd/clidoc/main.go b/cmd/clidoc/main.go index 6d0c57e8e0d0..a7cdbff8f3b9 100644 --- a/cmd/clidoc/main.go +++ b/cmd/clidoc/main.go @@ -269,7 +269,3 @@ func validateAllMessages(path string) error { return nil } - -type importerFunc func(path string) (*types.Package, error) - -func (f importerFunc) Import(path string) (*types.Package, error) { return f(path) } diff --git a/internal/driver.go b/internal/driver.go index 487096f7f8ae..d1b0b17598e8 100644 --- a/internal/driver.go +++ b/internal/driver.go @@ -80,7 +80,7 @@ func NewRegistryDefaultWithDSN(t *testing.T, dsn string) (*config.Config, *drive require.NoError(t, err) reg.Config(context.Background()).MustSet("dev", true) require.NoError(t, reg.Init(context.Background(), driver.SkipNetworkInit)) - require.NoError(t, reg.Persister().NetworkMigrateUp(context.Background())) + require.NoError(t, reg.Persister().MigrateUp(context.Background())) // always migrate up actual, err := reg.Persister().DetermineNetwork(context.Background()) require.NoError(t, err) diff --git a/persistence/reference.go b/persistence/reference.go index c5f168580aed..0fb89bde0d16 100644 --- a/persistence/reference.go +++ b/persistence/reference.go @@ -48,7 +48,6 @@ type Persister interface { MigrationStatus(c context.Context) (popx.MigrationStatuses, error) MigrateDown(c context.Context, steps int) error MigrateUp(c context.Context) error - NetworkMigrateUp(c context.Context) error Migrator() *popx.Migrator GetConnection(ctx context.Context) *pop.Connection Transaction(ctx context.Context, callback func(ctx context.Context, connection *pop.Connection) error) error diff --git a/persistence/sql/persister.go b/persistence/sql/persister.go index e06a768b653c..e54a0ae0e65c 100644 --- a/persistence/sql/persister.go +++ b/persistence/sql/persister.go @@ -5,6 +5,8 @@ import ( "embed" "fmt" + "github.com/ory/x/fsx" + "github.com/ory/kratos/corp" "github.com/gobuffalo/pop/v5" @@ -49,10 +51,11 @@ type ( ) func NewPersister(ctx context.Context, r persisterDependencies, c *pop.Connection) (*Persister, error) { - m, err := popx.NewMigrationBox(migrations, popx.NewMigrator(c, r.Logger(), r.Tracer(ctx), 0)) + m, err := popx.NewMigrationBox(fsx.Merge(migrations, networkx.Migrations), popx.NewMigrator(c, r.Logger(), r.Tracer(ctx), 0)) if err != nil { return nil, err } + m.DumpMigrations = false return &Persister{ c: c, mb: m, r: r, isSQLite: c.Dialect.Name() == "sqlite3", @@ -102,17 +105,7 @@ func (p *Persister) MigrateDown(ctx context.Context, steps int) error { return p.mb.Down(ctx, steps) } -func (p *Persister) NetworkMigrateUp(ctx context.Context) error { - // nolint - return p.p.MigrateUp(ctx) -} - func (p *Persister) MigrateUp(ctx context.Context) error { - // nolint - if err := p.p.MigrateUp(ctx); err != nil { - return err - } - return p.mb.Up(ctx) } diff --git a/selfservice/flow/settings/strategy_helper.go b/selfservice/flow/settings/strategy_helper.go index cdd76f9b2f0e..fa358e767218 100644 --- a/selfservice/flow/settings/strategy_helper.go +++ b/selfservice/flow/settings/strategy_helper.go @@ -1,7 +1,6 @@ package settings import ( - "fmt" "net/http" "runtime/debug" "time" @@ -70,7 +69,7 @@ func PrepareUpdate(d interface { } d.Logger(). WithField("package", pkgName). - WithField("stack_trace", fmt.Sprintf("%s", debug.Stack())). + WithField("stack_trace", string(debug.Stack())). WithField("expected_request_id", payload.GetFlowID()). WithField("actual_request_id", f.ID). Debug("Flow ID from continuity manager does not match Flow ID from request.") diff --git a/test/e2e/cypress/integration/profiles/email/login/success.spec.ts b/test/e2e/cypress/integration/profiles/email/login/success.spec.ts index bc8155636d1a..ce93d8bea8ae 100644 --- a/test/e2e/cypress/integration/profiles/email/login/success.spec.ts +++ b/test/e2e/cypress/integration/profiles/email/login/success.spec.ts @@ -82,17 +82,21 @@ describe('Basic email profile with succeeding login flows', () => { cy.proxy('express') cy.useConfigProfile('email') - cy.shortLoginLifespan() cy.browserReturnUrlOry() }) beforeEach(() => { cy.clearAllCookies() - cy.visit(express.login + '?return_to=https://www.ory.sh/') }) it('should redirect to return_to when retrying expired flow', () => { + cy.shortLoginLifespan() + cy.wait(500) + + cy.visit(express.login + '?return_to=https://www.ory.sh/') + cy.longLoginLifespan() + cy.get(appPrefix('express') + 'input[name="password_identifier"]').type( email.toUpperCase() ) diff --git a/test/e2e/cypress/support/commands.ts b/test/e2e/cypress/support/commands.ts index c3e9fcec2eef..bb1bf686bedc 100644 --- a/test/e2e/cypress/support/commands.ts +++ b/test/e2e/cypress/support/commands.ts @@ -30,11 +30,9 @@ const mergeFields = (form, fields) => { const updateConfigFile = (cb: (arg: any) => any) => { cy.readFile(configFile).then((contents) => { - let config = YAML.parse(contents) - config = cb(config) - cy.writeFile(configFile, YAML.stringify(config)) + cy.writeFile(configFile, YAML.stringify(cb(YAML.parse(contents)))) + cy.wait(200) }) - cy.wait(200) } Cypress.Commands.add('useConfigProfile', (profile: string) => { diff --git a/test/e2e/proxy/package-lock.json b/test/e2e/proxy/package-lock.json index 1a4852f395e8..d559e4ccca62 100644 --- a/test/e2e/proxy/package-lock.json +++ b/test/e2e/proxy/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "proxy", "version": "1.0.0", "dependencies": { "express": "^4.17.1", diff --git a/text/id_test.go b/text/id_test.go index a778a703de0e..21038cd6c8e7 100644 --- a/text/id_test.go +++ b/text/id_test.go @@ -23,7 +23,8 @@ func TestIDs(t *testing.T) { assert.Equal(t, 1060001, int(InfoSelfServiceRecoverySuccessful)) assert.Equal(t, 1060002, int(InfoSelfServiceRecoveryEmailSent)) - assert.Equal(t, 1070000, int(InfoSelfServiceVerification)) + assert.Equal(t, 1070000, int(InfoNodeLabel)) + assert.Equal(t, 1080000, int(InfoSelfServiceVerification)) assert.Equal(t, 4000000, int(ErrorValidation)) assert.Equal(t, 4000001, int(ErrorValidationGeneric))