Skip to content

Commit 150a9b4

Browse files
committed
merge
1 parent 20bd77d commit 150a9b4

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/chat-cli/src/cli/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ pub struct Cli {
171171
impl Cli {
172172
pub async fn execute(self) -> Result<ExitCode> {
173173
let subcommand = self.subcommand.unwrap_or_default();
174+
174175
// Initialize our logger and keep around the guard so logging can perform as expected.
175176
let _log_guard = initialize_logging(LogArgs {
176177
log_level: match self.verbose > 0 {
@@ -218,6 +219,7 @@ impl Cli {
218219
if subcommand.valid_for_telemetry() {
219220
telemetry.send_cli_subcommand_executed(&subcommand).ok();
220221
}
222+
221223
let cli_context = CliContext::new();
222224

223225
let result = match subcommand {

crates/chat-cli/src/telemetry/cognito.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub async fn get_cognito_credentials_send(
2727
telemetry_stage: &TelemetryStage,
2828
) -> Result<Credentials, CredentialsError> {
2929
trace!("Creating new cognito credentials");
30+
3031
let conf = aws_sdk_cognitoidentity::Config::builder()
3132
.behavior_version(BehaviorVersion::v2025_01_17())
3233
.region(telemetry_stage.region.clone())
@@ -161,3 +162,17 @@ fn is_expired(expiration: Option<&String>) -> bool {
161162
},
162163
}
163164
}
165+
166+
#[cfg(test)]
167+
mod test {
168+
use super::*;
169+
170+
#[tokio::test]
171+
async fn pools() {
172+
for telemetry_stage in [TelemetryStage::BETA, TelemetryStage::EXTERNAL_PROD] {
173+
get_cognito_credentials_send(&mut Database::new().await.unwrap(), &telemetry_stage)
174+
.await
175+
.unwrap();
176+
}
177+
}
178+
}

0 commit comments

Comments
 (0)