[
  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--yes",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--project-name",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--namespace",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--context",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },

  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--environmentVariable",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--environment",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--environment",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--general-options",
    "consoleValue": "--not-run",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "not": {}
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--cluster-coverage",
    "consoleValue": "--check-cluster-info",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "grep": {
        "testCommand": "kubectl cluster-info | grep \"Kubernetes\" | grep -v \"running\"",
        "assert": "",
        "reportCommand": "kubectl cluster-info"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--cluster-coverage",
    "consoleValue": "--check-nodes",
    "jestTestPath": "",
    "defaultValue": null,
    "testType": {
      "grep": {
        "testCommand": "kubectl get nodes | grep -v \"NAME\" | grep -v \"Ready\"",
        "assert": "",
        "reportCommand": "kubectl get nodes"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--cluster-coverage",
    "consoleValue": "--check-cluster",
    "jestTestPath": "",
    "defaultValue": null,
    "testType": {
      "grep": {
        "testCommand": "kubectl describe nodes | grep \"Ready\" | grep -v \"True\"",
        "assert": "",
        "reportCommand": "kubectl describe nodes | grep -A 6 \"Conditions\""
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--cluster-coverage",
    "consoleValue": "--check-disc",
    "jestTestPath": "",
    "defaultValue": null,
    "testType": {
      "grep": {
        "testCommand": "kubectl describe nodes | grep \"DiskPressure\" | grep -v \"False\"",
        "assert": "",
        "reportCommand": "kubectl describe nodes | grep \"DiskPressure\""
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--cluster-coverage",
    "consoleValue": "--check-memory",
    "jestTestPath": "",
    "defaultValue": null,
    "testType": {
      "grep": {
        "testCommand": "kubectl describe nodes | grep \"MemoryPressure\" | grep -v \"False\"",
        "assert": "",
        "reportCommand": "kubectl describe nodes | grep \"MemoryPressure\""
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--service-coverage",
    "consoleValue": "--check-pods-running",
    "jestTestPath": "",
    "defaultValue": null,
    "testType": {
      "grep": {
        "testCommand": "kubectl get pods --namespace=$$namespace | grep -v \"NAME\" | grep -v \"Running\"",
        "assert": "",
        "reportCommand": "kubectl get nodes --namespace=$$namespace"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--ingress-coverage",
    "consoleValue": "--check-ingress",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "checkIngress": {
        "testCommand": [
          {
            "test": "curl -v $$ingress  2>&1 | grep \"ERROR\"",
            "assert": "",
            "reportCommand": "curl -v $$ingress  2>&1"
          },
          {
            "test": "curl $$ingress  2>&1 | grep -E \"HTTP|<title>\" | grep -v \"doctype\" | grep \"5\"",
            "assert": "",
            "reportCommand": "curl $$ingress  2>&1 | grep -E \"HTTP|<title>\""
          },
          {
            "test": "curl -v $$ingress  2>&1 | grep \"Internal Server Error\"",
            "assert": "",
            "reportCommand": "curl $$ingress  2>&1 | grep -E \"HTTP|<title>\""
          }
        ]
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--service-coverage",
    "consoleValue": "--check-pods-logs",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "checkPodsLogs": {
        "testCommand": "kubectl logs --since=1h service/$$serviceName --namespace=$$namespace | grep -i \"error\"",
        "assert": "",
        "reportCommand": "kubectl logs --since=1h service/$$serviceName --namespace=$$namespace | tail -4"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--resource-up",
    "consoleValue": "--volumes-free-space",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "checkVolumes": {
        "testCommand": "kubectl --namespace=$$namespace exec service/$$service -- df -h --block-size=1GB $mountPath | awk \"{print $5}\" | grep -v \"Use%\"| sed \"s/%//\" | awk -F: \"$1>=90\"",
        "assert": "",
        "reportCommand": "kubectl --namespace=edutelling-develop exec service/edutelling-orientdb -- df -h --block-size=1GB /orientdb/databases",
        "failMessage": "The volume not have enough free space; VolumeSpace <= 90%"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--resource-up",
    "consoleValue": "--volumes-exist-files",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "checkVolumes": {
        "testCommand": "kubectl --namespace=$$namespace exec service/$$service  -- ls  $$mountPath | grep -i -c \"\"",
        "assert": "",
        "reportCommand": "kubectl --namespace=$$namespace exec service/$$service  -- ls $$mountPath",
        "failMessage": "The volume not have any files inside of the mountPath"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--endpoint-coverage",
    "consoleValue": "--curl-url",
    "mandatoryVariableValue": "--assert",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "checkCurl": {
        "testCommand": "kubectl --namespace=$$namespace  exec service/$$service  -- ls  $mountPath | grep -i -c ''",
        "assert": "",
        "reportCommand": "kubectl --namespace=$$namespace  exec service/$$service  -- ls $mountPath",
        "failMessage": "The volume not have any files inside of the mountPath"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--endpoint-coverage",
    "consoleValue": "--swagger-docs",
    "mandatoryVariableValue": "--swagger-docs",
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "swaggerDocs": {
        "testCommand": "kubectl --namespace=$$namespace  exec service/$$service  -- ls  $mountPath | grep -i -c ''",
        "assert": "",
        "reportCommand": "kubectl --namespace=$$namespace  exec service/$$service  -- ls $mountPath",
        "failMessage": "The volume not have any files inside of the mountPath"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--endpoint-coverage",
    "consoleValue": "--curl-assert",
    "mandatoryVariableValue": true,
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "simpleCurlAssert": {
        "testCommand": "eval",
        "assert": "200",
        "reportCommand": "eval",
        "failMessage": "The request have one value 500 or internal server error"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--endpoint-coverage",
    "consoleValue": "--swagger-login-curl",
    "mandatoryVariableValue": true,
    "defaultValue": null,
    "jestTestPath": "",
    "testType": {
      "swaggerDocs2": {
        "testCommand": "eval",
        "assert": "200",
        "reportCommand": "eval",
        "failMessage": "The request have one value 500 or internal server error"
      }
    }
  },
  {
    "SMKTEST_ENV": "",
    "criterial": "--service-coverage",
    "consoleValue": "--execution-unit-coverage",
    "jestTestPath": "",
    "defaultValue": null,
    "testType": {
      "grep": {
        "testCommand": "get pods --namespace=$$namespace | grep -v \"NAME\" | grep -v \"Running\"",
        "assert": "",
        "reportCommand": "get pods --namespace=$$namespace"
      }
    }
  }
]
