ADD: added container class and adapted test

This commit is contained in:
Henry Winkel
2024-03-14 09:46:37 +01:00
parent 37627a16ca
commit b645005aeb
11 changed files with 219 additions and 70 deletions

View File

@@ -11,7 +11,7 @@
#include "loguru.hpp"
SCENARIO("Testing the SimCore Sensor")
SCENARIO("Testing KubePod")
{
@@ -25,7 +25,7 @@ SCENARIO("Testing the SimCore Sensor")
std::string controller = "controller";
std::string type = "ship";
std::string image = "ship:latest";
kubecontrol::KubePod ShipPod1(controller,uuid,type,image,"simulator");
kubecontrol::KubePod ShipPod1("controller",uuid,type,image,"simulator");
ShipPod1.setName(name);
nlohmann::json vars;
@@ -74,8 +74,8 @@ nlohmann::json vars1;
vars["ENTITY_SENSORS"].push_back("radar:latest");
ShipPod2.setEnvironmentVar("CONFIG", vars1.dump());
auto envmaps2 = std::make_shared<std::map<std::string, std::string>>();
envmaps2->emplace("CONFIG", vars1.dump());
auto envmaps2 = std::map<std::string, std::string>();
envmaps2.emplace("CONFIG", vars1.dump());
ShipPod2.addContainer("CMS", "systemprototype:latest",envmaps2);

View File

@@ -12,7 +12,7 @@
#include <kubecontrol/kubecontrol.hpp>
#include <loguru.hpp>
SCENARIO("Testing the SimCore Sensor")
SCENARIO("Testing the kubecontrol")
{
std::string file= "../docs/config";
kubecontrol::kubecontrol kubecontroler(file);

View File

@@ -95,7 +95,7 @@ void createScenario(kubecontrol::PodController* podc,std::vector<std::string> *u
SCENARIO("Testing the SimCore Sensor")
SCENARIO("Testing massiv pod handling")
{

View File

@@ -12,7 +12,7 @@
#include <crossguid/guid.hpp>
SCENARIO("Testing the SimCore Sensor")
SCENARIO("Testing podcontroler ")
{
@@ -20,10 +20,9 @@ kubecontrol::PodController podc("docs/config");
std::string name = "test1";
std::string uuid = name;
std::string owner = "controller";
std::string type = "ship";
std::string image = "ship:latest";
kubecontrol::KubePod ShipPod1(owner,uuid,type,image,"simulator");
kubecontrol::KubePod ShipPod1("controller",uuid,type,image,"simulator");
nlohmann::json vars;
vars["ENTITY_ID"] = uuid;