@@ -50,11 +50,11 @@ describe("CouchbaseContainer", () => {
50
50
// connectAndQuery {
51
51
it ( "should connect and query using enterprise image" , async ( ) => {
52
52
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 ) ;
54
54
55
55
startedTestContainer = await container . start ( ) ;
56
56
57
- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
57
+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
58
58
username : startedTestContainer . getUsername ( ) ,
59
59
password : startedTestContainer . getPassword ( ) ,
60
60
} ) ;
@@ -68,10 +68,10 @@ describe("CouchbaseContainer", () => {
68
68
69
69
it ( "should flush bucket if flushEnabled and check any document exists" , async ( ) => {
70
70
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 ) ;
72
72
73
73
startedTestContainer = await container . start ( ) ;
74
- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
74
+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
75
75
username : startedTestContainer . getUsername ( ) ,
76
76
password : startedTestContainer . getPassword ( ) ,
77
77
} ) ;
@@ -105,10 +105,10 @@ describe("CouchbaseContainer", () => {
105
105
106
106
it ( "should connect and query using community image" , async ( ) => {
107
107
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 ) ;
109
109
110
110
startedTestContainer = await container . start ( ) ;
111
- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
111
+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
112
112
username : startedTestContainer . getUsername ( ) ,
113
113
password : startedTestContainer . getPassword ( ) ,
114
114
} ) ;
@@ -121,10 +121,10 @@ describe("CouchbaseContainer", () => {
121
121
122
122
it ( "should flush bucket if flushEnabled and check any document exists" , async ( ) => {
123
123
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 ) ;
125
125
126
126
startedTestContainer = await container . start ( ) ;
127
- cluster = new couchbase . Cluster ( startedTestContainer . getConnectionString ( ) , {
127
+ cluster = await couchbase . Cluster . connect ( startedTestContainer . getConnectionString ( ) , {
128
128
username : startedTestContainer . getUsername ( ) ,
129
129
password : startedTestContainer . getPassword ( ) ,
130
130
} ) ;
@@ -140,7 +140,7 @@ describe("CouchbaseContainer", () => {
140
140
} ) ;
141
141
142
142
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 (
144
144
CouchbaseService . KV ,
145
145
CouchbaseService . ANALYTICS
146
146
) ;
@@ -151,7 +151,7 @@ describe("CouchbaseContainer", () => {
151
151
} ) ;
152
152
153
153
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 (
155
155
CouchbaseService . KV ,
156
156
CouchbaseService . EVENTING
157
157
) ;
0 commit comments