Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/prepare-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions cpp/internal/media_api_client_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
19 changes: 19 additions & 0 deletions cpp/internal/media_api_client_factory_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -595,5 +595,24 @@ TEST(MediaApiClientFactoryTest,
"error"));
}

TEST(MediaApiClientFactoryTest,
ConstructorWithHttpConnectorProviderInstantiatesSuccessfully) {
MediaApiClientFactory::HttpConnectorProvider http_connector_provider = []() {
return std::make_unique<MockHttpConnector>();
};
MediaApiClientFactory factory(std::move(http_connector_provider));

absl::StatusOr<std::unique_ptr<MediaApiClientInterface>>
media_api_client_status = factory.CreateMediaApiClient(
MediaApiClientConfiguration{
.receiving_video_stream_count = 4,
.enable_audio_streams = true,
},
webrtc::make_ref_counted<MockMediaApiClientObserver>());

EXPECT_THAT(media_api_client_status,
StatusIs(absl::StatusCode::kInvalidArgument));
}

} // namespace
} // namespace meet
Loading