...
This document is divided into 3 parts. At first, we will introduce the basic infrastructure about our test framework. Secondly, we will introduce some test cases about IEC environments and user cases. Finally, we will give our testing result about it.
Akarino Test Group Information
Currently, 2 or 3 virtual hosts will be deployed on arm64 platform by compass or fuel tools. For the baremetal server on which will be deployed virtual hosts, it must meet those hardware and software requirements. In addition, the Internet is essential for the CI platform.
...
Hardware Information:
CPU Archtecture | Memory | Hard disk | Network |
Arm64 | At least 16G | 500G | 1Gbps (Internet essential) |
Software Information:
kubectl | kubeadm | Kubelet | Kubenetes-cni | Docker-ce | Calico | OS |
1.13.0 | 1.13.0 | 1.13.0 | 0.6.0 | 18.06.1~ce | V3.3 | Ubuntu 16.04 |
Overall Test Architecture
The following picture describes the overall testing environment deployed by Compass/Fuel tools. For the whole environment, there are some virtual hosts which will be deployed on baremetal host. One is jumper host which is used for running the k8s deployment scripts. Others are K8s nodes which will be deployed K8s with Calico. For each of virtual host, there are 2 NICs with 1Gbps, one is for Internet, the other is for internal connection. The specific information please reference:
...
Attention: Only the Arm64 platform was deployed in community CI platform so far.
Test API description
The IEC project tests can be divided into 2 parts. The first part is about IEC platform tests which is used for testing the basic function of Kubernetes and Container Networking interface (CNI). And the second part is Feature tests which is about IEC functional test for verifying IEC user cases.
Platform tests
In IEC project, there are 2 cases in Platform test. One is about service deployment test by Nginx server. The other is the K8s smoke check.
Deployment case
For the deployment check on K8s, the Nginx server will be deployed by “kubectl” command on k8s nodes. Until the Nginx is running, the reply from Nginx pods will be checked. This test will verify the K8s basic function by deploying simple Nginx server. By deploying a simple Nginx server, it could check the basic server function and network function of Kubernetes.
And you can manually run start it from iec/src/foundation/scripts/nginx.sh scripts shell.
The Test inputs
There should be a nginx.yaml configuration files which is used for deploying the nginx Nginx pods.
Test Procedure
Expected output
By wget command on master node, it can get the http service from the Nginx server deployed in K8s cluster. Just as follows:The test is completed by a script which located at iec project. At first, the program start a Nginx server based on nginx.yaml file. After the status of Nginx pods are OK, it will send a wget request to the Nginx server port for getting the reply. If there is a reply, it will be checked automaticly and restored in local database. At last, all the resources about it will be deleted by "kubectl" command.
Expected output
The script will get the information from the Nginx service IP for checking. Just as follows:
wget -O /dev/null "http://serviceIP"
Test Results
If correct, it will return OK, otherwise is Error.
...
The second case is K8s healthcheck which is used for checking the Kubernetes environments. It creates a Guestbook application that contains redis server, 2 instances of redis slave, frontend application, frontend service and redis master service and redis slave service. The test will write an entry into the guestbook application which will store the entry into the backend redis database. Application flow must work as expected and the data written must be available to read. In the end, you can directly run it from iec/src/foundation/scripts/functest.sh scripts shell.
The Test inputs
No input
Test Procedure
Expected output
...
Feature Tests
The feature tests are still going on developing now.
Test Dashboards
Single pane view of how the test score looks like for the Blue print.
Total Tests | Test Executed | Pass | Fail | In Progress |
---|---|---|---|---|
2 | 2 | 2 | 0 | 1 |
...