From ac2b4243db71280f54e30a4569e2c9c801429cb7 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Mon, 6 Jan 2025 15:46:09 -0800 Subject: [PATCH] update test --- source/aws_profile.c | 1 - tests/aws_profile_tests.c | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/aws_profile.c b/source/aws_profile.c index bb39cd1..6d1dac7 100644 --- a/source/aws_profile.c +++ b/source/aws_profile.c @@ -918,7 +918,6 @@ static bool s_parse_profile_declaration( context->current_property = NULL; s_parse_by_character_predicate(&profile_cursor, s_is_whitespace, NULL, 0); - enum aws_profile_section_type section_type = AWS_PROFILE_SECTION_TYPE_PROFILE; /* diff --git a/tests/aws_profile_tests.c b/tests/aws_profile_tests.c index 0f409d8..08d82ad 100644 --- a/tests/aws_profile_tests.c +++ b/tests/aws_profile_tests.c @@ -425,7 +425,7 @@ AWS_TEST_CASE(aws_profile_multiple_profile_test, s_aws_profile_multiple_profile_ */ AWS_STATIC_STRING_FROM_LITERAL( s_credentials_sso_session, - "[profile foo]\nname = value\n[profile bar]\nname2 = value2\n" + "[profile foo]\nname = value\n[profile bar]\nname2 = value2\nservices = test-service\n" "[sso-session session]\nname3 = value3\ns3 =\n name4 = value4\n" "[services test-service]\nname4 = value4\ns3 =\n name5 = value5\n"); @@ -441,8 +441,9 @@ static int s_aws_profile_multiple_sections(struct aws_allocator *allocator, void EXPECT_PROPERTY_COUNT(profile_collection, AWS_PROFILE_SECTION_TYPE_PROFILE, "foo", 1); EXPECT_PROPERTY(profile_collection, AWS_PROFILE_SECTION_TYPE_PROFILE, "foo", "name", "value"); EXPECT_SECTION(profile_collection, AWS_PROFILE_SECTION_TYPE_PROFILE, "bar"); - EXPECT_PROPERTY_COUNT(profile_collection, AWS_PROFILE_SECTION_TYPE_PROFILE, "bar", 1); + EXPECT_PROPERTY_COUNT(profile_collection, AWS_PROFILE_SECTION_TYPE_PROFILE, "bar", 2); EXPECT_PROPERTY(profile_collection, AWS_PROFILE_SECTION_TYPE_PROFILE, "bar", "name2", "value2"); + EXPECT_PROPERTY(profile_collection, AWS_PROFILE_SECTION_TYPE_PROFILE, "bar", "services", "test-service"); EXPECT_SECTION_COUNT(profile_collection, AWS_PROFILE_SECTION_TYPE_SSO_SESSION, 1); EXPECT_SECTION(profile_collection, AWS_PROFILE_SECTION_TYPE_SSO_SESSION, "session");