Skip to content

Commit

Permalink
bad, but does it work?
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed May 1, 2024
1 parent 3fccefa commit 213921f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/credentials_provider_ecs_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,18 @@ static int s_aws_ecs_tester_init(struct aws_allocator *allocator) {
return AWS_OP_SUCCESS;
}

static void s_aws_ecs_tester_cleanup(void) {
static void s_aws_ecs_tester_reset(void) {
aws_array_list_clean_up(&s_tester.response_data_callbacks);
aws_string_destroy(s_tester.request_path_and_query);
aws_string_destroy(s_tester.request_authorization_header);
aws_string_destroy(s_tester.selected_host);
aws_condition_variable_clean_up(&s_tester.signal);
aws_mutex_clean_up(&s_tester.lock);
aws_credentials_release(s_tester.credentials);
}

static void s_aws_ecs_tester_cleanup(void) {
s_aws_ecs_tester_reset();
aws_auth_library_clean_up();
}

Expand Down Expand Up @@ -724,7 +728,6 @@ AWS_TEST_CASE(credentials_provider_ecs_basic_success_token_file, s_credentials_p

static int s_credentials_provider_ecs_basic_success_uri_env(struct aws_allocator *allocator, void *ctx) {
(void)ctx;
aws_auth_library_init(allocator);

const struct test_case {
const char *relative_uri;
Expand Down Expand Up @@ -840,12 +843,12 @@ static int s_credentials_provider_ecs_basic_success_uri_env(struct aws_allocator
case_i.expected_uri,
case_i.expected_auth_token));

s_aws_ecs_tester_cleanup();
s_aws_ecs_tester_reset();
}

aws_tls_ctx_release(tls_ctx);
aws_tls_ctx_options_clean_up(&tls_options);

aws_auth_library_clean_up();
return 0;
}
AWS_TEST_CASE(credentials_provider_ecs_basic_success_uri_env, s_credentials_provider_ecs_basic_success_uri_env);
Expand Down

0 comments on commit 213921f

Please sign in to comment.