diff --git a/lib/Admin_Handler.cpp b/lib/Admin_Handler.cpp index 7e747bed3..cf5910c1e 100644 --- a/lib/Admin_Handler.cpp +++ b/lib/Admin_Handler.cpp @@ -1122,7 +1122,7 @@ static bool is_sensitive_set_variable_name(const char* var_name) { strcmp(var_name, "admin-admin_credentials") == 0; } -// Returns true if the given name is either a know mysql or admin global variable. +// Returns true if the given name is either a known mysql or admin global variable. bool is_valid_global_variable(const char *var_name) { if (strlen(var_name) > 6 && !strncmp(var_name, "mysql-", 6) && GloMTH->has_variable(var_name + 6)) { return true; diff --git a/test/tap/Makefile b/test/tap/Makefile index f0ed13f2f..f35d1e76d 100644 --- a/test/tap/Makefile +++ b/test/tap/Makefile @@ -20,6 +20,10 @@ tap: test_deps tests: tap test_deps cd tests && CC=${CC} CXX=${CXX} ${MAKE} $(MAKECMDGOALS) +.PHONY: tests_no_infra +tests_no_infra: tap test_deps + cd tests && CC=${CC} CXX=${CXX} ${MAKE} tests_no_infra + .PHONY: tests_with_deps tests_with_deps: tap test_deps cd tests_with_deps && CC=${CC} CXX=${CXX} ${MAKE} $(MAKECMDGOALS) diff --git a/test/tap/groups/groups.json b/test/tap/groups/groups.json index 3164b077f..b004eb298 100644 --- a/test/tap/groups/groups.json +++ b/test/tap/groups/groups.json @@ -305,6 +305,8 @@ "test_mcp_llm_discovery_phaseb-t": [ "ai-g1" ], "test_mcp_static_harvest-t": [ "ai-g1" ], "unit-strip_schema_from_query-t": [ "unit-tests-g1" ], + "admin_set_credentials_logging-t": [ "no-infra-g1" ], + "listener_conflicts_validation-t": [ "no-infra-g1" ], "test_pgsql_replication_lag-t": [ "pgsql-repl" ], "mcp_query_rules-t": [ "ai-g1" ] diff --git a/test/tap/tests/Makefile b/test/tap/tests/Makefile index 443940fb5..54d50c321 100644 --- a/test/tap/tests/Makefile +++ b/test/tap/tests/Makefile @@ -98,6 +98,11 @@ CUSTOMARGS += -Wl,-Bdynamic -ltap -lcpp_dotenv -lcurl -lssl -lcrypto -lre2 -lpth .PHONY: all all: tests +.PHONY: tests_no_infra +tests_no_infra: admin_set_credentials_logging-t listener_conflicts_validation-t + ./admin_set_credentials_logging-t + ./listener_conflicts_validation-t + debug: OPT := $(STDCPP) -O0 -DDEBUG -ggdb -Wl,--no-as-needed -Wl,-rpath,$(TAP_LDIR) -Wl,-rpath,$(POSTGRESQL_PATH)/interfaces/libpq -Wl,-rpath,$(RE2_LDIR) $(WGCOV) $(WASAN) -DGITVERSION=\"$(GIT_VERSION)\" debug: tests diff --git a/test/tap/tests/admin_set_credentials_logging-t.cpp b/test/tap/tests/admin_set_credentials_logging-t.cpp index f81956b8c..9b32a5061 100644 --- a/test/tap/tests/admin_set_credentials_logging-t.cpp +++ b/test/tap/tests/admin_set_credentials_logging-t.cpp @@ -81,7 +81,7 @@ int main() { string log_line {}; for (int attempt = 0; attempt < MAX_LOG_CHECK_ATTEMPTS; ++attempt) { - proxysql_log.clear(proxysql_log.rdstate() & ~std::ios_base::failbit); + proxysql_log.clear(proxysql_log.rdstate() & ~std::ios_base::eofbit & ~std::ios_base::failbit); while (getline(proxysql_log, log_line)) { if (log_line.find(unique_secret) != string::npos) { leaked_secret = true;