This is an automated email from the ASF dual-hosted git repository. rouazana pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 39410b74496899d841d1d0d43c45cc9a7fc10f97 Author: Raphael Ouazana <[email protected]> AuthorDate: Tue Oct 8 14:55:04 2019 +0200 JAMES-2914 Add CassandraMigrationTask in webadmin serialization integration tests --- ...dminServerTaskSerializationIntegrationTest.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerTaskSerializationIntegrationTest.java b/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerTaskSerializationIntegrationTest.java index f8f96c3..3d6bb29 100644 --- a/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerTaskSerializationIntegrationTest.java +++ b/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerTaskSerializationIntegrationTest.java @@ -41,6 +41,9 @@ import javax.mail.Flags; import org.apache.james.CassandraRabbitMQAwsS3JmapTestRule; import org.apache.james.DockerCassandraRule; import org.apache.james.GuiceJamesServer; +import org.apache.james.backends.cassandra.migration.MigrationTask; +import org.apache.james.backends.cassandra.versions.CassandraSchemaVersionManager; +import org.apache.james.backends.cassandra.versions.SchemaVersion; import org.apache.james.core.User; import org.apache.james.core.builder.MimeMessageBuilder; import org.apache.james.mailbox.MailboxSession; @@ -722,4 +725,24 @@ public class WebAdminServerTaskSerializationIntegrationTest { .body("additionalInformation.user", is(USERNAME)) .body("additionalInformation.deleteMessageId", is(composedMessageId.getMessageId().serialize())); } + + @Test + public void cassandraMigrationShouldComplete() { + SchemaVersion toVersion = CassandraSchemaVersionManager.MAX_VERSION; + String taskId = with() + .body(String.valueOf(toVersion.getValue())) + .post("cassandra/version/upgrade") + .jsonPath() + .get("taskId"); + + given() + .basePath(TasksRoutes.BASE) + .when() + .get(taskId + "/await") + .then() + .body("status", is("completed")) + .body("taskId", is(taskId)) + .body("type", is(MigrationTask.CASSANDRA_MIGRATION.asString())) + .body("additionalInformation.toVersion", is(toVersion.getValue())); + } } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
