@@ -50,11 +50,11 @@ describe("CouchbaseContainer", () => {
5050 // connectAndQuery {
5151 it ( "should connect and query using enterprise image" , async ( ) => {
5252 const bucketDefinition = new BucketDefinition ( "mybucket" ) ;
53- const container = await new CouchbaseContainer ( COUCHBASE_IMAGE_ENTERPRISE ) . withBucket ( bucketDefinition ) ;
53+ const container = new CouchbaseContainer ( COUCHBASE_IMAGE_ENTERPRISE ) . withBucket ( bucketDefinition ) ;
5454
5555 startedTestContainer = await container . start ( ) ;
5656
57- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
57+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
5858 username : startedTestContainer . getUsername ( ) ,
5959 password : startedTestContainer . getPassword ( ) ,
6060 } ) ;
@@ -68,10 +68,10 @@ describe("CouchbaseContainer", () => {
6868
6969 it ( "should flush bucket if flushEnabled and check any document exists" , async ( ) => {
7070 const bucketDefinition = new BucketDefinition ( "mybucket" ) . withFlushEnabled ( true ) ;
71- const container = await new CouchbaseContainer ( COUCHBASE_IMAGE_ENTERPRISE ) . withBucket ( bucketDefinition ) ;
71+ const container = new CouchbaseContainer ( COUCHBASE_IMAGE_ENTERPRISE ) . withBucket ( bucketDefinition ) ;
7272
7373 startedTestContainer = await container . start ( ) ;
74- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
74+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
7575 username : startedTestContainer . getUsername ( ) ,
7676 password : startedTestContainer . getPassword ( ) ,
7777 } ) ;
@@ -105,10 +105,10 @@ describe("CouchbaseContainer", () => {
105105
106106 it ( "should connect and query using community image" , async ( ) => {
107107 const bucketDefinition = new BucketDefinition ( "mybucket" ) ;
108- const container = await new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withBucket ( bucketDefinition ) ;
108+ const container = new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withBucket ( bucketDefinition ) ;
109109
110110 startedTestContainer = await container . start ( ) ;
111- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
111+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
112112 username : startedTestContainer . getUsername ( ) ,
113113 password : startedTestContainer . getPassword ( ) ,
114114 } ) ;
@@ -121,10 +121,10 @@ describe("CouchbaseContainer", () => {
121121
122122 it ( "should flush bucket if flushEnabled and check any document exists" , async ( ) => {
123123 const bucketDefinition = new BucketDefinition ( "mybucket" ) . withFlushEnabled ( true ) ;
124- const container = await new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withBucket ( bucketDefinition ) ;
124+ const container = new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withBucket ( bucketDefinition ) ;
125125
126126 startedTestContainer = await container . start ( ) ;
127- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
127+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
128128 username : startedTestContainer . getUsername ( ) ,
129129 password : startedTestContainer . getPassword ( ) ,
130130 } ) ;
@@ -140,7 +140,7 @@ describe("CouchbaseContainer", () => {
140140 } ) ;
141141
142142 it ( "should throw error if analytics service enabled with community version" , async ( ) => {
143- const container = await new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withEnabledServices (
143+ const container = new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withEnabledServices (
144144 CouchbaseService . KV ,
145145 CouchbaseService . ANALYTICS
146146 ) ;
@@ -151,7 +151,7 @@ describe("CouchbaseContainer", () => {
151151 } ) ;
152152
153153 it ( "should throw error if eventing service enabled with community version" , async ( ) => {
154- const container = await new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withEnabledServices (
154+ const container = new CouchbaseContainer ( COUCHBASE_IMAGE_COMMUNITY ) . withEnabledServices (
155155 CouchbaseService . KV ,
156156 CouchbaseService . EVENTING
157157 ) ;
0 commit comments