CN2 Pipeline Test Case Descriptions
SUMMARY This section provides the complete list of solution test cases with descriptions of what the test case is performing.
Architect Onboard
test_create_namespaces: : all profiles
-
For each profile in the use case profiles, create a webservice instance.
-
Inside the webservice instance, create all the required namespaces.
Architect Execute
- test_validate_link_local_service
- test_validate_mesh_virtual_network_router
- test_update_namespace_label
- test_validate_hub_spoke_virtual_network_router
- test_update_forwarding_mode_on_namespace
- test_update_fabric_forwarding_on_external_vn
test_validate_link_local_service
-
Update GlobalVrouterConfig (GVC) with the localhost service.
-
Update GVC with multiple services and with one service having multiple fabric IP addresses.
-
Delete the newly added LLS service.
-
Restore the original LLS set.
test_validate_mesh_virtual_network_router
-
Remove all imports from all virtual network routers (VNR)s. Routes should not be advertised.
-
Add all the other VNRs to each other VNRs. Creates mesh of all three layers.
-
Update NetworkPolicy so that backend can talk to frontend.
-
Cascading VNR, remove the direct import of VNRs between frontend and backend.
-
Negative test of updating the VNR type from mesh to hub.
-
Update the virtual network (VN) label selector of middleware service VNR.
-
Remove the added VN label selector.
-
Update the VNR label of middleware service VNR.
-
Reset the VNRs as specified by the profile.
test_update_namespace_label
-
Update labels of namespace from
name=ns1
toname=ns2
. -
Update the corresponding VirtualNetworkRouter objects.
-
Update namespaceSelector in the backend NetworkPolicy rule.
-
Reset the Namespace label, VNR selectors, and NetworkPolicy selector.
test_validate_hub_spoke_virtual_network_router
-
Convert middleware to hub VNR. Convert frontend and backend to spoke VNR.
-
Create new mesh VNRs and interconnect all.
-
Delete the middleware hub VNR and recreate the same later in the process.
-
Add dummy VN label to backend spoke VNR (Negative).
-
Revert back to the proper VN label.
-
Update backend VNR as hub VNR (Negative).
-
Update backend VNR as mesh VNR (Negative).
-
Delete the newly created mesh VNR.
-
Create a new hub VNR for middleware pod network without any import statements.
-
Remove middleware pod network label from original hub VNR.
-
Update the duplicate hub VNR with the import of the backend spoke VNR.
-
Update backend spoke VNR with new middleware pod hub VNR.
-
Change metadata label on new middleware VNR.
-
Update import statements of backend spoke VNR
-
Create a custom VN matching the backend VN label.
-
Update custom VN label to dummy so traffic should fail.
-
Remove the labels from backend VNR so all the VNs in the namespace are selected.
-
Reset the configurations to the baseline profile defined.
test_update_forwarding_mode_on_namespace
-
Set annotations forwarding mode to false (no
ip-fabric
orfabric-snat
). -
Set forwarding mode to
ip-fabric
. -
Set forwarding mode to
fabric-snat
. -
Reset forwarding mode to original forwarding mode.
test_update_fabric_forwarding_on_external_vn
-
Enable fabric forwarding on external VN.
-
Reset fabric forwarding on external VN.
Architect Teardown
test_teardown_namespaces: all profiles
-
For each profile in the use case profiles, teardown the namespaces.
SRE Onboard
test_onboard_services: all profiles
-
For each profile in use case profiles, create number of instances mentioned by count.
-
Setup deployment, services, and traffic generator for each instance.
SRE Execute
- test_modify_liveness_probe
- test_update_cluster_ip_service
- test_update_nodeport_service
- test_update_service_type
- test_update_ingress_network_policy
- test_update_egress_network_policy
- test_update_network_policy_policy_types
- test_update_loadbalancer_service_general_properties
- test_validate_allowed_address_pair_failover
- test_validate_allowed_address_pair_update
- test_update_lb_service_static_public_vn
- test_update_ingress_service
- test_update_label_of_public_network
- test_update_label_of_pods
test_modify_liveness_probe
-
Validate HTTP liveness probe failure.
-
Validate Exec liveness probe failure.
test_update_cluster_ip_service
-
Create new middleware pods as a replica of existing ones.
-
Update selector in NetworkPolicy and Service.
-
Update NetworkPolicy with additional ports.
-
Update the target port from
9091
to9092
. -
Update the service port from
9091
to9090
. -
Update protocol of ClusterIP from
TCP
toUDP
. -
Remove the newly added service UDP/9090/9092.
-
Multiple services mapping to the same podSelector label.
-
Delete the newly created set of middleware pods and set the ClusterIP selector.
test_update_nodeport_service
-
Create new frontend pods as a replica of existing ones.
-
Update selector with new labels.
-
Update NetworkPolicy with additional ports.
-
Update the target port from 9091 to 9092.
-
Update the service port from 9091 to 9090.
-
Update session affinity of the ClientIP service to a specific pod.
-
Update external policy to
local
. -
Remove the newly added service TCP/9090/9092.
-
Multiple services mapping to the same podSelector label.
-
Update NodePort port from x to x+1 and validate the traffic.
-
Delete the newly created set of frontend pods and set the ClusterIP selector.
test_update_service_type
-
Update service type from
LoadBalancer
toNodePort
. -
Reset the service type back to
LoadBalancer
. -
Update the service type from
ClusterIP
toNodePort
. -
Reset the service type back to
ClusterIP
.
test_update_ingress_network_policy
-
Change the NetworkPolicy ingress rules from match on podLabel to namespaceLabel.
-
Delete all the ingress rules. Frontend to middleware traffic will be dropped - deny all.
-
Update the ingress to list of Empty dictionaries (Allow all traffic).
-
Add back the ingress PolicyType and ingress rules.
-
Add ingress rule with ipBlock - CIDR information. (Update podSelector to ipBlock alone - /16).
-
New NetworkPolicy with
ip_block cidr
and exception rule. -
Update the rule such as exception for a specific IP address. (Deny from one of the frontend pods alone).
-
Update the rule so that rule has all of the three filters namespaceSelector, podSelector, and AddressBlock.
-
Reset the rules to rules specified by the profile.
test_update_egress_network_policy
-
Change the NetworkPolicy egress rules from match on
ip_block
tonamespaceLabel
. -
Delete all the egress rules. (Middleware to backend traffic will be dropped - deny all).
-
Update the egress to list of Empty dictionaries. (Allow all traffic).
-
Add back the egress PolicyType and egress rules.
-
Update the rule such as except a specific IP address. (Deny to backend service).
-
New NetworkPolicy for same podSelector but allow the except address.
-
Update the rule so that rule has all of the three filters namespaceSelector, podSelector, and AddressBlock.
-
Reset the rules to rules specified by the profile.
test_update_network_policy_policy_types
-
Modify PolicyTypes to have ingress alone. (Deny all outgoing.)
-
Modify PolicyTypes to have egress alone. (Deny all incoming.)
-
Modify PolicyTypes to have none of the policy types. (Deny all incoming and outgoing.)
-
Reset the rules to rules specified by the profile.
test_update_loadbalancer_service_general_properties
-
Create new frontend pods as a replica of existing ones.
-
Update selector with new labels.
-
Update NetworkPolicy with additional ports.
-
Update the target port from
9091
to9092
. -
Update the service port from
9091
to9090
. -
Update session affinity of ClientIP to a specific pod.
-
Update external policy to
local
. -
Remove the newly added service TCP/9090/9092.
-
Multiple services mapping to the same podSelector label.
-
Delete the newly created set of frontend pods and reset selectors to previously existing labels as a test case teardown.
test_validate_allowed_address_pair_failover
-
Trigger Virtual Router Redundancy Protocol (VRRP) master switchover.
-
Configure Allowed Address Pairs (AAP) mode as
active-active
. -
Reset AAP mode to
active-backup
. -
Reset VRRP master status.
test_validate_allowed_address_pair_update
-
Update AAP IP from x to y.
-
Update AAP IP to have multiple addresses.
test_update_lb_service_static_public_vn
-
Create a VN (
new-public-vn
) under the service namespace with custom public RT1 assigned. Also, configure Juniper Networks® MX Series 5G Universal Routing Platform (MX) with routing instance and route targets with the same VN properties. -
Create a VN (
new-public-vn
) under default namespace with custom public RT2 assigned and configure MX accordingly. -
Update the namespace annotations ExternalNetwork to default
new-public-vn
. -
Create a new LoadBalancer service with annotations ExternalNetwork and value as
new-public-vn
. -
Update ExternalIP on the LoadBalancer service (both IPv4 and IPv6).
-
Delete the LoadBalancer service and validate.
-
Create a service without any annotation specified and validate traffic.
-
Exhaust the IP address on the IPv4 IP addresses on the public subnet by creating dummy LoadBalancer services.
-
Create one more service and check if service is in pending state as the IP address pool is exhausted.
-
Delete one of the dummy LoadBalancer services.
-
Validate the service which was created in Step 9.
-
Update Namespace annotation
external-virtual-network
tonew-public-vn
(without namespace). -
Create a service without any annotation specified and validate traffic.
-
Reset the namespace annotations to original value.
-
Delete all services.
test_update_ingress_service
-
Create additional service for frontend.
-
Update the service selector label of ingress backend from old service to new service.
-
Have multiple service paths mentioned in the ingress specification.
-
Remove one of the paths.
-
Delete the ingress service.
-
Recreate the ingress service.
test_update_label_of_public_network
-
Update custom public networks label from
local==public-test
tolocal==unselect-public-vn
. Existing service should not be affected. -
Create a new LoadBalancer service with
service.contrail.juniper.net/externalNetworkSelector=custom-external-in-service-namespace annotation
set. New service moves to pending state. -
Reset the label to
local==public-test
. The new service created in Step 2 will get a public IP address and is accessible from the Internet endpoint. -
Delete the new service.
test_update_label_of_pods
-
Update pod label, corresponding service, and NetworkPolicy selectors.
-
Reset pod label, corresponding service, and NetworkPolicy selectors.
SRE teardown
test_teardown_services
-
Delete SRE objects created during the SRE onboard phase.