config_ut.cpp 455 B

1234567891011121314151617
  1. #include <library/cpp/testing/gtest/gtest.h>
  2. #include <yt/cpp/mapreduce/interface/config.h>
  3. using namespace NYT;
  4. TEST(TConfigTest, Reset) {
  5. // Very limited test, checks only one config field.
  6. auto origConfig = *TConfig::Get();
  7. TConfig::Get()->Reset();
  8. EXPECT_EQ(origConfig.Hosts, TConfig::Get()->Hosts);
  9. TConfig::Get()->Hosts = "hosts/fb867";
  10. TConfig::Get()->Reset();
  11. EXPECT_EQ(origConfig.Hosts, TConfig::Get()->Hosts);
  12. }