@@ -1258,6 +1258,9 @@ TEST_F(ConfigTestFixture, SensorPublishInvalidConfigAddr)
1258
1258
PlainConfig config;
1259
1259
config.LoadFromJson (jsonView);
1260
1260
1261
+ #if defined(EXCLUDE_SENSOR_PUBLISH)
1262
+ GTEST_SKIP ();
1263
+ #endif
1261
1264
ASSERT_FALSE (config.Validate ()); // Invalid permissions on addr.
1262
1265
ASSERT_TRUE (config.sensorPublish .enabled );
1263
1266
ASSERT_EQ (config.sensorPublish .settings .size (), 1 );
@@ -1290,6 +1293,9 @@ TEST_F(ConfigTestFixture, SensorPublishInvalidConfigMqttTopicEmpty)
1290
1293
PlainConfig config;
1291
1294
config.LoadFromJson (jsonView);
1292
1295
1296
+ #if defined(EXCLUDE_SENSOR_PUBLISH)
1297
+ GTEST_SKIP ();
1298
+ #endif
1293
1299
ASSERT_FALSE (config.Validate ()); // Empty mqtt_topic.
1294
1300
ASSERT_TRUE (config.sensorPublish .enabled );
1295
1301
ASSERT_EQ (config.sensorPublish .settings .size (), 1 );
@@ -1322,6 +1328,9 @@ TEST_F(ConfigTestFixture, SensorPublishInvalidConfigMqttTopic)
1322
1328
PlainConfig config;
1323
1329
config.LoadFromJson (jsonView);
1324
1330
1331
+ #if defined(EXCLUDE_SENSOR_PUBLISH)
1332
+ GTEST_SKIP ();
1333
+ #endif
1325
1334
ASSERT_FALSE (config.Validate ()); // Invalid mqtt_topic.
1326
1335
ASSERT_TRUE (config.sensorPublish .enabled );
1327
1336
ASSERT_EQ (config.sensorPublish .settings .size (), 1 );
@@ -1354,6 +1363,9 @@ TEST_F(ConfigTestFixture, SensorPublishInvalidConfigEomDelimiter)
1354
1363
PlainConfig config;
1355
1364
config.LoadFromJson (jsonView);
1356
1365
1366
+ #if defined(EXCLUDE_SENSOR_PUBLISH)
1367
+ GTEST_SKIP ();
1368
+ #endif
1357
1369
ASSERT_FALSE (config.Validate ()); // Invalid eom_delimiter.
1358
1370
ASSERT_TRUE (config.sensorPublish .enabled );
1359
1371
ASSERT_EQ (config.sensorPublish .settings .size (), 1 );
@@ -1390,6 +1402,9 @@ TEST_F(ConfigTestFixture, SensorPublishInvalidConfigNegativeIntegers)
1390
1402
PlainConfig config;
1391
1403
config.LoadFromJson (jsonView);
1392
1404
1405
+ #if defined(EXCLUDE_SENSOR_PUBLISH)
1406
+ GTEST_SKIP ();
1407
+ #endif
1393
1408
ASSERT_FALSE (config.Validate ()); // Invalid integer values.
1394
1409
ASSERT_TRUE (config.sensorPublish .enabled );
1395
1410
ASSERT_EQ (config.sensorPublish .settings .size (), 1 );
@@ -1423,6 +1438,9 @@ TEST_F(ConfigTestFixture, SensorPublishInvalidConfigBufferCapacityTooSmall)
1423
1438
PlainConfig config;
1424
1439
config.LoadFromJson (jsonView);
1425
1440
1441
+ #if defined(EXCLUDE_SENSOR_PUBLISH)
1442
+ GTEST_SKIP ();
1443
+ #endif
1426
1444
ASSERT_FALSE (config.Validate ()); // Buffer capacity too small.
1427
1445
ASSERT_TRUE (config.sensorPublish .enabled );
1428
1446
ASSERT_EQ (config.sensorPublish .settings .size (), 1 );
@@ -1456,6 +1474,9 @@ TEST_F(ConfigTestFixture, SensorPublishDisableFeature)
1456
1474
PlainConfig config;
1457
1475
config.LoadFromJson (jsonView);
1458
1476
1477
+ #if defined(EXCLUDE_SENSOR_PUBLISH)
1478
+ GTEST_SKIP ();
1479
+ #endif
1459
1480
ASSERT_FALSE (config.Validate ()); // All sensors disabled, then disable feature.
1460
1481
ASSERT_FALSE (config.sensorPublish .enabled );
1461
1482
ASSERT_EQ (config.sensorPublish .settings .size (), 1 );
0 commit comments