Fix linting error
This commit is contained in:
parent
5f97014bdc
commit
7f02d6acec
@ -64,7 +64,7 @@ func (p Profile) check_and_update_version() error {
|
|||||||
|
|
||||||
if ENGINE_DATABASE_VERSION > version {
|
if ENGINE_DATABASE_VERSION > version {
|
||||||
fmt.Printf("Upgrading database from version %d to version %d", version, ENGINE_DATABASE_VERSION)
|
fmt.Printf("Upgrading database from version %d to version %d", version, ENGINE_DATABASE_VERSION)
|
||||||
p.UpgradeFromXToY(version, ENGINE_DATABASE_VERSION)
|
return p.UpgradeFromXToY(version, ENGINE_DATABASE_VERSION)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -25,7 +25,10 @@ func TestVersionUpgrade(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
persistence.MIGRATIONS = append(persistence.MIGRATIONS, test_migration)
|
persistence.MIGRATIONS = append(persistence.MIGRATIONS, test_migration)
|
||||||
profile.UpgradeFromXToY(persistence.ENGINE_DATABASE_VERSION, persistence.ENGINE_DATABASE_VERSION + 1)
|
err := profile.UpgradeFromXToY(persistence.ENGINE_DATABASE_VERSION, persistence.ENGINE_DATABASE_VERSION + 1)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
if !profile.IsTweetInDatabase(test_tweet_id) {
|
if !profile.IsTweetInDatabase(test_tweet_id) {
|
||||||
t.Errorf("Migration should have created the tweet, but it didn't")
|
t.Errorf("Migration should have created the tweet, but it didn't")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user