src/modular/lib/modular_config/modular_config_unittest.cc
// Test that ModularConfigReader uses default values if it fails to read the config data from file.
Test that ModularConfigReader uses default values if it fails to read the config data from file.
Test that ModularConfigReader uses default values if it fails to read the config data from file .
TEST_F(ModularConfigReaderTest, FailToReadConfigDir) {
  modular::PseudoDirServer server(std::make_unique<vfs::PseudoDir>());
  modular::ModularConfigReader reader(server.OpenAt("."));
  auto config = reader.GetBasemgrConfig();
  EXPECT_EQ(modular_config::kDefaultSessionShellUrl,
            config.session_shell_map().at(0).config().app_config().url());
}
TEST_F ( ModularConfigReaderTest , FailToReadConfigDir ) { modular :: PseudoDirServer server ( std :: make_unique < vfs :: PseudoDir > ( ) ) ; modular :: ModularConfigReader reader ( server . OpenAt ( " " ) ) ; auto config = reader . GetBasemgrConfig ( ) ; EXPECT_EQ ( modular_config :: kDefaultSessionShellUrl , config . session_shell_map ( ) . at ( 0 ) . config ( ) . app_config ( ) . url ( ) ) ; }
Test that ModularConfigReader uses default values if it fails to read the config data from file.
Test that ModularConfigReader uses default values if it fails to read the config data from file .
// Create a root directory without a config file.