From 4aba308ba88f2d3bd85dd8a4ead5be2b71bd9a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 29 Oct 2026 12:58:16 +0100 Subject: [PATCH] test-condition: make sure that last assignment wins when parsing The bot pointed out that the existing test does not distinguish between lexicographically-first (old rule) and last (new rule). --- src/test/test-condition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test-condition.c b/src/test/test-condition.c index 6f02c7624e8..3a747200b66 100644 --- a/src/test/test-condition.c +++ b/src/test/test-condition.c @@ -1760,7 +1760,7 @@ TEST(condition_test_machine_tag) { /* Conflicting values for the same key: graceful parsing keeps the last value and drops the rest, * so only "env=prod" remains visible. */ - ASSERT_OK(write_string_file(f, "TAGS=\"env=staging:env=prod\"\n", + ASSERT_OK(write_string_file(f, "TAGS=\"env=staging:env=dev:env=prod\"\n", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_TRUNCATE)); ASSERT_NOT_NULL((condition = condition_new(CONDITION_MACHINE_TAG, "env=prod", /* trigger= */ false, /* negate= */ false))); ASSERT_OK_POSITIVE(condition_test(condition, environ, RUNTIME_SCOPE_SYSTEM));