Esempio n. 1
0
def test_workflows(cluster):
    primary_dsn = create_temporary_database('primary')
    replica_dsn = create_temporary_database('replica')

    replication_set = ReplicationSetConfiguration()
    replication_set.database.dsn = primary_dsn
    replication_set.tables.add(
        name='auth_user',
        primary_keys=['id'],
    )

    with cluster:
        create_set(cluster, 'example', replication_set)

        replication_set.database.dsn = replica_dsn
        replication_set.tables.add(name='accounts_userprofile',
                                   primary_keys=['id'],
                                   columns=['id', 'user_id', 'display_name'])
        update_set(cluster, 'example', replication_set)

        upgrade_cluster(cluster, force=True)

        del replication_set.tables[0]
        update_set(cluster, 'example', replication_set)

        drop_set(cluster, 'example')
Esempio n. 2
0
def test_workflows(cluster):
    primary_dsn = create_temporary_database('primary')
    replica_dsn = create_temporary_database('replica')

    replication_set = ReplicationSetConfiguration()
    replication_set.database.dsn = primary_dsn
    replication_set.tables.add(
        name='auth_user',
        primary_keys=['id'],
    )

    with cluster:
        create_set(cluster, 'example', replication_set)

        replication_set.database.dsn = replica_dsn
        replication_set.tables.add(
            name='accounts_userprofile',
            primary_keys=['id'],
            columns=['id', 'user_id', 'display_name']
        )
        update_set(cluster, 'example', replication_set)

        upgrade_cluster(cluster, force=True)

        del replication_set.tables[0]
        update_set(cluster, 'example', replication_set)

        drop_set(cluster, 'example')
Esempio n. 3
0
def upgrade(cluster, force):
    with cluster:
        administration.upgrade_cluster(cluster, force=force)
Esempio n. 4
0
def upgrade(cluster, force):
    with cluster:
        administration.upgrade_cluster(cluster, force=force)