Skip to content

Commit

Permalink
disable did:web migration (#3448)
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardsn authored Oct 4, 2024
1 parent c39b68c commit 1e3e2c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion e2e-tests/migration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func Test_Migrations(t *testing.T) {

DIDs, err := man.DID.All()
require.NoError(t, err)
require.Len(t, DIDs, 7) // 4 did:nuts, 3 did:web
require.Len(t, DIDs, 4) // 4 did:nuts, 3 did:web

t.Run("vendor", func(t *testing.T) {
// versions for did:nuts:
Expand Down Expand Up @@ -138,6 +138,7 @@ func Test_Migrations(t *testing.T) {
}

func EqualServices(t *testing.T, man *manager, nutsDoc *orm.DidDocument) {
return // disable until there is a fix for https://github.com/nuts-foundation/nuts-node/issues/3444
didWebPrefix := "did:web:nodeA%3A8080"

dids, err := man.DID.FindBySubject(nutsDoc.DID.Subject) // migrated documents have subject == did:nuts:...
Expand Down
3 changes: 2 additions & 1 deletion vdr/vdr.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ func (r *Module) allMigrations() []migration {
return []migration{ // key will be printed as description of the migration
{r.migrateRemoveControllerFromDIDNuts, "remove controller"}, // must come before migrateHistoryOwnedDIDNuts so controller removal is also migrated.
{r.migrateHistoryOwnedDIDNuts, "document history"},
{r.migrateAddDIDWebToOwnedDIDNuts, "add did:web to subject"}, // must come after migrateHistoryOwnedDIDNuts since it acts on the SQL store.
// Disable migration until we have a fix for: https://github.com/nuts-foundation/nuts-node/issues/3444
//{r.migrateAddDIDWebToOwnedDIDNuts, "add did:web to subject"}, // must come after migrateHistoryOwnedDIDNuts since it acts on the SQL store.
}
}

Expand Down
2 changes: 1 addition & 1 deletion vdr/vdr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func TestVDR_Migrate(t *testing.T) {
ctx.mockDocumentOwner.EXPECT().ListOwned(gomock.Any()).Return([]did.DID{testDIDWeb}, nil)
err := ctx.vdr.Migrate()
assert.NoError(t, err)
assert.Len(t, ctx.vdr.migrations, 3) // confirm its running allMigrations() that currently is only did:nuts
assert.Len(t, ctx.vdr.migrations, 2) // confirm its running allMigrations() that currently is only did:nuts
})
t.Run("controller migration", func(t *testing.T) {
controllerMigrationSetup := func(t *testing.T) vdrTestCtx {
Expand Down

0 comments on commit 1e3e2c1

Please sign in to comment.