/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2014-2021,  Regents of the University of California,
 *                           Arizona Board of Regents,
 *                           Colorado State University,
 *                           University Pierre & Marie Curie, Sorbonne University,
 *                           Washington University in St. Louis,
 *                           Beijing Institute of Technology,
 *                           The University of Memphis.
 *
 * This file is part of NFD (Named Data Networking Forwarding Daemon).
 * See AUTHORS.md for complete list of NFD authors and contributors.
 *
 * NFD is free software: you can redistribute it and/or modify it under the terms
 * of the GNU General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 *
 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "nfdc/strategy-choice-module.hpp"

#include "execute-command-fixture.hpp"
#include "status-fixture.hpp"

namespace nfd {
namespace tools {
namespace nfdc {
namespace tests {

BOOST_AUTO_TEST_SUITE(Nfdc)
BOOST_AUTO_TEST_SUITE(TestStrategyChoiceModule)

class StrategyListFixture : public ExecuteCommandFixture
{
protected:
  bool
  respondStrategyChoiceDataset(const Interest& interest)
  {
    if (!Name("/localhost/nfd/strategy-choice/list").isPrefixOf(interest.getName())) {
      return false;
    }

    StrategyChoice entry1;
    entry1.setName("/");
    entry1.setStrategy(Name("/strategyP").appendVersion(1));

    StrategyChoice entry2;
    entry2.setName("/52VRvpL9/Yqfut4TNHv");
    entry2.setStrategy(Name("/strategyQ").appendVersion(2));

    this->sendDataset(interest.getName(), entry1, entry2);
    return true;
  }
};

BOOST_FIXTURE_TEST_SUITE(ListCommand, StrategyListFixture)

BOOST_AUTO_TEST_CASE(Normal)
{
  this->processInterest = [this] (const Interest& interest) {
    BOOST_CHECK(this->respondStrategyChoiceDataset(interest));
  };

  this->execute("strategy list");
  BOOST_CHECK_EQUAL(exitCode, 0);
  BOOST_CHECK(out.is_equal("prefix=/ strategy=/strategyP/v=1\n"
                           "prefix=/52VRvpL9/Yqfut4TNHv strategy=/strategyQ/v=2\n"));
  BOOST_CHECK(err.is_empty());
}

BOOST_AUTO_TEST_CASE(ErrorDataset)
{
  this->processInterest = nullptr; // no response to dataset or command

  this->execute("strategy list");
  BOOST_CHECK_EQUAL(exitCode, 1);
  BOOST_CHECK(out.is_empty());
  BOOST_CHECK(err.is_equal("Error 10060 when fetching strategy choice dataset: Timeout exceeded\n"));
}

BOOST_AUTO_TEST_SUITE_END() // ListCommand

BOOST_FIXTURE_TEST_SUITE(ShowCommand, StrategyListFixture)

BOOST_AUTO_TEST_CASE(NormalDefaultStrategy)
{
  this->processInterest = [this] (const Interest& interest) {
    BOOST_CHECK(this->respondStrategyChoiceDataset(interest));
  };

  this->execute("strategy show /I1Ixgg0X");
  BOOST_CHECK_EQUAL(exitCode, 0);
  BOOST_CHECK(out.is_equal("  prefix=/\n"
                           "strategy=/strategyP/v=1\n"));
  BOOST_CHECK(err.is_empty());
}

BOOST_AUTO_TEST_CASE(NormalNonDefaultStrategy)
{
  this->processInterest = [this] (const Interest& interest) {
    BOOST_CHECK(this->respondStrategyChoiceDataset(interest));
  };

  this->execute("strategy show /52VRvpL9/Yqfut4TNHv/Y5gY7gom");
  BOOST_CHECK_EQUAL(exitCode, 0);
  BOOST_CHECK(out.is_equal("  prefix=/52VRvpL9/Yqfut4TNHv\n"
                           "strategy=/strategyQ/v=2\n"));
  BOOST_CHECK(err.is_empty());
}

BOOST_AUTO_TEST_CASE(ErrorDataset)
{
  this->processInterest = nullptr; // no response to dataset or command

  this->execute("strategy show /xVoIhNsJ");
  BOOST_CHECK_EQUAL(exitCode, 1);
  BOOST_CHECK(out.is_empty());
  BOOST_CHECK(err.is_equal("Error 10060 when fetching strategy choice dataset: Timeout exceeded\n"));
}

BOOST_AUTO_TEST_SUITE_END() // ShowCommand

BOOST_FIXTURE_TEST_SUITE(SetCommand, ExecuteCommandFixture)

BOOST_AUTO_TEST_CASE(Normal)
{
  this->processInterest = [this] (const Interest& interest) {
    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/strategy-choice/set");
    BOOST_REQUIRE(req.hasName());
    BOOST_CHECK_EQUAL(req.getName(), "/VBXSJg3m/XYs81ARNhx");
    BOOST_REQUIRE(req.hasStrategy());
    BOOST_CHECK_EQUAL(req.getStrategy(), "/strategyP");

    ControlParameters resp;
    resp.setName("/VBXSJg3m/XYs81ARNhx");
    resp.setStrategy(Name("/strategyP").appendVersion(5));
    this->succeedCommand(interest, resp);
  };

  this->execute("strategy set /VBXSJg3m/XYs81ARNhx /strategyP");
  BOOST_CHECK_EQUAL(exitCode, 0);
  BOOST_CHECK(out.is_equal("strategy-set prefix=/VBXSJg3m/XYs81ARNhx strategy=/strategyP/v=5\n"));
  BOOST_CHECK(err.is_empty());
}

BOOST_AUTO_TEST_CASE(UnknownStrategy)
{
  this->processInterest = [this] (const Interest& interest) {
    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/strategy-choice/set");

    ControlParameters resp;
    this->failCommand(interest, 404, "strategy not found");
  };

  this->execute("strategy set /zezRSP1I /strategyQ");
  BOOST_CHECK_EQUAL(exitCode, 7);
  BOOST_CHECK(out.is_empty());
  BOOST_CHECK(err.is_equal("Unknown strategy: /strategyQ\n"));
}

BOOST_AUTO_TEST_CASE(ErrorCommand)
{
  this->processInterest = nullptr; // no response to command

  this->execute("strategy set /LJdNFfQJ8 /strategyP");
  BOOST_CHECK_EQUAL(exitCode, 1);
  BOOST_CHECK(out.is_empty());
  BOOST_CHECK(err.is_equal("Error 10060 when setting strategy: request timed out\n"));
}

BOOST_AUTO_TEST_SUITE_END() // SetCommand

BOOST_FIXTURE_TEST_SUITE(UnsetCommand, ExecuteCommandFixture)

BOOST_AUTO_TEST_CASE(Normal)
{
  this->processInterest = [this] (const Interest& interest) {
    ControlParameters req = MOCK_NFD_MGMT_REQUIRE_COMMAND_IS("/localhost/nfd/strategy-choice/unset");
    BOOST_REQUIRE(req.hasName());
    BOOST_CHECK_EQUAL(req.getName(), "/CFVecryP");

    ControlParameters resp;
    resp.setName("/CFVecryP");
    this->succeedCommand(interest, resp);
  };

  this->execute("strategy unset /CFVecryP");
  BOOST_CHECK_EQUAL(exitCode, 0);
  BOOST_CHECK(out.is_equal("strategy-unset prefix=/CFVecryP\n"));
  BOOST_CHECK(err.is_empty());
}

BOOST_AUTO_TEST_CASE(CannotUnsetDefault)
{
  this->processInterest = [] (const Interest&) {
    BOOST_ERROR("unexpected command");
  };

  this->execute("strategy unset /");
  BOOST_CHECK_EQUAL(exitCode, 2);
  BOOST_CHECK(out.is_empty());
  BOOST_CHECK(err.is_equal("Unsetting default strategy is prohibited\n"));
}

BOOST_AUTO_TEST_CASE(ErrorCommand)
{
  this->processInterest = nullptr; // no response to command

  this->execute("strategy unset /GQcEsG96");
  BOOST_CHECK_EQUAL(exitCode, 1);
  BOOST_CHECK(out.is_empty());
  BOOST_CHECK(err.is_equal("Error 10060 when unsetting strategy: request timed out\n"));
}

BOOST_AUTO_TEST_SUITE_END() // UnsetCommand

const std::string STATUS_XML = stripXmlSpaces(R"XML(
  <strategyChoices>
    <strategyChoice>
      <namespace>/</namespace>
      <strategy>
        <name>/localhost/nfd/strategy/best-route/v=4</name>
      </strategy>
    </strategyChoice>
    <strategyChoice>
      <namespace>/localhost</namespace>
      <strategy>
        <name>/localhost/nfd/strategy/multicast/v=4</name>
      </strategy>
    </strategyChoice>
  </strategyChoices>
)XML");

const std::string STATUS_TEXT = std::string(R"TEXT(
Strategy choices:
  prefix=/ strategy=/localhost/nfd/strategy/best-route/v=4
  prefix=/localhost strategy=/localhost/nfd/strategy/multicast/v=4
)TEXT").substr(1);

BOOST_FIXTURE_TEST_CASE(Status, StatusFixture<StrategyChoiceModule>)
{
  this->fetchStatus();
  StrategyChoice payload1;
  payload1.setName("/")
          .setStrategy(Name("/localhost/nfd/strategy/best-route").appendVersion(4));
  StrategyChoice payload2;
  payload2.setName("/localhost")
          .setStrategy(Name("/localhost/nfd/strategy/multicast").appendVersion(4));
  this->sendDataset("/localhost/nfd/strategy-choice/list", payload1, payload2);
  this->prepareStatusOutput();

  BOOST_CHECK(statusXml.is_equal(STATUS_XML));
  BOOST_CHECK(statusText.is_equal(STATUS_TEXT));
}

BOOST_AUTO_TEST_SUITE_END() // TestStrategyChoiceModule
BOOST_AUTO_TEST_SUITE_END() // Nfdc

} // namespace tests
} // namespace nfdc
} // namespace tools
} // namespace nfd
