Skip to content

Latest commit

 

History

History
104 lines (66 loc) · 3.63 KB

Appsv1DeploymentStatusLifecycleTest.md

File metadata and controls

104 lines (66 loc) · 3.63 KB

Progress [1/6]

Identifying an untested feature Using APISnoop

According to this APIsnoop query, there are still some remaining StatefulSet endpoints which are untested.

    SELECT
      endpoint,
      path,
      kind
      FROM testing.untested_stable_endpoint
      where eligible is true
      and endpoint ilike '%DeploymentStatus'
      order by kind, endpoint desc
      limit 10;
                  endpoint                 |                              path                              |    kind
  -----------------------------------------+----------------------------------------------------------------+------------
   replaceAppsV1NamespacedDeploymentStatus | /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status | Deployment
  (1 row)

API Reference and feature documentation

The mock test

Test outline

  1. Create a watch to track deployment events.

  2. Create a deployment with a static label. Confirm that the pods are running.

  3. Get the deployment status. Parse the response and confirm that the deployment status conditions can be listed.

  4. Update the deployment status. Confirm via the watch that the status has been updated.

  5. Patch the deployment status. Confirm via the watch that the status has been patched.

Test the functionality in Go

Using an existing status lifecycle test as a template for a new ginkgo test for deployment lifecycle test.

Verifying increase in coverage with APISnoop

Listing endpoints hit by the new e2e test

This query shows the endpoints hit within a short period of running the e2e test

select distinct  endpoint, right(useragent,65) AS useragent
from testing.audit_event
where endpoint ilike '%DeploymentStatus%'
and release_date::BIGINT > round(((EXTRACT(EPOCH FROM NOW()))::numeric)*1000,0) - 60000
and useragent like 'e2e%should%'
order by endpoint
limit 10;
                endpoint                 |                             useragent
-----------------------------------------+-------------------------------------------------------------------
 patchAppsV1NamespacedDeploymentStatus   | [sig-apps] Deployment should validate Deployment Status endpoints
 readAppsV1NamespacedDeploymentStatus    | [sig-apps] Deployment should validate Deployment Status endpoints
 replaceAppsV1NamespacedDeploymentStatus | [sig-apps] Deployment should validate Deployment Status endpoints
(3 rows)

Final notes

If a test with these calls gets merged, test coverage will go up by 1 points

This test is also created with the goal of conformance promotion.


/sig testing

/sig architecture

/area conformance