Skip to content

Merge remote-tracking branch 'origin/develop' into develop #11

Merge remote-tracking branch 'origin/develop' into develop

Merge remote-tracking branch 'origin/develop' into develop #11

GitHub Actions / Unit Tests Reporter succeeded Oct 5, 2024 in 0s

73 passed, 0 failed and 0 skipped

Tests passed successfully

✅ report/unit.xml

73 tests were completed in 15s with 73 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
CommandService 8✅ 2s
DataSyncCommandSfnEventHandler 2✅ 11s
DataSyncCommandSfnEventHandler 13✅ 11s
DataSyncNewCommandEventHandler 1✅ 1s
DynamoDbService 12✅ 10s
DynamoDbService 3✅ 1s
EventBus 2✅ 774ms
ExplorerService 5✅ 757ms
mergeDeep 13✅ 696ms
RequestLogger.getLogLevels 6✅ 484ms
RolesGuard 4✅ 803ms
useLatestPackageVersion 4✅ 2s

✅ CommandService

CommandService getLatestItem should return latest item
  ✅ CommandService getLatestItem should return latest item
CommandService getLatestItem should return null when data not have key
  ✅ CommandService getLatestItem should return null when data not have key
CommandService publishPartialUpdate should update with the latest item
  ✅ CommandService publishPartialUpdate should update with the latest item
CommandService publishPartialUpdate should raise error with the non-existent item
  ✅ CommandService publishPartialUpdate should raise error with the non-existent item
CommandService isNotCommandDirty should return true if command is not dirty
  ✅ CommandService isNotCommandDirty should return true if command is not dirty
CommandService isNotCommandDirty should return false if command is dirty
  ✅ CommandService isNotCommandDirty should return false if command is dirty
CommandService isNotCommandDirty should return true if input atributes is class instance
  ✅ CommandService isNotCommandDirty should return true if input atributes is class instance
CommandService isNotCommandDirty should return false if input atributes is class instance and not dirty
  ✅ CommandService isNotCommandDirty should return false if input atributes is class instance and not dirty

✅ DataSyncCommandSfnEventHandler

DataSyncCommandSfnEventHandler execute should be call event with the correct event and handler
  ✅ DataSyncCommandSfnEventHandler execute should be call event with the correct event and handler
DataSyncCommandSfnEventHandler execute should not be call event with the wrong handler
  ✅ DataSyncCommandSfnEventHandler execute should not be call event with the wrong handler

✅ DataSyncCommandSfnEventHandler

DataSyncCommandSfnEventHandler execute should return result = 0 when executing the correct check version event
  ✅ DataSyncCommandSfnEventHandler execute should return result = 0 when executing the correct check version event
DataSyncCommandSfnEventHandler execute should return result = 1 when executing the correct check version event and the data is not stable
  ✅ DataSyncCommandSfnEventHandler execute should return result = 1 when executing the correct check version event and the data is not stable
DataSyncCommandSfnEventHandler execute should return result = -1 when executing the stale check version event 
  ✅ DataSyncCommandSfnEventHandler execute should return result = -1 when executing the stale check version event
DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct check version event
  ✅ DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct check version event
DataSyncCommandSfnEventHandler execute should return result = ok when executing the correct history copy event
  ✅ DataSyncCommandSfnEventHandler execute should return result = ok when executing the correct history copy event
DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct history copy event
  ✅ DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct history copy event
DataSyncCommandSfnEventHandler execute should return the array of handlers when executing the correct transform data event
  ✅ DataSyncCommandSfnEventHandler execute should return the array of handlers when executing the correct transform data event
DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct transform data event
  ✅ DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct transform data event
DataSyncCommandSfnEventHandler execute should throw not found handler error when executing the sync data event
  ✅ DataSyncCommandSfnEventHandler execute should throw not found handler error when executing the sync data event
DataSyncCommandSfnEventHandler execute should throw empty handler error when executing the sync data event
  ✅ DataSyncCommandSfnEventHandler execute should throw empty handler error when executing the sync data event
DataSyncCommandSfnEventHandler execute should call handler up when executing the correct sync data event
  ✅ DataSyncCommandSfnEventHandler execute should call handler up when executing the correct sync data event
DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct sync data event
  ✅ DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the correct sync data event
DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the finish data event
  ✅ DataSyncCommandSfnEventHandler execute should call the AWS service with the correct parameters when executing the finish data event

✅ DataSyncNewCommandEventHandler

DataSyncNewCommandEventHandler should trigger step function with the correct start command
  ✅ DataSyncNewCommandEventHandler should trigger step function with the correct start command

✅ DynamoDbService

DynamoDbService get should return the dynamodb client
  ✅ DynamoDbService get should return the dynamodb client
DynamoDbService putItem should send PutItemCommand with the origin data
  ✅ DynamoDbService putItem should send PutItemCommand with the origin data
DynamoDbService putItem should send a PutItemCommand with the data and store the attribute in S3
  ✅ DynamoDbService putItem should send a PutItemCommand with the data and store the attribute in S3
DynamoDbService getItem should send GetItemCommand
  ✅ DynamoDbService getItem should send GetItemCommand
DynamoDbService getItem should return the data
  ✅ DynamoDbService getItem should return the data
DynamoDbService getItem should get the attribute data from s3 and return the data
  ✅ DynamoDbService getItem should get the attribute data from s3 and return the data
DynamoDbService updateItem should return updated attributes
  ✅ DynamoDbService updateItem should return updated attributes
DynamoDbService updateItem should send UpdateItemCommand
  ✅ DynamoDbService updateItem should send UpdateItemCommand
DynamoDbService listItemsByPk should return data
  ✅ DynamoDbService listItemsByPk should return data
DynamoDbService listItemsByPk should send QueryCommand
  ✅ DynamoDbService listItemsByPk should send QueryCommand
DynamoDbService listAllItems should return data
  ✅ DynamoDbService listAllItems should return data
DynamoDbService listAllItems should send ScanCommand
  ✅ DynamoDbService listAllItems should send ScanCommand

✅ DynamoDbService

DynamoDbService get should return the dynamodb client
  ✅ DynamoDbService get should return the dynamodb client
DynamoDbService getItem should retrieve data from s3 and return it
  ✅ DynamoDbService getItem should retrieve data from s3 and return it
DynamoDbService putItem should upload data to s3
  ✅ DynamoDbService putItem should upload data to s3

✅ EventBus

EventBus should execute event correctly
  ✅ EventBus should execute event correctly
EventBus should throw not found error
  ✅ EventBus should throw not found error

✅ ExplorerService

ExplorerService explore should discover event handler correctly
  ✅ ExplorerService explore should discover event handler correctly
ExplorerService explore should be defined
  ✅ ExplorerService explore should be defined
ExplorerService explore should discover event factory correctly
  ✅ ExplorerService explore should discover event factory correctly
ExplorerService exploreDataSyncHandlers should discover data sync handler correctly
  ✅ ExplorerService exploreDataSyncHandlers should discover data sync handler correctly
ExplorerService exploreDataSyncHandlers should return no data sync handler
  ✅ ExplorerService exploreDataSyncHandlers should return no data sync handler

✅ mergeDeep

mergeDeep should merge two objects
  ✅ mergeDeep should merge two objects
mergeDeep should merge deeply nested objects
  ✅ mergeDeep should merge deeply nested objects
mergeDeep should merge 3 nested objects
  ✅ mergeDeep should merge 3 nested objects
mergeDeep should return the target object when no sources are provided
  ✅ mergeDeep should return the target object when no sources are provided
mergeDeep should deep merge two objects
  ✅ mergeDeep should deep merge two objects
mergeDeep should deep merge multiple objects
  ✅ mergeDeep should deep merge multiple objects
mergeDeep should handle primitive values
  ✅ mergeDeep should handle primitive values
objectBytes should calculate the object bytes
  ✅ objectBytes should calculate the object bytes
objectBytes should return the correct byte length for an empty object
  ✅ objectBytes should return the correct byte length for an empty object
objectBytes should return the correct byte length for an object with properties
  ✅ objectBytes should return the correct byte length for an object with properties
objectBytes should return the correct byte length for an object with nested objects
  ✅ objectBytes should return the correct byte length for an object with nested objects
isObject should check if an object is an object
  ✅ isObject should check if an object is an object
isObject should check if an object is not an object
  ✅ isObject should check if an object is not an object

✅ RequestLogger.getLogLevels

RequestLogger.getLogLevels should return all log levels
  ✅ RequestLogger.getLogLevels should return all log levels
RequestLogger.getLogLevels should return log levels from debug
  ✅ RequestLogger.getLogLevels should return log levels from debug
RequestLogger.getLogLevels should return log levels from info
  ✅ RequestLogger.getLogLevels should return log levels from info
RequestLogger.getLogLevels should return log levels from warn
  ✅ RequestLogger.getLogLevels should return log levels from warn
RequestLogger.getLogLevels should return log levels from error
  ✅ RequestLogger.getLogLevels should return log levels from error
RequestLogger.getLogLevels should return log levels from fatal
  ✅ RequestLogger.getLogLevels should return log levels from fatal

✅ RolesGuard

RolesGuard should return false if tenant code does not exist
  ✅ RolesGuard should return false if tenant code does not exist
RolesGuard should return true if the user has the system admin role
  ✅ RolesGuard should return true if the user has the system admin role
RolesGuard should return true if the user has the user role
  ✅ RolesGuard should return true if the user has the user role
RolesGuard should return false if the user has only the user role
  ✅ RolesGuard should return false if the user has only the user role

✅ useLatestPackageVersion

useLatestPackageVersion it should update deps
  ✅ useLatestPackageVersion it should update deps
useLatestPackageVersion it should not update name
  ✅ useLatestPackageVersion it should not update name
useLatestPackageVersion it should not update name with empty name
  ✅ useLatestPackageVersion it should not update name with empty name
useLatestPackageVersion it should update name
  ✅ useLatestPackageVersion it should update name