influxdata / Litmus

testing framework
0 stars 0 forks source link

Create Smoke test(s) for 2.0 #87

Closed gshif closed 5 years ago

gshif commented 6 years ago

There is no E2E test(s) for 2.0. Currently, only integration tests for gateway and etcd components ( to create/edit/delete/show users/organizations/buckets) exist. Need to create E2E test(s) that touches all of the components (or almost all the components with the exception of the ones that are not yet working - such as tasks)

gshif commented 6 years ago

litmus_run_master script has been already checking the status of the following services by calling http://<gateway>:9999/healthz rest api:

  1. Need to add check for the rest of the components to the litmus_run_master script, i.e.:

    • storage (status checked by queryd)
    • etcd-tasks
    • tasks
    • transpilerde
        curl -GET http://localhost:8098/healthz
    
       {
          "status": "healthy",
          "checks": [
               {
                      "name": "internal",
                      "status": "healthy"
                }
                          ]
        }
     curl -GET http://localhost:8093/healthz

    {
         "status": "healthy",
         "checks": [
                {
                    "name": "internal",
                    "status": "healthy"
                },
                {
                    "name": "storage",
                     "status": "healthy",
                     "checks": [
                               {
                                   "name": "partition 0",
                                  "status": "healthy",
                                  "checks": [
                                         {
                                              "status": "healthy",
                                              "message": "connection state to storage-0.storage:8082 is READY"
                                         }
                                                   ]
                                 }
                                        ]
              }
                               ]
     }
gshif commented 6 years ago

tasks and etcd-task services health check is not implemented yet. Need to ask the tasks team what is the correct url.

gshif commented 6 years ago
gshif commented 6 years ago
  1. Smoke E2E test:
    • Create an Organization. Check organization has been successfully created.
    • Create a bucket for the created organization. Check bucket has been successfully created.
    • Create a user. Check user was successfully created.
    • Give user permissions to write to a bucket and read from the same bucket.
    • Write data to a bucket. (Would be nice to check kafka got the data). Check data was written to one of the storage partitions.
    • Query written data using queryd.
    • Query written data using transpilerde.
    • Query written data using gateway. In the future querying data with three different services will be divided into three different test cases.
gshif commented 6 years ago
  1. Smoke test for tasks service. Has two parts:
    • Health Check of the task and task-etcd services. It is not implemented to be used remotely. Have created an issue for task team to expose the service to the outside world as it is done for other services. The workaround is to get to the telegraf container in the tasks pod and run a health check locally, i.e.: curl -vv -GET http://localhost:8276/health. The example output (when task service is not healthy):
    • Trying 127.0.0.1...
    • TCP_NODELAY set
    • Connected to localhost (127.0.0.1) port 8276 (#0)

      GET /health HTTP/1.1 Host: localhost:8276 User-Agent: curl/7.52.1 Accept: /

      < HTTP/1.1 503 Service Unavailable < Date: Fri, 09 Nov 2018 21:36:36 GMT < Content-Length: 225 < Content-Type: text/plain; charset=utf-8 < { "status": "unhealthy", "checks": [ { "name": "internal", "status": "healthy" }, { "name": "etcdStore", "status": "unhealthy", "message": "underlying session closed" } ] }

    • Curl_http_done: called premature == 0
    • Connection #0 to host localhost left intact
      
      or
{
  "status": "healthy",
  "checks": [
    {
      "name": "internal",
      "status": "healthy"
    },
    {
      "name": "etcdStore",
      "status": "healthy"
    }
  ]
}
gshif commented 5 years ago
gshif commented 5 years ago

I am using health endpoint to check the health of the tasks, i.e. if tasks is not connected to etcd-tasks, then task cannot really be created, but, to the best of my knowledge, if queryd or kafka is unhealthy, tasks can still queue the task(s) to be executed.

gshif commented 5 years ago
gshif commented 5 years ago

Once the platform(influxdb) code is merged into idpe, the smoke tests would have to be revised due to changes in rest api. Once merge happens, the separate issue would be created to track the work required to make smoke test work again.