Exemple #1
0
        private static Config Initialize(PostgresFixture fixture)
        {
            //need to make sure db is created before the tests start
            DbUtils.Initialize(fixture);

            return(ConfigurationFactory.ParseString($@"
            akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql""
            akka.persistence.journal.postgresql {{
                event-adapters {{
                  color-tagger  = ""Akka.Persistence.TCK.Query.ColorFruitTagger, Akka.Persistence.TCK""
                }}
                event-adapter-bindings = {{
                  ""System.String"" = color-tagger
                }}
                class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql""
                plugin-dispatcher = ""akka.actor.default-dispatcher""
                auto-initialize = on
                connection-string = ""{DbUtils.ConnectionString}""
                refresh-interval = 1s
            }}
            akka.test.single-expect-default = 10s")
                   .WithFallback(PostgreSqlPersistence.DefaultConfiguration())
                   .WithFallback(SqlReadJournal.DefaultConfiguration())
                   .WithFallback(Persistence.DefaultConfig()));
        }
 public RemoteMigrationsFacts(ITestOutputHelper logHelper, PostgresFixture postgresFixture)
 {
     _logHelper  = logHelper;
     _mockLogger = new MockLogger(logHelper);
     _migrator   = new EfMigrator(PostgresFactConstants.DdlPath, PostgresFactConstants.ConfigName, PostgresFactConstants.AppConfig,
                                  PostgresFactConstants.InstanceConnectionString, PostgresFactConstants.ConnectionProvider, _mockLogger, false);
     _postGresFixture = postgresFixture;
 }
        public MigratorFacts(ITestOutputHelper logHelper, PostgresFixture postgresFixture)
        {
            _logHelper  = logHelper;
            _mockLogger = new MockLogger(logHelper);

            _logHelper.WriteLine($"Using connectionString: {_instanceString}");

            _PostgresFixture = postgresFixture;
        }
        private static Config CreateSpecConfig(PostgresFixture fixture)
        {
            //need to make sure db is created before the tests start
            DbUtils.Initialize(fixture);

            return(ConfigurationFactory.ParseString(@"
            akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql""
            akka.persistence.journal.postgresql {
                class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql""
                auto-initialize = on
                connection-string = """ + DbUtils.ConnectionString + @"""
            }
            akka.test.single-expect-default = 10s")
                   .WithFallback(PostgreSqlPersistence.DefaultConfiguration())
                   .WithFallback(Persistence.DefaultConfig()));
        }
        private static Config Initialize(PostgresFixture fixture)
        {
            //need to make sure db is created before the tests start
            DbUtils.Initialize(fixture);

            return(ConfigurationFactory.ParseString($@"
            akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql""
            akka.persistence.journal.postgresql {{
                class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql""
                plugin-dispatcher = ""akka.actor.default-dispatcher""
                table-name = event_journal
                auto-initialize = on
                connection-string = ""{DbUtils.ConnectionString}""
                refresh-interval = 1s
            }}
            akka.test.single-expect-default = 10s")
                   .WithFallback(PostgreSqlPersistence.DefaultConfiguration())
                   .WithFallback(SqlReadJournal.DefaultConfiguration())
                   .WithFallback(Persistence.DefaultConfig()));
        }
Exemple #6
0
        private static Config CreateSpecConfig(PostgresFixture fixture)
        {
            //need to make sure db is created before the tests start
            DbUtils.Initialize(fixture);

            return(ConfigurationFactory.ParseString(@"
                akka.persistence {
                    publish-plugin-commands = on
                    journal {
                        plugin = ""akka.persistence.journal.postgresql""
                        postgresql {
                            class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql""
                            plugin-dispatcher = ""akka.actor.default-dispatcher""
                            table-name = event_journal
                            schema-name = public
                            auto-initialize = on
                            connection-string = """ + DbUtils.ConnectionString + @"""
                        }
                    }
                }
                akka.test.single-expect-default = 10s"));
        }
        private static Config Initialize(PostgresFixture fixture)
        {
            //need to make sure db is created before the tests start
            DbUtils.Initialize(fixture);

            return(ConfigurationFactory.ParseString(@"
                akka.persistence {
                    publish-plugin-commands = on
                    snapshot-store {
                        plugin = ""akka.persistence.snapshot-store.postgresql""
                        postgresql {
                            class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Persistence.PostgreSql""
                            plugin-dispatcher = ""akka.actor.default-dispatcher""
                            table-name = snapshot_store
                            schema-name = public
                            auto-initialize = on
                            connection-string = """ + DbUtils.ConnectionString + @"""
                            stored-as = ""JSONB""
                        }
                    }
                }
                akka.test.single-expect-default = 10s"));
        }
 public PostgreSqlJournalJsonSpec(ITestOutputHelper output, PostgresFixture fixture)
     : base(Initialize(fixture), "PostgreSqlJournalJsonSpec", output: output)
 {
     Initialize();
 }
Exemple #9
0
 public PostgreSqlSnapshotStoreSerializationSpec(ITestOutputHelper output, PostgresFixture fixture)
     : base(CreateSpecConfig(fixture), "PostgreSqlSnapshotStoreSerializationSpec", output)
 {
 }
Exemple #10
0
 public LibraryTests(PostgresFixture postgres, ITestOutputHelper output)
     : base(new RepositoryActivator(output, postgres))
 {
 }
 public InteractiveEndUserFeature(AuthenticationFixture securityFixture, IroncladFixture ironcladFixture, PostgresFixture postgresFixture)
     : base(securityFixture, ironcladFixture, postgresFixture)
 {
 }
 public PostgreSqlSnapshotStoreJsonSpec(ITestOutputHelper output, PostgresFixture fixture)
     : base(Initialize(fixture), "PostgreSqlSnapshotStoreJsonSpec", output: output)
 {
     Initialize();
 }
 public ServerApplicationFeature(AuthenticationFixture securityFixture, IroncladFixture ironcladFixture, PostgresFixture postgresFixture)
     : base(securityFixture, ironcladFixture, postgresFixture)
 {
 }
Exemple #14
0
 public ClientManagement(AuthenticationFixture securityFixture, IroncladFixture ironcladFixture, PostgresFixture postgresFixture)
     : base(securityFixture, ironcladFixture, postgresFixture)
 {
 }
 public IdentityResourceManagement(AuthenticationFixture securityFixture, IroncladFixture ironcladFixture, PostgresFixture postgresFixture)
     : base(securityFixture, ironcladFixture, postgresFixture)
 {
 }
 public PostgreSqlCurrentPersistenceIdsSpec(ITestOutputHelper output, PostgresFixture fixture)
     : base(Initialize(fixture), nameof(PostgreSqlCurrentPersistenceIdsSpec), output)
 {
     ReadJournal = Sys.ReadJournalFor <SqlReadJournal>(SqlReadJournal.Identifier);
 }
Exemple #17
0
 public Bug00096(AuthenticationFixture securityFixture, IroncladFixture ironcladFixture, PostgresFixture postgresFixture)
     : base(securityFixture, ironcladFixture, postgresFixture)
 {
 }
 public PostgreSqlJournalPerfSpec(ITestOutputHelper output, PostgresFixture fixture)
     : base(CreateSpecConfig(fixture), "PostgreSqlJournalPerfSpec", output)
 {
     EventsCount    = 5 * 1000;
     ExpectDuration = TimeSpan.FromSeconds(60);
 }
Exemple #19
0
 public PostgreSQL(PostgresFixture fixture)
     : base(fixture)
 {
 }
Exemple #20
0
 public GenericMigratorFacts(ITestOutputHelper logHelper, PostgresFixture pgFixture)
 {
     _logHelper  = logHelper;
     _mockLogger = new MockLogger(logHelper);
 }
Exemple #21
0
 public PostgreSqlEventsByTagSpec(ITestOutputHelper output, PostgresFixture fixture)
     : base(Initialize(fixture), nameof(PostgreSqlEventsByTagSpec), output)
 {
     ReadJournal = Sys.ReadJournalFor <SqlReadJournal>(SqlReadJournal.Identifier);
 }