config_ut.cpp 559 B

1234567891011121314151617181920
  1. #include <library/cpp/testing/unittest/registar.h>
  2. #include <yt/cpp/mapreduce/interface/config.h>
  3. using namespace NYT;
  4. Y_UNIT_TEST_SUITE(ConfigSuite)
  5. {
  6. Y_UNIT_TEST(TestReset) {
  7. // very limited test, checks only one config field
  8. auto origConfig = *TConfig::Get();
  9. TConfig::Get()->Reset();
  10. UNIT_ASSERT_VALUES_EQUAL(origConfig.Hosts, TConfig::Get()->Hosts);
  11. TConfig::Get()->Hosts = "hosts/fb867";
  12. TConfig::Get()->Reset();
  13. UNIT_ASSERT_VALUES_EQUAL(origConfig.Hosts, TConfig::Get()->Hosts);
  14. }
  15. }