ADD: added a podcontroller and test for the first basic usage

This commit is contained in:
Henry Winkel
2023-08-08 15:09:18 +02:00
parent 1c4c883648
commit 5f043ca88e
13 changed files with 196 additions and 192 deletions

View File

@@ -1,25 +1,44 @@
#include "kubecontrol/KubePod.hpp"
#include "nlohmann/json_fwd.hpp"
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <kubecontrol/PodController.hpp>
#include <crossguid/guid.hpp>
SCENARIO("Testing the SimCore Sensor")
{
kubecontrol::PodController podc("../docs/config");
kubecontrol::PodController podc("docs/config");
kubecontrol::KubePod pod1("pod1",xg::newGuid().str(),"debugdebianhenry:0.1.3");
kubecontrol::KubePod pod2("pod2",xg::newGuid().str(),"debugdebianhenry:0.1.3");
podc.startPod(pod1);
podc.startPod(pod2);
std::string info1 = "";
info1 = podc.getInfoForPod("pod1");
nlohmann::json j1 = nlohmann::json::parse(info1);
nlohmann::json jall = nlohmann::json::parse(podc.getPodsInfo());
// podc.stopAllPods();
GIVEN("different Attributes for a Track in different forms")
{
LOG_S(INFO)<< podc.getServerAddress();
WHEN("constructing Track Object with data")
{
THEN("check if Track attributes are correct")
{
REQUIRE(true == true);
// REQUIRE(info1 != "");