fix tests so they pass on a self-signed single 21.10 node

This commit is contained in:
Nicolas Dextraze
2022-10-22 09:05:18 -04:00
parent 05e716e563
commit aa07b04dd3
5 changed files with 14 additions and 7 deletions

View File

@ -12,6 +12,8 @@ protobufJS.configure();
var settings = {
log: new NoopLogger(),
useSslConnection: true,
validateServer: false
};
if (process.env.TESTS_VERBOSE_LOGGING === '1') {
settings.verboseLogging = true;

View File

@ -41,7 +41,7 @@ module.exports = {
done();
}
var self = this;
this.conn.connectToPersistentSubscription(testStreamName, 'consumer-1', eventAppeared, subscriptionDropped)
this.conn.connectToPersistentSubscription(testStreamName, 'consumer-1', eventAppeared, subscriptionDropped, adminCredentials)
.then(function(subscription) {
test.ok(subscription, "Subscription is null.");
return self.conn.appendToStream(testStreamName, client.expectedVersion.any, [createRandomEvent(), createRandomEvent()]);

View File

@ -2,7 +2,7 @@ const client = require('../lib/dist');
const userCredentials = new client.UserCredentials('admin', 'changeit');
const log = new client.NoopLogger();
const httpEndpoint = `http://${process.env.EVENTSTORE_HOST || "localhost"}:2113`;
const httpEndpoint = `https://${process.env.EVENTSTORE_HOST || "localhost"}:2113`;
const operationTimeout = 5000;
const simpleProjection = "\
@ -21,7 +21,7 @@ fromStream('$stats-127.0.0.1:2113')\
module.exports = {
setUp: function(cb) {
this.projectionsManager = new client.ProjectionsManager(log, httpEndpoint, operationTimeout);
this.projectionsManager = new client.ProjectionsManager(log, httpEndpoint, operationTimeout, false);
cb();
},
'Create One Time Projection Happy Path': function(test) {