File tree Expand file tree Collapse file tree 5 files changed +9
-7
lines changed
packages/modules/couchbase/src Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ while IFS= read -r file; do
6060done < <( find " ${ROOT_DIR} " -maxdepth 1 -type f -not -name " package.json" -not -name " package-lock.json" )
6161
6262# define an array of modules that won't be part of the build
63- readonly no_build_modules=(" couchbase " )
63+ readonly no_build_modules=()
6464
6565# modules is an array that will store the paths of all the modules in the repository.
6666modules=()
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export class BucketDefinition {
44 private quota = 100 ;
55 private numOfReplicas = 0 ;
66
7- constructor ( private name : string ) { }
7+ constructor ( private readonly name : string ) { }
88
99 withReplicas ( numOfReplicas : number ) {
1010 const minThreshold = 0 ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class CouchbaseContainer extends GenericContainer {
6060
6161 withServiceQuota ( service : CouchbaseService , quotaMb : number ) {
6262 if ( ! service . hasQuota ( ) ) {
63- throw new Error ( `The provided service (${ service } ) has no quota to configure` ) ;
63+ throw new Error ( `The provided service (${ service . getIdentifier ( ) } ) has no quota to configure` ) ;
6464 }
6565
6666 if ( quotaMb < service . getMinimumQuotaMb ( ) ) {
@@ -253,14 +253,14 @@ export class CouchbaseContainer extends GenericContainer {
253253 }
254254
255255 private async setMemoryQuotas ( container : StartedTestContainer ) {
256- log . debug ( `Custom service memory quotas: ${ this . customServiceQuotas } ` ) ;
257256 for ( const service of this . enabledServices ) {
258257 if ( ! service . hasQuota ( ) ) {
259258 continue ;
260259 }
261260
262261 const body = new URLSearchParams ( ) ;
263- const quota = this . customServiceQuotas . get ( service ) || service . getMinimumQuotaMb ( ) ;
262+ const quota = this . customServiceQuotas . get ( service ) ?? service . getMinimumQuotaMb ( ) ;
263+ log . debug ( `Custom service memory quotas: ${ service . getIdentifier ( ) } - ${ quota } Mb.` ) ;
264264
265265 if ( service . getIdentifier ( ) === CouchbaseService . KV . getIdentifier ( ) ) {
266266 body . set ( "memoryQuota" , quota . toString ( ) ) ;
Original file line number Diff line number Diff line change 11export class CouchbaseService {
22 constructor (
3- private identifier : string ,
4- private minimumQuotaMb : number
3+ private readonly identifier : string ,
4+ private readonly minimumQuotaMb : number
55 ) { }
66
77 static readonly KV = new CouchbaseService ( "kv" , 256 ) ;
Original file line number Diff line number Diff line change 1+ export { BucketDefinition } from "./bucket-definition" ;
12export { CouchbaseContainer , StartedCouchbaseContainer } from "./couchbase-container" ;
3+ export { CouchbaseService } from "./couchbase-service" ;
You can’t perform that action at this time.
0 commit comments