Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Alexander Afanasyev | c0e2658 | 2017-08-13 21:16:49 -0400 | [diff] [blame] | 2 | /* |
Davide Pesavento | 164ae3b | 2023-11-11 22:00:23 -0500 | [diff] [blame] | 3 | * Copyright (c) 2014-2023, Regents of the University of California. |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 4 | * |
| 5 | * This file is part of NDN repo-ng (Next generation of NDN repository). |
| 6 | * See AUTHORS.md for complete list of repo-ng authors and contributors. |
| 7 | * |
| 8 | * repo-ng is free software: you can redistribute it and/or modify it under the terms |
| 9 | * of the GNU General Public License as published by the Free Software Foundation, |
| 10 | * either version 3 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * repo-ng is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 13 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 | * PURPOSE. See the GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along with |
| 17 | * repo-ng, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
| 20 | #ifndef REPO_TESTS_INTEGRATED_COMMAND_FIXTURE_HPP |
| 21 | #define REPO_TESTS_INTEGRATED_COMMAND_FIXTURE_HPP |
| 22 | |
| 23 | #include "../identity-management-fixture.hpp" |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 24 | |
Davide Pesavento | 1190406 | 2022-04-14 22:33:28 -0400 | [diff] [blame] | 25 | #include <ndn-cxx/mgmt/dispatcher.hpp> |
| 26 | #include <ndn-cxx/security/validator-config.hpp> |
| 27 | |
| 28 | namespace repo::tests { |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 29 | |
| 30 | class CommandFixture : public virtual IdentityManagementFixture |
| 31 | { |
| 32 | protected: |
Davide Pesavento | 164ae3b | 2023-11-11 22:00:23 -0500 | [diff] [blame] | 33 | CommandFixture() |
| 34 | { |
| 35 | addIdentity("/ndn/test/repo"); |
| 36 | saveIdentityCertificate("/ndn/test/repo", "tests/integrated/insert-delete-test.cert"); |
| 37 | validator.load("tests/integrated/insert-delete-validator-config.conf"); |
| 38 | } |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 39 | |
| 40 | protected: |
| 41 | Face repoFace; |
Davide Pesavento | 164ae3b | 2023-11-11 22:00:23 -0500 | [diff] [blame] | 42 | Scheduler scheduler{repoFace.getIoContext()}; |
| 43 | ndn::mgmt::Dispatcher dispatcher{repoFace, m_keyChain}; |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 44 | /// \todo #4091 switch to ValidatorPolicyConf and load insert-delete-validator-config.conf |
Davide Pesavento | 164ae3b | 2023-11-11 22:00:23 -0500 | [diff] [blame] | 45 | ndn::security::ValidatorConfig validator{repoFace}; |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 46 | }; |
| 47 | |
Davide Pesavento | 1190406 | 2022-04-14 22:33:28 -0400 | [diff] [blame] | 48 | } // namespace repo::tests |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 49 | |
| 50 | #endif // REPO_TESTS_INTEGRATED_COMMAND_FIXTURE_HPP |