CN2 Pipelines Test Case Descriptions
SUMMARY This section provides the complete list of solution test cases with descriptions of what each test case is performing.
For more details about the test operations in a customer environment, see CN2 Pipelines Solution Test Architecture and Design.
Architect Onboard
Architect onboard is a Day 1 operation and includes the following test case.
test_create_namespaces: : all profiles
For each profile, this test creates a webservice instance and all of the required namespaces.
Architect Execute
Architect execute is a Day-to-Day operation and includes the following test cases.
- 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
This test updates the GlobalVrouterConfig (GVC) with the localhost service, other multiple services, and one service with multiple fabric IP addresses. This test validates the link local service. When test is complete, original link local service set is restored.
test_validate_mesh_virtual_network_router
This test removes all imports from all virtual network routers (VNR)s, so that routes are not advertised. Then all the other VNRs are added to each other's VNRs. This creates a mesh of all three layers—frontend, middleware, and backend. The test updates the NetworkPolicy, VNR type, and VN label selector. When test is complete, reset the VNRs as specified by the profile.
test_update_namespace_label
This test updates namespace label from name=ns1
to
name=ns2
. The corresponding VirtualNetworkRouter objects
and namespaceSelector are updated. When test is complete, original settings are
restored.
test_validate_hub_spoke_virtual_network_router
This test converts middleware layer to a hub VNR. Also, converts frontend and backend layers to spoke VNRs. Next the test validates updates to the hub VNR, backend VNR, meta label, and import statements. When test is complete, the configurations are reset to the baseline profile defined.
test_update_forwarding_mode_on_namespace
This test validates forwarding mode on namespace by setting forwarding mode to
ip-fabric
and fabric-snat
. When test is
complete, forwarding mode is reset to original mode.
test_update_fabric_forwarding_on_external_vn
This test enables fabric forwarding on the external virtual network (VN). When fabric forwarding is validated, fabric forwarding is reset on the original external VN.
Architect Teardown
Architect teardown is a maintenance and workload decommissioning operation. Includes the following test case.
test_teardown_namespaces: all profiles
This test tears down the namespaces for each profile in the use case profiles.
SRE Onboard
Site Reliability Engineering (SRE) onboard is a Day 1 operation and includes the following test case.
test_onboard_services: all profiles
For each profile in the use case profiles, create a number of instances and sets up deployment, services, and traffic generator for each instance. This test validates onboarding services for all profiles.
SRE Execute
Site Reliability Engineering (SRE) execute is a Day-to-Day operation and includes the following test cases.
- 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
This test validates the HTTP liveness probe failure and Exec liveness probe failure.
test_update_cluster_ip_service
This test creates new middleware pods as a replica of existing ones. The Selector and NetworkPolicy are updated with additional ports. Target port, service port, and service mappings are updated and tested. The ClusterIP service is validated for updates. When test is complete, the newly created set of middleware pods are deleted and the ClusterIP selector is reset.
test_update_nodeport_service
This test creates new frontend pods as a replica of existing ones. The Selector and NetworkPolicy are updated with additional ports. Target port, service port, and service mappings are updated and tested. The NodePort service is validated for updates. When test is complete, the newly created set of middleware pods are deleted and the NodePort selector is reset.
test_update_service_type
Update service type from LoadBalancer
to
NodePort
. This test validates updating the service type.
When test is complete, service type is reset back to
LoadBalancer
.
test_update_ingress_network_policy
This test changes the NetworkPolicy ingress rules from match on podLabel to match on namespaceLabel. All traffic is denied, then allowed. A new NetworkPolicy is added with an exception rule, such as exception for specific IP address. Rule includes three filters—namespaceSelector, podSelector, and AddressBlock. This test validates updating the ingress network policy. When test is complete, rules are reset to the rules specified by the profile.
test_update_egress_network_policy
This test changes the NetworkPolicy egress rules from match on
ip_block
to match on namespaceLabel
. All
traffic is denied, then allowed. A new NetworkPolicy is added with an exception
rule, such as an exception for a specific IP address. The rule includes three
filters—namespaceSelector, podSelector, and AddressBlock. The test validates
updating the egress network policy. When test is complete, rules are reset to
the rules specified by the profile.
test_update_network_policy_policy_types
This test modifies PolicyTypes to deny all incoming, deny all outgoing, then deny both incoming and outgoing traffic. This test validates updating the network policy PolicyTypes. When test is complete, rules are reset to the rules specified by the profile.
test_update_loadbalancer_service_general_properties
This test creates new frontend pods as a replica of existing ones. The Selector is updated with new labels and the NetworkPolicy is updated with additional ports. Target port, service port, session affinity, external policy, service mappings are updated for testing. When the test of updates to the load balancer general properties is complete, the newly created set of frontend pods are deleted and Selectors are reset to previously existing labels as a test case teardown.
test_validate_allowed_address_pair_failover
This test triggers Virtual Router Redundancy Protocol (VRRP) master switchover.
The test configures Allowed Address Pairs (AAP) mode as
active-active
. This test validates allowed address pair
failover. When complete, AAP and VRRP are reset to original settings.
test_validate_allowed_address_pair_update
This test updates AAP IP from x to y and updates AAP IP to have multiple addresses. This test validates allowed address pair updates.
test_update_lb_service_static_public_vn
This test creates a VN (new-public-vn
) under the service
namespace with a custom public RT1 assigned. Also, configures Juniper Networks®
MX Series 5G Universal Routing Platform (MX) with routing instance and route
targets with the same VN properties. A new LoadBalancer service is created and
updated with the ExternalIP (both IPv4 and IPv6). This test then validates
traffic, validates service, and validates updating the namespace annotation.
When test is complete, the namespace annotations are reset to the original
value. All services created during the test are deleted.
test_update_ingress_service
This test creates an additional service for the frontend pods, then updates the service selector label of ingress backend from old service to a new service. Multiple service paths are included in the ingress specification. After the test validates the update to the ingress service, the newly created ingress service is deleted. The original ingress service is restored.
test_update_label_of_public_network
This test updates the custom public networks label from
local==public-test
to
local==unselect-public-vn
. Existing service should not be
affected. Next the test creates a new LoadBalancer service and resets the label
to local==public-test
. The new LoadBalancer service gets a
public IP address and is accessible from the Internet endpoint. This tests
updating the public networks label and the new service is deleted.
test_update_label_of_pods
This test updates the pod label, corresponding service, and NetworkPolicy selectors. After the test is complete, the pod label, corresponding service, and NetworkPolicy selectors are reset to original settings.
SRE teardown
Site Reliability Engineering (SRE) teardown is a maintenance and workload decommissioning operation. This phase tears down and deletes the SRE objects created during the onboard phase.
test_teardown_services
This test deletes SRE objects created during the SRE onboard phase.