Removed assertions about logs that have been removed

This commit is contained in:
2025-07-15 10:33:51 -05:00
parent b78519aa55
commit 928f4a2543

View File

@ -31,8 +31,6 @@ import java.util.stream.Collectors;
import com.kingsrook.qqq.backend.core.BaseTest; import com.kingsrook.qqq.backend.core.BaseTest;
import com.kingsrook.qqq.backend.core.context.QContext; import com.kingsrook.qqq.backend.core.context.QContext;
import com.kingsrook.qqq.backend.core.exceptions.QException; import com.kingsrook.qqq.backend.core.exceptions.QException;
import com.kingsrook.qqq.backend.core.logging.QCollectingLogger;
import com.kingsrook.qqq.backend.core.logging.QLogger;
import com.kingsrook.qqq.backend.core.model.actions.metadata.MetaDataInput; import com.kingsrook.qqq.backend.core.model.actions.metadata.MetaDataInput;
import com.kingsrook.qqq.backend.core.model.actions.metadata.MetaDataOutput; import com.kingsrook.qqq.backend.core.model.actions.metadata.MetaDataOutput;
import com.kingsrook.qqq.backend.core.model.metadata.QInstance; import com.kingsrook.qqq.backend.core.model.metadata.QInstance;
@ -367,8 +365,6 @@ class MetaDataActionTest extends BaseTest
@Deprecated(since = "migrated to metaDataCustomizer") @Deprecated(since = "migrated to metaDataCustomizer")
void testFilter() throws QException void testFilter() throws QException
{ {
QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(MetaDataAction.class);
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// run default version, and assert tables are found // // run default version, and assert tables are found //
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
@ -379,7 +375,6 @@ class MetaDataActionTest extends BaseTest
// run again (with the same instance as before) to assert about memoization of the filter based on the QInstance // // run again (with the same instance as before) to assert about memoization of the filter based on the QInstance //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
new MetaDataAction().execute(new MetaDataInput()); new MetaDataAction().execute(new MetaDataInput());
assertThat(collectingLogger.getCollectedMessages()).filteredOn(clm -> clm.getMessage().contains("Using new default")).hasSize(1);
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
// set up new instance to use a custom filter, to deny all // // set up new instance to use a custom filter, to deny all //
@ -398,9 +393,6 @@ class MetaDataActionTest extends BaseTest
// run again (with the same instance as before) to assert about memoization of the filter based on the QInstance // // run again (with the same instance as before) to assert about memoization of the filter based on the QInstance //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
new MetaDataAction().execute(new MetaDataInput()); new MetaDataAction().execute(new MetaDataInput());
assertThat(collectingLogger.getCollectedMessages()).filteredOn(clm -> clm.getMessage().contains("actionCustomizer (via metaDataFilter reference) of type: DenyAllFilter")).hasSize(1);
QLogger.deactivateCollectingLoggerForClass(MetaDataAction.class);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// run now with the AllowAllFilter, confirm we get tables // // run now with the AllowAllFilter, confirm we get tables //
@ -420,8 +412,6 @@ class MetaDataActionTest extends BaseTest
@Test @Test
void testCustomizer() throws QException void testCustomizer() throws QException
{ {
QCollectingLogger collectingLogger = QLogger.activateCollectingLoggerForClass(MetaDataAction.class);
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// run default version, and assert tables are found // // run default version, and assert tables are found //
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
@ -432,7 +422,6 @@ class MetaDataActionTest extends BaseTest
// run again (with the same instance as before) to assert about memoization of the filter based on the QInstance // // run again (with the same instance as before) to assert about memoization of the filter based on the QInstance //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
new MetaDataAction().execute(new MetaDataInput()); new MetaDataAction().execute(new MetaDataInput());
assertThat(collectingLogger.getCollectedMessages()).filteredOn(clm -> clm.getMessage().contains("Using new default")).hasSize(1);
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
// set up new instance to use a custom filter, to deny all // // set up new instance to use a custom filter, to deny all //
@ -449,11 +438,9 @@ class MetaDataActionTest extends BaseTest
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// run again (with the same instance as before) to assert about memoization of the filter based on the QInstance // // run again (with the same instance as before) to assert about memoization of the filter based on the QInstance //
// mmm, we stopped loggin about it, so, we'll... assume the memoization is good //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
new MetaDataAction().execute(new MetaDataInput()); new MetaDataAction().execute(new MetaDataInput());
assertThat(collectingLogger.getCollectedMessages()).filteredOn(clm -> clm.getMessage().contains("meta-data actionCustomizer of type: DenyAllFilteringCustomizer")).hasSize(1);
QLogger.deactivateCollectingLoggerForClass(MetaDataAction.class);
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
// run now with the DefaultNoopMetaDataActionCustomizer, confirm we get tables // // run now with the DefaultNoopMetaDataActionCustomizer, confirm we get tables //