@@ -122,9 +122,6 @@ func TestMigrateConfig_SuccessWithServers(t *testing.T) {
122122 // Verify secrets
123123 assert .Len (t , workingSets [0 ].Secrets , 1 )
124124 assert .Equal (t , "docker-desktop-store" , workingSets [0 ].Secrets ["default" ].Provider )
125-
126- // Verify legacy files were backed up
127- assertLegacyFilesBackedUp (t , mcpDir )
128125}
129126
130127func TestMigrateConfig_SuccessWithSingleServer (t * testing.T ) {
@@ -184,9 +181,6 @@ func TestMigrateConfig_SkipsWithNoServers(t *testing.T) {
184181 workingSets , err := dao .ListWorkingSets (ctx )
185182 require .NoError (t , err )
186183 assert .Empty (t , workingSets )
187-
188- // Verify legacy files were still backed up
189- assertLegacyFilesBackedUp (t , mcpDir )
190184}
191185
192186func TestMigrateConfig_FailureReadingLegacyFiles (t * testing.T ) {
@@ -485,18 +479,6 @@ func TestMigrateConfig_LegacyFilesBackedUpOnSuccess(t *testing.T) {
485479 status , err := dao .GetMigrationStatus (ctx )
486480 require .NoError (t , err )
487481 assert .Equal (t , MigrationStatusSuccess , status .Status )
488-
489- // Verify all legacy files were backed up
490- assertLegacyFilesBackedUp (t , mcpDir )
491-
492- // Verify catalog.json was also backed up
493- backupCatalogIndexPath := filepath .Join (mcpDir , ".backup" , "catalog.json" )
494- _ , err = os .Stat (backupCatalogIndexPath )
495- assert .False (t , os .IsNotExist (err ), "catalog.json should be backed up" )
496-
497- // Verify original catalog.json no longer exists
498- _ , err = os .Stat (catalogIndexPath )
499- assert .True (t , os .IsNotExist (err ), "original catalog.json should be removed" )
500482}
501483
502484// Helper functions
@@ -546,50 +528,6 @@ func writeCatalogFile(t *testing.T, mcpDir string, serverNames []string) {
546528 require .NoError (t , err )
547529}
548530
549- func assertLegacyFilesBackedUp (t * testing.T , mcpDir string ) {
550- t .Helper ()
551-
552- backupDir := filepath .Join (mcpDir , ".backup" )
553-
554- // Verify backup directory exists
555- _ , err := os .Stat (backupDir )
556- assert .False (t , os .IsNotExist (err ), "backup directory should exist" )
557-
558- // Verify original files no longer exist in original location
559- registryPath := filepath .Join (mcpDir , "registry.yaml" )
560- _ , err = os .Stat (registryPath )
561- assert .True (t , os .IsNotExist (err ), "original registry.yaml should be removed" )
562-
563- configPath := filepath .Join (mcpDir , "config.yaml" )
564- _ , err = os .Stat (configPath )
565- assert .True (t , os .IsNotExist (err ), "original config.yaml should be removed" )
566-
567- toolsPath := filepath .Join (mcpDir , "tools.yaml" )
568- _ , err = os .Stat (toolsPath )
569- assert .True (t , os .IsNotExist (err ), "original tools.yaml should be removed" )
570-
571- catalogPath := filepath .Join (mcpDir , "catalogs" , legacycatalog .DockerCatalogFilename )
572- _ , err = os .Stat (catalogPath )
573- assert .True (t , os .IsNotExist (err ), "original catalog file should be removed" )
574-
575- // Verify files exist in backup directory
576- backupRegistryPath := filepath .Join (backupDir , "registry.yaml" )
577- _ , err = os .Stat (backupRegistryPath )
578- assert .False (t , os .IsNotExist (err ), "registry.yaml should be backed up" )
579-
580- backupConfigPath := filepath .Join (backupDir , "config.yaml" )
581- _ , err = os .Stat (backupConfigPath )
582- assert .False (t , os .IsNotExist (err ), "config.yaml should be backed up" )
583-
584- backupToolsPath := filepath .Join (backupDir , "tools.yaml" )
585- _ , err = os .Stat (backupToolsPath )
586- assert .False (t , os .IsNotExist (err ), "tools.yaml should be backed up" )
587-
588- backupCatalogPath := filepath .Join (backupDir , legacycatalog .DockerCatalogFilename )
589- _ , err = os .Stat (backupCatalogPath )
590- assert .False (t , os .IsNotExist (err ), "catalog file should be backed up" )
591- }
592-
593531// mockDockerClient is a simple mock implementation of docker.Client for testing
594532type mockDockerClient struct {
595533 inspectVolumeFunc func (ctx context.Context , name string ) (volume.Volume , error )
0 commit comments