Skip to content

Commit

Permalink
Merge branch 'main' into optionalStatusDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
kstribrnAmzn authored Jul 1, 2024
2 parents 12830f9 + ab978db commit 744b215
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/unit-test/jobs_utest.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,16 @@ void test_getUpdateJobExecutionMsg_hasMalformedStatusDetails( void )

size_t result = Jobs_UpdateMsg( request, buffer, TOPIC_BUFFER_SIZE );

TEST_ASSERT_EQUAL( 19U, result );
}

void test_getUpdateJobExecutionMsg_hasTooSmallBufferSizeForRequiredParameters( void )
{
JobCurrentStatus_t status = Queued;
char buffer[ 2 ] = { 0 };

size_t result = Jobs_UpdateMsg( status, NULL, 0U, buffer, 1 );

TEST_ASSERT_EQUAL( 0U, result );
}

Expand Down Expand Up @@ -1030,3 +1040,13 @@ void test_getUpdateJobExecutionMsg_hasRequiredValidParameters( void )

TEST_ASSERT_EQUAL( 19U, result );
}

void test_getUpdateJobExecutionMsg_hasRequiredValidParameters( void )
{
JobCurrentStatus_t status = Queued;
char buffer[ TOPIC_BUFFER_SIZE + 1 ] = { 0 };

size_t result = Jobs_UpdateMsg( status, NULL, 0U, buffer, TOPIC_BUFFER_SIZE );

TEST_ASSERT_EQUAL( 19U, result );
}

0 comments on commit 744b215

Please sign in to comment.