Add warnings provider to settings

This commit is contained in:
Dan Paulat 2024-04-25 22:24:10 -05:00
parent ea19de3e5f
commit 5ee2d10a1b
8 changed files with 234 additions and 144 deletions

View file

@ -8,7 +8,7 @@ namespace provider
{
static const std::string& kDefaultUrl {"https://warnings.allisonhouse.com"};
static const std::string& kAlternateUrl {"http://warnings.cod.edu"};
static const std::string& kAlternateUrl {"https://warnings.cod.edu"};
class WarningsProviderTest : public testing::TestWithParam<std::string>
{
@ -19,6 +19,12 @@ TEST_P(WarningsProviderTest, ListFiles)
auto [newObjects, totalObjects] = provider.ListFiles();
// No objects, skip test
if (totalObjects == 0)
{
GTEST_SKIP();
}
EXPECT_GT(newObjects, 0);
EXPECT_GT(totalObjects, 0);
EXPECT_EQ(newObjects, totalObjects);
@ -31,6 +37,12 @@ TEST_P(WarningsProviderTest, LoadUpdatedFiles)
auto [newObjects, totalObjects] = provider.ListFiles();
auto updatedFiles = provider.LoadUpdatedFiles();
// No objects, skip test
if (totalObjects == 0)
{
GTEST_SKIP();
}
EXPECT_GT(newObjects, 0);
EXPECT_GT(totalObjects, 0);
EXPECT_EQ(newObjects, totalObjects);