Address review feedback and create no-infra TAP group

- Fix retry loop in admin_set_credentials_logging-t.cpp to clear eofbit (CodeRabbit)
- Fix spelling in lib/Admin_Handler.cpp (CodeRabbit)
- Create new 'no-infra-g1' TAP group in groups.json
- Add 'tests_no_infra' target to Makefiles to run tests without backends
pull/5457/head
Rene Cannao 2 months ago
parent 14ac53379a
commit 4517edea78

@ -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;

@ -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)

@ -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" ]

@ -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

@ -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;

Loading…
Cancel
Save