#define CATCH_CONFIG_MAIN
#include <string>
#include <catch2/catch.hpp>

#include <loguru.hpp>
#include <kubecontrol/KubePod.hpp>
#include <crossguid/guid.hpp>

SCENARIO("Testing the SimCore Sensor")
{
  
  GIVEN("different Attributes for a Track in different forms")
  {

    std::string api = "https://192.168.252.5:6443/api/v1/namespaces/hwinkel/pods/";
    std::string token = "eyJhbGciOiJSUzI1NiIsImtpZCI6InJwN2R3a2NEWHJva0ptLVNFUnAxMnUxNEF3VUdmdURRTmw5VWZuM0NCZ3MifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJod2lua2VsIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6Imh3aW5rZWwtc2VjcmV0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imh3aW5rZWwiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJmNDNkNTc5NS1lNDFhLTQxOTYtODVkMS01YmNkZGIxNzFkYjkiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6aHdpbmtlbDpod2lua2VsIn0.TQCBkEIY0sEQjpy-3BP1SdXl94Ct-oAeD4VGNEOJEzDYBuU4Cn1fG32k2wAIgZemh6P-DcBhPk0VtCWCLYhWWwIe6FNo3FpqOxcDbu8QHlyD-Y3VnfSzKRHg9OKgUSWnc_Z5P9iBtilNQxnZp_wLOBW6TL8ZeECxeVtBBxUpYfoywSWS7mNpwxHcecP_U__LUU1tP7pYZ8OgDiSIH04CaTrQisTL-FGdcqOEYQhx4zoOyVQFWWYkfjG9oD-5zjtS29O0gckfvKLOu2y_K6RVR51szsquiJiHP1s_AcS-qq1-rXRqEpYRsLxRxr-dflL3aAjnLlPSYCwheQhjCa0fjQ";
    auto guid = xg::newGuid();
    std::string uuid = guid.str();
    // int random =  rand() % 100 + 1;
    
    // std::string uuid = "random" + std::to_string(random);

    kubecontrol::KubePod pod1("debug-debian",uuid,"debugdebianhenry:0.1.3");
    pod1.setEnvironmentVar("OWN_SHIP_SERVER", "127.0.0.1");
    LOG_S(INFO)<<pod1.createYAML();

    LOG_S(INFO)<<pod1.start(api,token);
    LOG_S(INFO)<< pod1.getInfo(api, token);
    // pod1.stop(api,token);

    WHEN("constructing Track Object with data")
    {
       
      THEN("check if Track attributes are correct")
      {
        REQUIRE(true == true);
       




      } //THEN
    } // WHEN
  } // GIVEN
} //SCENARIO