Require completed annotation upgrade before accepting evidence
Metadata integrity checks / metadata (push) Failing after 1m5s
Metadata integrity checks / metadata (push) Failing after 1m5s
This commit is contained in:
@@ -78,7 +78,7 @@ def _url(value):
|
||||
|
||||
|
||||
def _require(conn):
|
||||
if not available(conn):
|
||||
if not available(conn) or not conn.execute('SELECT 1 FROM schema_migrations WHERE name=?', (MIGRATION,)).fetchone():
|
||||
raise RuntimeError('Run paper-atlas annotate init explicitly before adding annotations')
|
||||
|
||||
|
||||
|
||||
@@ -59,6 +59,13 @@ class AnnotationTests(unittest.TestCase):
|
||||
self.assertTrue(initialize(self.c)); self.assertFalse(initialize(self.c))
|
||||
self.assertEqual(len(schema.inspect(self.c)), 22)
|
||||
|
||||
def test_unmarked_table_cannot_receive_assertions(self):
|
||||
initialize(self.c)
|
||||
self.c.execute("DELETE FROM schema_migrations WHERE name='annotation_events_v1'")
|
||||
with self.assertRaisesRegex(RuntimeError, 'init explicitly'):
|
||||
self.add()
|
||||
self.assertEqual(self.c.execute('SELECT count(*) FROM annotation_events').fetchone()[0], 0)
|
||||
|
||||
def test_types_tags_and_platform_labels_are_independent_and_queryable(self):
|
||||
initialize(self.c)
|
||||
self.add()
|
||||
|
||||
Reference in New Issue
Block a user