ADD: added central kubernetes api class
This commit is contained in:
@@ -42,22 +42,33 @@ std::string uuid = name;
|
||||
|
||||
// kubecontrol::KubePod pod2("Pod2",xg::newGuid().str(),"debugdebianhenry:0.1.3");
|
||||
|
||||
// pod1.setArgs("-c");
|
||||
// pod1.setArgs("while true; do echo hello; sleep 5;done");
|
||||
// pod2.setArgs("-c");
|
||||
// pod2.setArgs("while true; do echo hello; sleep 5;done");
|
||||
|
||||
// pod1.setCommand("/bin/sh");
|
||||
// pod2.setCommand("/bin/sh");
|
||||
// podc.startPod(pod2);
|
||||
|
||||
LOG_S(INFO)<<"Starting";
|
||||
|
||||
podc.startPod(ShipPod1);
|
||||
// podc.startPod(pod2);
|
||||
LOG_S(INFO)<<"started";
|
||||
|
||||
std::string info1 = "";
|
||||
info1 = podc.getInfoForPod("hamburg");
|
||||
nlohmann::json j1 = nlohmann::json::parse(info1);
|
||||
// info1 = podc.getInfoForPod("hamburg");
|
||||
// nlohmann::json j1 = nlohmann::json::parse(info1);
|
||||
|
||||
nlohmann::json jall = nlohmann::json::parse(podc.getPodsInfo());
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
|
||||
|
||||
podc.stopAllPods();
|
||||
// podc.checkPodsHierarchy();
|
||||
// LOG_S(INFO)<<podc.PodList_.size();;
|
||||
// for(auto i: podc.PodList_)
|
||||
// {
|
||||
// LOG_S(INFO)<< i.InfoPod.Uuid;
|
||||
// LOG_S(INFO)<< i.InfoPod.ToString();
|
||||
|
||||
// }
|
||||
|
||||
// nlohmann::json jall = nlohmann::json::parse(podc.getPodsInfo());
|
||||
|
||||
GIVEN("different Attributes for a Track in different forms")
|
||||
{
|
||||
@@ -66,8 +77,11 @@ podc.stopAllPods();
|
||||
|
||||
THEN("check if Track attributes are correct")
|
||||
{
|
||||
REQUIRE(true == true);
|
||||
REQUIRE(podc.getListOfChildPods() == 1);
|
||||
|
||||
LOG_S(INFO)<<"Stopping";
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
|
||||
podc.stopAllPods();
|
||||
// REQUIRE(info1 != "");
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user