Test migrate_secgroup function