update_engine: Deprecate EOL Status

This is not used anymore. It has been replaced by date based EOL.

It has been deprecated from Chrome per CL:1891467

BUG=chromium:1005511
TEST=sudo FEATURES=test emerge update_engine-client update_engine

Change-Id: I047ca8d641906208728e89adb7c430b71ab11239
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1891571
Tested-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 94d5152..b66375f 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -1992,27 +1992,6 @@
   ASSERT_TRUE(TestUpdateCheck());
 }
 
-TEST_F(OmahaRequestActionTest, ParseUpdateCheckAttributesTest) {
-  // Test that the "eol" flags is only parsed from the "_eol" attribute and not
-  // the "eol" attribute.
-  tuc_params_.http_response =
-      "<?xml version=\"1.0\" encoding=\"UTF-8\"?><response "
-      "protocol=\"3.0\"><app appid=\"foo\" status=\"ok\">"
-      "<ping status=\"ok\"/><updatecheck status=\"noupdate\" "
-      "_eol=\"security-only\" eol=\"eol\" _foo=\"bar\"/></app></response>";
-  tuc_params_.expected_check_result = metrics::CheckResult::kNoUpdateAvailable;
-  tuc_params_.expected_check_reaction = metrics::CheckReaction::kUnset;
-
-  ASSERT_TRUE(TestUpdateCheck());
-
-  string eol_pref;
-  EXPECT_TRUE(
-      fake_system_state_.prefs()->GetString(kPrefsOmahaEolStatus, &eol_pref));
-  // Note that the eol="eol" attribute should be ignored and the _eol should be
-  // used instead.
-  EXPECT_EQ("security-only", eol_pref);
-}
-
 TEST_F(OmahaRequestActionTest, NoUniqueIDTest) {
   tuc_params_.http_response = "invalid xml>";
   tuc_params_.expected_code = ErrorCode::kOmahaRequestXMLParseError;
@@ -2810,62 +2789,51 @@
   EXPECT_EQ(string::npos, post_str.find("requisition"));
 }
 
-TEST_F(OmahaRequestActionTest, PersistEolDatesTest) {
+TEST_F(OmahaRequestActionTest, PersistEolDateTest) {
   tuc_params_.http_response =
       "<?xml version=\"1.0\" encoding=\"UTF-8\"?><response "
       "protocol=\"3.0\"><app appid=\"foo\" status=\"ok\">"
       "<ping status=\"ok\"/><updatecheck status=\"noupdate\" "
-      "_eol=\"supported\" _eol_date=\"200\" "
+      "_eol_date=\"200\" _foo=\"bar\"/></app></response>";
+  tuc_params_.expected_check_result = metrics::CheckResult::kNoUpdateAvailable;
+  tuc_params_.expected_check_reaction = metrics::CheckReaction::kUnset;
+
+  ASSERT_TRUE(TestUpdateCheck());
+
+  string eol_date;
+  EXPECT_TRUE(
+      fake_system_state_.prefs()->GetString(kPrefsOmahaEolDate, &eol_date));
+  EXPECT_EQ("200", eol_date);
+}
+
+TEST_F(OmahaRequestActionTest, PersistEolMissingDateTest) {
+  tuc_params_.http_response =
+      "<?xml version=\"1.0\" encoding=\"UTF-8\"?><response "
+      "protocol=\"3.0\"><app appid=\"foo\" status=\"ok\">"
+      "<ping status=\"ok\"/><updatecheck status=\"noupdate\" "
       "_foo=\"bar\"/></app></response>";
   tuc_params_.expected_check_result = metrics::CheckResult::kNoUpdateAvailable;
   tuc_params_.expected_check_reaction = metrics::CheckReaction::kUnset;
 
   ASSERT_TRUE(TestUpdateCheck());
 
-  string eol, eol_date;
-  EXPECT_TRUE(
-      fake_system_state_.prefs()->GetString(kPrefsOmahaEolStatus, &eol));
-  EXPECT_EQ(kEolStatusSupported, eol);
-  EXPECT_TRUE(
-      fake_system_state_.prefs()->GetString(kPrefsOmahaEolDate, &eol_date));
-  EXPECT_EQ("200", eol_date);
-}
-
-TEST_F(OmahaRequestActionTest, PersistEolMissingDatesTest) {
-  tuc_params_.http_response =
-      "<?xml version=\"1.0\" encoding=\"UTF-8\"?><response "
-      "protocol=\"3.0\"><app appid=\"foo\" status=\"ok\">"
-      "<ping status=\"ok\"/><updatecheck status=\"noupdate\" "
-      "_eol=\"supported\" _foo=\"bar\"/></app></response>";
-  tuc_params_.expected_check_result = metrics::CheckResult::kNoUpdateAvailable;
-  tuc_params_.expected_check_reaction = metrics::CheckReaction::kUnset;
-
-  ASSERT_TRUE(TestUpdateCheck());
-
-  string eol, eol_date;
-  EXPECT_TRUE(
-      fake_system_state_.prefs()->GetString(kPrefsOmahaEolStatus, &eol));
-  EXPECT_EQ(kEolStatusSupported, eol);
+  string eol_date;
   EXPECT_FALSE(
       fake_system_state_.prefs()->GetString(kPrefsOmahaEolDate, &eol_date));
 }
 
-TEST_F(OmahaRequestActionTest, PersistEolBadDatesTest) {
+TEST_F(OmahaRequestActionTest, PersistEolBadDateTest) {
   tuc_params_.http_response =
       "<?xml version=\"1.0\" encoding=\"UTF-8\"?><response "
       "protocol=\"3.0\"><app appid=\"foo\" status=\"ok\">"
       "<ping status=\"ok\"/><updatecheck status=\"noupdate\" "
-      "_eol=\"supported\" _eol_date=\"bad\" "
-      "foo=\"bar\"/></app></response>";
+      "_eol_date=\"bad\" foo=\"bar\"/></app></response>";
   tuc_params_.expected_check_result = metrics::CheckResult::kNoUpdateAvailable;
   tuc_params_.expected_check_reaction = metrics::CheckReaction::kUnset;
 
   ASSERT_TRUE(TestUpdateCheck());
 
-  string eol, eol_date;
-  EXPECT_TRUE(
-      fake_system_state_.prefs()->GetString(kPrefsOmahaEolStatus, &eol));
-  EXPECT_EQ(kEolStatusSupported, eol);
+  string eol_date;
   EXPECT_TRUE(
       fake_system_state_.prefs()->GetString(kPrefsOmahaEolDate, &eol_date));
   EXPECT_EQ(kEolDateInvalid, StringToEolDate(eol_date));