From 1e3e2c1f336ae5464dbe51b095850ab2b8e3b3b2 Mon Sep 17 00:00:00 2001 From: Gerard Snaauw <33763579+gerardsn@users.noreply.github.com> Date: Fri, 4 Oct 2024 10:37:43 +0200 Subject: [PATCH] disable did:web migration (#3448) --- e2e-tests/migration/main_test.go | 3 ++- vdr/vdr.go | 3 ++- vdr/vdr_test.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e-tests/migration/main_test.go b/e2e-tests/migration/main_test.go index e877e8be9..7532897ec 100644 --- a/e2e-tests/migration/main_test.go +++ b/e2e-tests/migration/main_test.go @@ -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: @@ -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:... diff --git a/vdr/vdr.go b/vdr/vdr.go index 570b8c474..22bea69d8 100644 --- a/vdr/vdr.go +++ b/vdr/vdr.go @@ -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. } } diff --git a/vdr/vdr_test.go b/vdr/vdr_test.go index 1c57bdc8f..2eebeb9b5 100644 --- a/vdr/vdr_test.go +++ b/vdr/vdr_test.go @@ -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 {