diff --git a/.github/actions/prepare-deps/action.yml b/.github/actions/prepare-deps/action.yml index a6225cf..97a7c1b 100644 --- a/.github/actions/prepare-deps/action.yml +++ b/.github/actions/prepare-deps/action.yml @@ -47,7 +47,7 @@ runs: - name: 🔧 Install tools run: | sudo apt-get update && sudo apt-get install -y curl gpg - curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg + curl -fsSL https://releases.bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg sudo mv bazel-archive-keyring.gpg /usr/share/keyrings echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list sudo apt-get update && sudo apt-get install -y git curl wget python3 xz-utils lsb-release pkg-config bazel-7.4.1 libicu-dev apt-transport-https gnupg diff --git a/Dockerfile b/Dockerfile index 30f379f..0e60de4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ WORKDIR /app COPY . /app RUN apt-get update && apt-get install -y curl gpg locales && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 ENV LANG en_US.utf8 -RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg +RUN curl -fsSL https://releases.bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg RUN mv bazel-archive-keyring.gpg /usr/share/keyrings RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list RUN apt-get update && apt-get install -y git curl wget python3 xz-utils lsb-release pkg-config bazel libicu-dev apt-transport-https gnupg diff --git a/cpp/internal/media_api_client_factory.h b/cpp/internal/media_api_client_factory.h index 7e98101..79fc538 100644 --- a/cpp/internal/media_api_client_factory.h +++ b/cpp/internal/media_api_client_factory.h @@ -45,6 +45,12 @@ class MediaApiClientFactory : public MediaApiClientFactoryInterface { // Default constructor that builds clients with real dependencies. MediaApiClientFactory(); + // Constructor with custom HttpConnectorProvider and default WebRTC factory. + explicit MediaApiClientFactory(HttpConnectorProvider http_connector_provider) + : MediaApiClientFactory() { + http_connector_provider_ = std::move(http_connector_provider); + } + // Constructor with dependency providers, useful for testing. explicit MediaApiClientFactory( PeerConnectionFactoryProvider peer_connection_factory_provider, diff --git a/cpp/internal/media_api_client_factory_test.cc b/cpp/internal/media_api_client_factory_test.cc index 41d1368..cd826f5 100644 --- a/cpp/internal/media_api_client_factory_test.cc +++ b/cpp/internal/media_api_client_factory_test.cc @@ -595,5 +595,24 @@ TEST(MediaApiClientFactoryTest, "error")); } +TEST(MediaApiClientFactoryTest, + ConstructorWithHttpConnectorProviderInstantiatesSuccessfully) { + MediaApiClientFactory::HttpConnectorProvider http_connector_provider = []() { + return std::make_unique(); + }; + MediaApiClientFactory factory(std::move(http_connector_provider)); + + absl::StatusOr> + media_api_client_status = factory.CreateMediaApiClient( + MediaApiClientConfiguration{ + .receiving_video_stream_count = 4, + .enable_audio_streams = true, + }, + webrtc::make_ref_counted()); + + EXPECT_THAT(media_api_client_status, + StatusIs(absl::StatusCode::kInvalidArgument)); +} + } // namespace } // namespace meet