Skip to content

Merge pull request #47 from mbc-net/feat/infra-diagram #32

Merge pull request #47 from mbc-net/feat/infra-diagram

Merge pull request #47 from mbc-net/feat/infra-diagram #32

GitHub Actions / Unit Tests Reporter succeeded Nov 14, 2024 in 0s

80 passed, 0 failed and 0 skipped

Tests passed successfully

✅ report/unit.xml

80 tests were completed in 16s with 80 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✅ 805ms
ExplorerService 5✅ 636ms
getPackageVersion 2✅ 416ms
isLatestCli 2✅ 434ms
mergeDeep 13✅ 682ms
newAction 3✅ 624ms
RequestLogger.getLogLevels 6✅ 452ms
RolesGuard 4✅ 809ms
usePackageVersion 4✅ 3s

✅ 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

✅ getPackageVersion

getPackageVersion should return the latest version when isLatest is true
  ✅ getPackageVersion should return the latest version when isLatest is true
getPackageVersion should return all versions when isLatest is false
  ✅ getPackageVersion should return all versions when isLatest is false

✅ isLatestCli

isLatestCli should return true if the current version matches the latest version
  ✅ isLatestCli should return true if the current version matches the latest version
isLatestCli should return false if the current version does not match the latest version
  ✅ isLatestCli should return false if the current version does not match the latest version

✅ 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

✅ newAction

newAction should generate a project with the latest version when version is not specified
  ✅ newAction should generate a project with the latest version when version is not specified
newAction should use a specific version if specified
  ✅ newAction should use a specific version if specified
newAction should throw an error for an invalid version
  ✅ newAction should throw an error for an invalid version

✅ 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

✅ usePackageVersion

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