Skip to content

Commit 5278c44

Browse files
kuxicopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 975586657
1 parent 9baacb0 commit 5278c44

4 files changed

Lines changed: 27 additions & 2 deletions

File tree

.github/actions/prepare-deps/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
- name: 🔧 Install tools
4848
run: |
4949
sudo apt-get update && sudo apt-get install -y curl gpg
50-
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
50+
curl -fsSL https://releases.bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
5151
sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
5252
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
5353
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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ WORKDIR /app
1717
COPY . /app
1818
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
1919
ENV LANG en_US.utf8
20-
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
20+
RUN curl -fsSL https://releases.bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
2121
RUN mv bazel-archive-keyring.gpg /usr/share/keyrings
2222
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
2323
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

cpp/internal/media_api_client_factory.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ class MediaApiClientFactory : public MediaApiClientFactoryInterface {
4545
// Default constructor that builds clients with real dependencies.
4646
MediaApiClientFactory();
4747

48+
// Constructor with custom HttpConnectorProvider and default WebRTC factory.
49+
explicit MediaApiClientFactory(HttpConnectorProvider http_connector_provider)
50+
: MediaApiClientFactory() {
51+
http_connector_provider_ = std::move(http_connector_provider);
52+
}
53+
4854
// Constructor with dependency providers, useful for testing.
4955
explicit MediaApiClientFactory(
5056
PeerConnectionFactoryProvider peer_connection_factory_provider,

cpp/internal/media_api_client_factory_test.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,5 +595,24 @@ TEST(MediaApiClientFactoryTest,
595595
"error"));
596596
}
597597

598+
TEST(MediaApiClientFactoryTest,
599+
ConstructorWithHttpConnectorProviderInstantiatesSuccessfully) {
600+
MediaApiClientFactory::HttpConnectorProvider http_connector_provider = []() {
601+
return std::make_unique<MockHttpConnector>();
602+
};
603+
MediaApiClientFactory factory(std::move(http_connector_provider));
604+
605+
absl::StatusOr<std::unique_ptr<MediaApiClientInterface>>
606+
media_api_client_status = factory.CreateMediaApiClient(
607+
MediaApiClientConfiguration{
608+
.receiving_video_stream_count = 4,
609+
.enable_audio_streams = true,
610+
},
611+
webrtc::make_ref_counted<MockMediaApiClientObserver>());
612+
613+
EXPECT_THAT(media_api_client_status,
614+
StatusIs(absl::StatusCode::kInvalidArgument));
615+
}
616+
598617
} // namespace
599618
} // namespace meet

0 commit comments

Comments
 (0)