Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f072127

Browse files
committedNov 26, 2020
fixup! Remove unused checkAppUpgrade method
1 parent 8875468 commit f072127

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed
 

‎tests/lib/DB/MigratorTest.php

+1-23
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,6 @@ private function isSQLite() {
104104
return $this->connection->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver;
105105
}
106106

107-
108-
public function testDuplicateKeyUpgrade() {
109-
$this->expectException(\OC\DB\MigrationException::class);
110-
111-
if ($this->isSQLite()) {
112-
$this->markTestSkipped('sqlite does not throw errors when creating a new key on existing data');
113-
}
114-
list($startSchema, $endSchema) = $this->getDuplicateKeySchemas();
115-
$migrator = $this->manager->getMigrator();
116-
$migrator->migrate($startSchema);
117-
118-
$this->connection->insert($this->tableName, ['id' => 1, 'name' => 'foo']);
119-
$this->connection->insert($this->tableName, ['id' => 2, 'name' => 'bar']);
120-
$this->connection->insert($this->tableName, ['id' => 2, 'name' => 'qwerty']);
121-
122-
$migrator->checkMigrate($endSchema);
123-
$this->fail('checkMigrate should have failed');
124-
}
125-
126107
public function testUpgrade() {
127108
list($startSchema, $endSchema) = $this->getDuplicateKeySchemas();
128109
$migrator = $this->manager->getMigrator();
@@ -132,7 +113,6 @@ public function testUpgrade() {
132113
$this->connection->insert($this->tableName, ['id' => 2, 'name' => 'bar']);
133114
$this->connection->insert($this->tableName, ['id' => 3, 'name' => 'qwerty']);
134115

135-
$migrator->checkMigrate($endSchema);
136116
$migrator->migrate($endSchema);
137117
$this->addToAssertionCount(1);
138118
}
@@ -151,7 +131,6 @@ public function testUpgradeDifferentPrefix() {
151131
$this->connection->insert($this->tableName, ['id' => 2, 'name' => 'bar']);
152132
$this->connection->insert($this->tableName, ['id' => 3, 'name' => 'qwerty']);
153133

154-
$migrator->checkMigrate($endSchema);
155134
$migrator->migrate($endSchema);
156135
$this->addToAssertionCount(1);
157136

@@ -190,7 +169,6 @@ public function testAddingPrimaryKeyWithAutoIncrement() {
190169
$migrator = $this->manager->getMigrator();
191170
$migrator->migrate($startSchema);
192171

193-
$migrator->checkMigrate($endSchema);
194172
$migrator->migrate($endSchema);
195173

196174
$this->addToAssertionCount(1);
@@ -212,7 +190,7 @@ public function testReservedKeywords() {
212190
$migrator = $this->manager->getMigrator();
213191
$migrator->migrate($startSchema);
214192

215-
$migrator->checkMigrate($endSchema);
193+
216194
$migrator->migrate($endSchema);
217195

218196
$this->addToAssertionCount(1);

0 commit comments

Comments
 (0)
Please sign in to comment.