Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Sep 6, 2024
1 parent 0ea5ce0 commit c2bfafc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
13 changes: 7 additions & 6 deletions source/credentials_provider_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,13 @@ static struct aws_credentials_provider *s_create_sts_based_provider(
aws_string_c_str(aws_profile_property_get_value(source_profile_property)));

struct aws_credentials_provider_profile_options profile_provider_options = {
.bootstrap = options->bootstrap,
.profile_name_override = aws_byte_cursor_from_string(aws_profile_property_get_value(source_profile_property)),
/* reuse profile collection instead of reading it again */
.profile_collection_cached = merged_profiles,
.tls_ctx = options->tls_ctx,
.function_table = options->function_table,
.bootstrap = options->bootstrap,
.profile_name_override =
aws_byte_cursor_from_string(aws_profile_property_get_value(source_profile_property)),
/* reuse profile collection instead of reading it again */
.profile_collection_cached = merged_profiles,
.tls_ctx = options->tls_ctx,
.function_table = options->function_table,
};
sts_options.creds_provider =
s_credentials_provider_new_profile_internal(allocator, &profile_provider_options, source_profiles_table);
Expand Down
14 changes: 8 additions & 6 deletions tests/credentials_provider_sts_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ static bool s_has_tester_received_connection_manager_shutdown_callback(void *use

static void s_aws_wait_for_connection_manager_shutdown_callback(void) {
aws_mutex_lock(&s_tester.lock);
aws_condition_variable_wait_pred(&s_tester.signal, &s_tester.lock, s_has_tester_received_connection_manager_shutdown_callback, NULL);
aws_condition_variable_wait_pred(
&s_tester.signal, &s_tester.lock, s_has_tester_received_connection_manager_shutdown_callback, NULL);
aws_mutex_unlock(&s_tester.lock);
}


static void s_on_provider_shutdown(void *user_data) {
(void)user_data;

Expand All @@ -112,7 +112,8 @@ static bool s_has_tester_received_provider_shutdown_callback(void *user_data) {

static void s_aws_wait_for_provider_shutdown_callback(void) {
aws_mutex_lock(&s_tester.lock);
aws_condition_variable_wait_pred(&s_tester.signal, &s_tester.lock, s_has_tester_received_provider_shutdown_callback, NULL);
aws_condition_variable_wait_pred(
&s_tester.signal, &s_tester.lock, s_has_tester_received_provider_shutdown_callback, NULL);
aws_mutex_unlock(&s_tester.lock);
}

Expand Down Expand Up @@ -1191,9 +1192,10 @@ static int s_credentials_provider_sts_from_profile_config_with_chain_fn(struct a
.profile_name_override = aws_byte_cursor_from_c_str("roletest"),
.bootstrap = s_tester.bootstrap,
.function_table = &s_mock_function_table,
.shutdown_options = {
.shutdown_callback = s_on_provider_shutdown,
},
.shutdown_options =
{
.shutdown_callback = s_on_provider_shutdown,
},
};
int expected_num_requests = 3;
for (int i = 0; i < expected_num_requests; i++) {
Expand Down

0 comments on commit c2bfafc

Please sign in to comment.