#include <aws/core/Aws.h>
#include <aws_common/sdk_utils/aws_error.h>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <kinesis-video-producer/KinesisVideoProducer.h>
#include <kinesis-video-producer/Logger.h>
#include <kinesis_manager/common.h>
#include <kinesis_manager/kinesis_stream_manager.h>
#include <kinesis_manager/stream_definition_provider.h>
#include <aws/kinesis/model/GetShardIteratorRequest.h>
#include <aws/kinesis/model/ListShardsRequest.h>
Go to the source code of this file.
Classes | |
class | KinesisClientMock |
class | KinesisStreamManagerMockingFixture |
class | KinesisVideoProducerMock |
class | KinesisVideoStreamMock |
class | StreamDefinitionProviderFullMock |
class | StreamDefinitionProviderPartialMock |
class | StreamSubscriptionInstallerMock |
class | TestParameterReader |
Namespaces | |
Aws | |
Aws::Kinesis | |
Aws::Kinesis::Model | |
Macros | |
#define | PARAM_NS_SEPARATOR "/" |
#define | PARAM_NS_SEPARATOR_CHAR '/' |
Functions | |
static bool | are_streams_equivalent (unique_ptr< StreamDefinition > stream1, unique_ptr< StreamDefinition > stream2) |
KinesisStreamManagerInterface::VideoProducerFactory | ConstVideoProducerFactory (unique_ptr< KinesisVideoProducerInterface > video_producer) |
unique_ptr< StreamDefinition > | DefaultProducerSetup (KinesisStreamManager &stream_manager, string region, string test_prefix, std::shared_ptr< ParameterReaderInterface > parameter_reader, KinesisStreamManagerInterface::VideoProducerFactory video_producer_factory) |
unique_ptr< StreamDefinition > | DefaultProducerSetup (KinesisStreamManager &stream_manager, string region, string test_prefix, KinesisStreamManagerInterface::VideoProducerFactory video_producer_factory) |
unique_ptr< StreamDefinition > | DefaultProducerSetup (Aws::Kinesis::KinesisStreamManager &stream_manager, string region, const std::vector< std::string > &test_prefix) |
LOGGER_TAG ("aws.kinesis.kinesis_manager_unittest") | |
int | main (int argc, char **argv) |
bool | Aws::Kinesis::Model::operator== (const Record &left, const Record &right) |
TEST (StreamDefinitionProviderSuite, getCodecPrivateDataTest) | |
TEST (StreamDefinitionProviderSuite, getStreamDefinitionTest) | |
TEST (KinesisStreamManagerSuite, videoInitializationTest) | |
TEST_F (KinesisStreamManagerMockingFixture, testPutMetadataNotInitialized) | |
TEST_F (KinesisStreamManagerMockingFixture, testPutMetadataStreamNotReady) | |
TEST_F (KinesisStreamManagerMockingFixture, testPutMetadataSuccess) | |
TEST_F (KinesisStreamManagerMockingFixture, testFreeStream) | |
TEST_F (KinesisStreamManagerMockingFixture, testProcessCodecPrivateDataForStreamKinesisVideoStreamSetupFailure) | |
TEST_F (KinesisStreamManagerMockingFixture, testKinesisVideoStreamSetupZeroStreamCount) | |
TEST_F (KinesisStreamManagerMockingFixture, testKinesisVideoStreamSetupSingleStreamFailsGetCodecPrivateData) | |
TEST_F (KinesisStreamManagerMockingFixture, testKinesisVideoStreamSetupAndFetchRekognitionResultsSingleStreamSuccessful) | |
TEST_F (KinesisStreamManagerMockingFixture, mockStreamInitializationTestActualKinesisVideoProducer) | |
TEST_F (KinesisStreamManagerMockingFixture, mockStreamInitializationTestKinesisVideoProducerMock) | |
TEST_F (KinesisStreamManagerMockingFixture, mockPutFrameTest) | |
#define PARAM_NS_SEPARATOR "/" |
Definition at line 36 of file kinesis_manager_test.cpp.
#define PARAM_NS_SEPARATOR_CHAR '/' |
Definition at line 37 of file kinesis_manager_test.cpp.
|
static |
Tests stream definitions for equivalence.
stream1 | |
stream2 |
Compare complex structures first
Zero out pointers contained within the structs and use memcmp.
Definition at line 201 of file kinesis_manager_test.cpp.
KinesisStreamManagerInterface::VideoProducerFactory ConstVideoProducerFactory | ( | unique_ptr< KinesisVideoProducerInterface > | video_producer | ) |
Definition at line 364 of file kinesis_manager_test.cpp.
unique_ptr<StreamDefinition> DefaultProducerSetup | ( | KinesisStreamManager & | stream_manager, |
string | region, | ||
string | test_prefix, | ||
std::shared_ptr< ParameterReaderInterface > | parameter_reader, | ||
KinesisStreamManagerInterface::VideoProducerFactory | video_producer_factory | ||
) |
Initializes the video producer and generates a basic stream definition.
Definition at line 243 of file kinesis_manager_test.cpp.
unique_ptr<StreamDefinition> DefaultProducerSetup | ( | KinesisStreamManager & | stream_manager, |
string | region, | ||
string | test_prefix, | ||
KinesisStreamManagerInterface::VideoProducerFactory | video_producer_factory | ||
) |
Initializes the video producer and generates a basic stream definition.
Definition at line 265 of file kinesis_manager_test.cpp.
unique_ptr<StreamDefinition> DefaultProducerSetup | ( | Aws::Kinesis::KinesisStreamManager & | stream_manager, |
string | region, | ||
const std::vector< std::string > & | test_prefix | ||
) |
Initializes the video producer and generates a basic stream definition.
Definition at line 943 of file kinesis_manager_test.cpp.
LOGGER_TAG | ( | "aws.kinesis.kinesis_manager_unittest" | ) |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 1073 of file kinesis_manager_test.cpp.
TEST | ( | StreamDefinitionProviderSuite | , |
getCodecPrivateDataTest | |||
) |
Tests that GetCodecPrivateData successfully reads and decodes the given base64-encoded buffer.
Definition at line 805 of file kinesis_manager_test.cpp.
TEST | ( | StreamDefinitionProviderSuite | , |
getStreamDefinitionTest | |||
) |
Tests that GetStreamDefinition returns the expected StreamDefinition object by comparing it to a manually created StreamDefinition.
Definition at line 864 of file kinesis_manager_test.cpp.
TEST | ( | KinesisStreamManagerSuite | , |
videoInitializationTest | |||
) |
Tests the InitializeVideoProducer function.
Definition at line 964 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testPutMetadataNotInitialized | |||
) |
Definition at line 403 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testPutMetadataStreamNotReady | |||
) |
Definition at line 417 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testPutMetadataSuccess | |||
) |
Definition at line 444 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testFreeStream | |||
) |
Definition at line 486 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testProcessCodecPrivateDataForStreamKinesisVideoStreamSetupFailure | |||
) |
Definition at line 512 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testKinesisVideoStreamSetupZeroStreamCount | |||
) |
Definition at line 550 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testKinesisVideoStreamSetupSingleStreamFailsGetCodecPrivateData | |||
) |
Definition at line 565 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
testKinesisVideoStreamSetupAndFetchRekognitionResultsSingleStreamSuccessful | |||
) |
Definition at line 584 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
mockStreamInitializationTestActualKinesisVideoProducer | |||
) |
Definition at line 692 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
mockStreamInitializationTestKinesisVideoProducerMock | |||
) |
Definition at line 717 of file kinesis_manager_test.cpp.
TEST_F | ( | KinesisStreamManagerMockingFixture | , |
mockPutFrameTest | |||
) |
Definition at line 742 of file kinesis_manager_test.cpp.