diff --git a/core/modules/openid/lib/Drupal/openid/Tests/Upgrade/OpenIDAuthmapUpgradePathTest.php b/core/modules/openid/lib/Drupal/openid/Tests/Upgrade/OpenIDAuthmapUpgradePathTest.php
new file mode 100644
index 0000000..b69423e
--- /dev/null
+++ b/core/modules/openid/lib/Drupal/openid/Tests/Upgrade/OpenIDAuthmapUpgradePathTest.php
@@ -0,0 +1,71 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\openid\Tests\Upgrade\OpenIDUpgradePathTest.
+ */
+
+namespace Drupal\openid\Tests\Upgrade;
+
+use Drupal\system\Tests\Upgrade\UpgradePathTestBase;
+
+/**
+ * Performs major version release upgrade tests on a populated database.
+ *
+ * Loads an installation of Drupal 7.x and runs the upgrade process on it.
+ *
+ * The install contains the minimal profile (plus openid module) modules
+ * with generated users in authmap so that the upgrade path can be tested.
+ */
+class OpenIDAuthmapUpgradePathTest extends UpgradePathTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name'  => 'OpenID upgrade path',
+      'description'  => 'Identities migration from the authmap upgrade tests.',
+      'group' => 'OpenID',
+    );
+  }
+
+  public function setUp() {
+    // Path to the database dump files.
+    $this->databaseDumpFiles = array(
+      drupal_get_path('module', 'system') . '/tests/upgrade/drupal-7.bare.minimal.database.php.gz',
+      drupal_get_path('module', 'openid') . '/tests/upgrade/drupal-7.openid.database.php',
+      drupal_get_path('module', 'openid') . '/tests/upgrade/drupal-7.openid.authmap.database.php',
+    );
+    parent::setUp();
+  }
+
+  /**
+   * Tests expected openid identities conversion after a successful upgrade.
+   */
+  public function testIdentitiesUpgrade() {
+    $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
+
+    // Verify that user identities was properly upgraded.
+    $expected_identities = array(
+      (object) array(
+        'aid' => 1,
+        'uid' => 1,
+        'identifier' => 'userA@providerA',
+      ),
+      (object) array(
+        'aid' => 2,
+        'uid' => 1,
+        'identifier' => 'userB@providerA',
+      ));
+
+    $db_identities = db_select('openid_identities', 'oi')
+      ->fields('oi')
+      ->execute()
+      ->fetchAllAssoc('aid');
+
+    foreach ($expected_identities as $aid => $expected_identity) {
+      $this->assertEqual($expected_identity, $db_identities[$aid], format_string('@first is equal to @second.', array(
+        '@first' => var_export($expected_identity, TRUE),
+        '@second' => var_export($db_identities[$aid], TRUE),
+      )));
+    }
+  }
+}
diff --git a/core/modules/openid/tests/upgrade/drupal-7.openid.authmap.database.php b/core/modules/openid/tests/upgrade/drupal-7.openid.authmap.database.php
new file mode 100644
index 0000000..a571a72
--- /dev/null
+++ b/core/modules/openid/tests/upgrade/drupal-7.openid.authmap.database.php
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * @file
+ * Database additions for authmap tests. Used in
+ * \Drupal\openid\Tests\Upgrade\OpenIDAuthmapUpgradePathTest.
+ *
+ * This dump only contains data and schema components relevant for user authmap
+ * upgrade tests.
+ */
+
+db_create_table('openid_identities', array(
+  'fields' => array(
+    'aid' => array(
+      'type' => 'serial',
+      'unsigned' => TRUE,
+      'not null' => TRUE,
+    ),
+    'uid' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+    'identifier' => array(
+      'type' => 'varchar',
+      'length' => 128,
+      'not null' => TRUE,
+      'default' => '',
+    ),
+  ),
+  'unique keys' => array(
+    'identifier' => array(
+      'identifier',
+    ),
+  ),
+  'primary key' => array(
+    'aid',
+  ),
+  'foreign keys' => array(
+    'user' => array(
+      'table' => 'users',
+      'columns' => array(
+        'uid' => 'uid',
+      ),
+    ),
+  ),
+  'module' => 'openid',
+  'name' => 'openid_identities',
+));
+
+db_insert('authmap')->fields(array(
+    'aid',
+    'uid',
+    'authname',
+    'module',
+  ))
+  ->values(array(
+    'aid' => 1,
+    'uid' => 1,
+    'authname' => 'userA@providerA',
+    'module' => 'openid',
+  ))
+  ->values(array(
+    'aid' => 2,
+    'uid' => 1,
+    'authname' => 'userB@providerA',
+    'module' => 'openid',
+  ))
+  ->values(array(
+    'aid' => 3,
+    'uid' => 1,
+    'authname' => 'userA@providerB',
+    'module' => 'fancy',
+  ))
+  ->execute();
diff --git a/core/modules/openid/tests/upgrade/drupal-7.openid.database.php b/core/modules/openid/tests/upgrade/drupal-7.openid.database.php
new file mode 100644
index 0000000..f4bf992
--- /dev/null
+++ b/core/modules/openid/tests/upgrade/drupal-7.openid.database.php
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * @file
+ * Database additions for openid tests.
+ *
+ * This dump enable the openid module, the drupal-7.bare.minimal.database.php.gz
+ * file is imported before this dump, so the two form the database structure
+ * expected in tests altogether.
+ */
+
+db_create_table('openid_association', array(
+  'fields' => array(
+    'idp_endpoint_uri' => array(
+      'type' => 'varchar',
+      'length' => 255,
+    ),
+    'assoc_handle' => array(
+      'type' => 'varchar',
+      'length' => 255,
+      'not null' => TRUE,
+    ),
+    'assoc_type' => array(
+      'type' => 'varchar',
+      'length' => 32,
+    ),
+    'session_type' => array(
+      'type' => 'varchar',
+      'length' => 32,
+    ),
+    'mac_key' => array(
+      'type' => 'varchar',
+      'length' => 255,
+    ),
+    'created' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+    'expires_in' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+  ),
+  'primary key' => array(
+    'assoc_handle',
+  ),
+  'module' => 'openid',
+  'name' => 'openid_association',
+));
+
+db_create_table('openid_nonce', array(
+  'fields' => array(
+    'idp_endpoint_uri' => array(
+      'type' => 'varchar',
+      'length' => 255,
+    ),
+    'nonce' => array(
+      'type' => 'varchar',
+      'length' => 255,
+    ),
+    'expires' => array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+    ),
+  ),
+  'indexes' => array(
+    'nonce' => array(
+      'nonce',
+    ),
+    'expires' => array(
+      'expires',
+    ),
+  ),
+  'module' => 'openid',
+  'name' => 'openid_nonce',
+));
+
+db_update('system')
+  ->fields(array(
+    'filename' => 'modules/openid/openid.module',
+    'name' => 'openid',
+    'type' => 'module',
+    'owner' => '',
+    'status' => '1',
+    'bootstrap' => '0',
+    'schema_version' => '6000',
+    'weight' => '0',
+    'info' => 'a:11:{s:4:"name";s:6:"OpenID";s:11:"description";s:48:"Allows users to log into your site using OpenID.";s:7:"version";s:11:"7.14+29-dev";s:7:"package";s:4:"Core";s:4:"core";s:3:"7.x";s:5:"files";a:1:{i:0;s:11:"openid.test";}s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1338768537";s:12:"dependencies";a:0:{}s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}',
+  ))
+  ->condition('filename', 'modules/openid/openid.module')
+  ->execute();
diff --git a/core/modules/user/user.install b/core/modules/user/user.install
index 9e09534..740e7dc 100644
--- a/core/modules/user/user.install
+++ b/core/modules/user/user.install
@@ -148,49 +148,6 @@
     ),
   );
 
-  $schema['authmap'] = array(
-    'description' => 'Stores distributed authentication mapping. The authmap is deprecated since Drupal 8 and is kept only in a migration data process in mind. Modules that uses the authmap should move their data in custom tables as it will removed in Drupal 9.',
-    'fields' => array(
-      'aid' => array(
-        'description' => 'Primary Key: Unique authmap ID.',
-        'type' => 'serial',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-      ),
-      'uid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-        'default' => 0,
-        'description' => "User's {users}.uid.",
-      ),
-      'authname' => array(
-        'type' => 'varchar',
-        'length' => 128,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Unique authentication name.',
-      ),
-      'module' => array(
-        'type' => 'varchar',
-        'length' => 128,
-        'not null' => TRUE,
-        'default' => '',
-        'description' => 'Module which is controlling the authentication.',
-      ),
-    ),
-    'unique keys' => array(
-      'authname' => array('authname'),
-    ),
-    'primary key' => array('aid'),
-    'foreign keys' => array(
-      'user' => array(
-        'table' => 'users',
-        'columns' => array('uid' => 'uid'),
-      ),
-    ),
-  );
-
   $schema['role'] = array(
     'description' => 'Stores user roles.',
     'fields' => array(
