use of org.graylog.plugins.views.migrations.V20200204122000_MigrateUntypedViewsToDashboards.V20200204122000_MigrateUntypedViewsToDashboards.MigrationCompleted in project graylog2-server by Graylog2.
the class V20200204122000_MigrateUntypedViewsToDashboardsTest method doesNotChangeTypedViews.
@Test
@MongoDBFixtures("V20200204122000_MigrateUntypedViewsToDashboardsTest/typed_views.json")
public void doesNotChangeTypedViews() throws Exception {
this.migration.upgrade();
final MigrationCompleted migrationCompleted = captureMigrationCompleted();
assertThat(migrationCompleted.viewIds()).isEmpty();
verify(this.viewsCollection, times(1)).find(any(Bson.class));
verify(this.viewsCollection, never()).updateOne(any(BasicDBObject.class), any(Document.class));
verify(this.searchesCollection, never()).updateOne(any(BasicDBObject.class), any(Document.class));
}
use of org.graylog.plugins.views.migrations.V20200204122000_MigrateUntypedViewsToDashboards.V20200204122000_MigrateUntypedViewsToDashboards.MigrationCompleted in project graylog2-server by Graylog2.
the class V20200204122000_MigrateUntypedViewsToDashboardsTest method assertViewsMigrated.
private void assertViewsMigrated(String... viewId) {
final MigrationCompleted migrationCompleted = captureMigrationCompleted();
assertThat(migrationCompleted.viewIds()).containsExactlyInAnyOrder(viewId);
}
use of org.graylog.plugins.views.migrations.V20200204122000_MigrateUntypedViewsToDashboards.V20200204122000_MigrateUntypedViewsToDashboards.MigrationCompleted in project graylog2-server by Graylog2.
the class V20200204122000_MigrateUntypedViewsToDashboardsTest method writesMigrationCompletedAfterSuccess.
@Test
public void writesMigrationCompletedAfterSuccess() {
this.migration.upgrade();
final MigrationCompleted migrationCompleted = captureMigrationCompleted();
assertThat(migrationCompleted.viewIds()).isEmpty();
}
Aggregations