Skip to content

Commit

Permalink
update the test suites, messages, prompts, etc used in spytest (sonic…
Browse files Browse the repository at this point in the history
…-net#8930)

* update the test suites, messages, prompts, params and error patterns used in spytest

* fixes for pre-commit fails

* fixes for pre-commit fails-2

* fixes for pre-commit fails-3

* removed commented portion

* avoid changes in pre-commit-config

* remove !include usage to fix pre-commit check-yaml issues

---------

Co-authored-by: Rama Sasthri, Kristipati <rama.kristipati@broadcom.com>
  • Loading branch information
ramakristipati and ramakristipatibrcm authored Aug 11, 2023
1 parent dc18bff commit 2070b18
Show file tree
Hide file tree
Showing 31 changed files with 2,197 additions and 322 deletions.
3 changes: 2 additions & 1 deletion spytest/ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
interpreter_python = auto_legacy_silent
host_key_checking = False
ssh_args = -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
remote_tmp = /tmp/.ansible/tmp
local_tmp = /tmp/.ansible/tmp

[ssh_connection]
pipelining = True
control_path = /tmp/ansible-ssh-%%h-%%p-%%r

38 changes: 21 additions & 17 deletions spytest/datastore/messages/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ test_case_passed: Test case Passed.
test_case_failed: Test case Failed.
test_case_failed_msg: Test case Failed {}
test_case_failure_message: .{}.
show_system_status_not_ready: "show system status is not ready in time"
system_status_not_ready: system status is not ready in time
test_execution_skipped: Test case execution is skipped {}
test_case_not_executed: Test case Not Executed.
test_case_not_executeds: Test case Not Executed(s).
test_case_not_executed_s_service: Test case Not Executed(s) - Required service parameters is not defined - {}.
test_case_result_with_count: Test cases Passed {} failed {}.
test_case_unsupported: Test case Unsupported.
test_case_unsupported: Test case Unsupported {}
msg: '{}'
operation_successful : The operation is successful
operation_failed : The operation is failed
operation_failed : The operation is failed.
operation_failed_msg : The operation is failed {}
invalid_value: The given value {} for {} is invalid
cmds_apply_ok : commands apply successful
exception_file_line: Exception in file {} at line {}
exception_name_file_line: Exception {} in file {} at line {}
command_failed_recovered_using_ctrlc: Command '{}' failed to give prompt, recovered using CTRL+C
command_failed_recovered_using_cr: Command '{}' failed to give required prompt, recovered using CR
command_failed_silent_crash: Command '{}' failed to give required prompt, silent crash
simultaneous_commands: Commands should not be executed on same device simultaneously
min_topology_fail: Minimum Topology Check Failed {}
pertest_topology_fail: Per Test Topology Check Failed {}
Expand All @@ -44,15 +45,18 @@ console_hang_observed: Console hang observed. Exiting.
console_hang_reset_recovered: Console hang observed. Recovered with Console Reset
console_hang_rps_recovered: Console hang observed. Recovered with RPS reboot
console_hang_node_dead: Console hang observed. Dead Node
onie_stuck_dead: Stuck in ONIE. Dead Node
onie_stuck_recovered_reboot: Stuck in ONIE. Recovered with reboot
entry_not_found: Entry not found
invalid_traffic_stats: Invalid traffic statistics
failed_traffic_verification: Traffic Validation Failed
failed_traffic_verification: Traffic Validation Failed {}
pfc_counters_not_initialized: PFC counters are not initialized even after {} seconds
exception_observed: Exception observed - {}
empty_values_observed: Observed empty values for some fields
error_string_found: Error {} found in log file {}
counters_are_not_initilaized: DUT counters are not initialized
module_not_supported: Module not supported on {}
command_not_supported: Command not supported {}
rest_call_failed: Rest {} failed
service_operation_status: Service {} {} {}.

Expand All @@ -72,10 +76,11 @@ base_config_verification_failed: base configuration verification failed
module_config_failed: module configuration failed. {}
module_unconfig_failed: module unconfiguration failed. {}
module_config_verification_failed: module configuration verification failed
pretest_config_failed: pre-test configuration failed
pretest_config_failed: pre-test configuration failed {}

config_cmd_error: config command '{}' failed
critical_syncd_exited: Process syncd exited unxepectedly
critical_xcvrd_exited: Process xcvrd exited unexpectedly
critical_orchagent_exited: Process orchagent exited unxepectedly
critical_vlanmgrd_exited: Process vlanmgrd exited unxepectedly
critical_terminated_by_sigabrt: terminated by SIGABRT
Expand All @@ -89,20 +94,19 @@ test_case_id_failed: testcase {} Failed

system_not_ready: System not ready

uicli_pass: Successfully verified CLI tests in '{}'. Commands passed '{}' and failed '{}'.
uicli_fail: Failed to verify CLI tests in '{}'. Commands passed '{}' and failed '{}'.
uicli_tc_status: KLISH '{}' '{}'

uirest_pass: Successfully verified REST tests in '{}'. Rest calls passed '{}' and failed '{}'.
uirest_fail: Failed to verify REST tests in '{}'. Rest calls passed '{}' and failed '{}'.
uirest_tc_status: REST '{}' '{}'

uignmi_pass: Successfully verified GNMI tests in '{}'. GNMI calls passed '{}' and failed '{}'.
uignmi_fail: Failed to verify GNMI tests in '{}'. GNMI calls passed '{}' and failed '{}'.
uignmi_tc_status: GNMI '{}' '{}'

module_unsupported: Module {} unsupported
required_params_not_provided: Required parameters not provided

unexpected_syslog_msg: Unexpected message is seen in syslog {}
unexpected_cores_seen: Unexpected core files seen {}
unexpected_kdump_seen: Unexpected kdump files seen {}

version_data_not_found: version data not found for {}
gnmi_unsupported_on_platforms: gNMI unsupported on {} platforms.

ui_unsupported: UI '{}' unsupported {}

docker_image_installation: docker image creation {}
docker_run: docker run {}

redis_db_authentication_enabled_status: Verification of redis-db authentication enabled - {}
3 changes: 3 additions & 0 deletions spytest/datastore/messages/debug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#DropCounters
Dropcounter_failed: Failed to Verify Drop Counter for '{}'
Dropcounter_passed: Succeesfully Verified Drop Counter for '{}'
2 changes: 0 additions & 2 deletions spytest/datastore/messages/gearbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ daemon_not_found: Daemon {} not found
record_not_found: Record {} not found
key_found: Key {} found with {} data.
key_not_found: Key {} not found with {} data.


25 changes: 13 additions & 12 deletions spytest/datastore/messages/messages.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
common: !include common.yaml
tgen: !include tgen.yaml
routing: !include routing.yaml
testbed: !include testbed.yaml
qos: !include qos.yaml
system: !include system.yaml
switching: !include switching.yaml
security: !include security.yaml
gearbox: !include gearbox.yaml
ut_snmp: !include ut_snmp.yaml
ut_kdump: !include ut_kdump.yaml
common: "!include common.yaml"
tgen: "!include tgen.yaml"
routing: "!include routing.yaml"
testbed: "!include testbed.yaml"
qos: "!include qos.yaml"
system: "!include system.yaml"
switching: "!include switching.yaml"
security: "!include security.yaml"
gearbox: "!include gearbox.yaml"
debug: "!include debug.yaml"
ut_snmp: "!include ut_snmp.yaml"
ut_kdump: "!include ut_kdump.yaml"

messages:
default: [common, tgen, routing, testbed, qos, system, switching, security, gearbox, ut_snmp, ut_kdump]
default: [common, tgen, routing, testbed, qos, system, switching, security, gearbox, ut_snmp, ut_kdump, debug]
7 changes: 4 additions & 3 deletions spytest/datastore/messages/qos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ clear_acl_counter_fail: Failed to clear acl counter for rule-{} in ACL-{}
verify_clear_acl_counter_fail: ACL counter for rule-{} in acl-{} is not cleared even after the clear operation
acl_counter_output_update_fail: The contents in show acl counters are not updated for the ACL rule {}
verify_acl_rule_delete_fail: ACL rule-{} under the acl-{} is not erased as per the configuration
traffic_failed_as_per_the_drop_rule: Failed to drop traffic as per the configured drop rule
traffic_failed_as_per_the_drop_rule: Failed to drop traffic as per the configured drop rule
traffic_success_as_per_the_drop_rule: Succesfully dropped the traffic as per the configured ACL rule.
traffic_failed_as_per_the_allow_rule: Failed to allow traffic as per the configured allow rule
traffic_failed_as_per_the_allow_rule: Failed to allow traffic as per the configured allow rule
old_acl_rule_not_deleted_after_acl_update_full: ACL rule-{} is not deleted in the acl table-{} after acl update full
new_acl_rule_not_created_after_acl_update_full: ACL rule-{} is not created in the acl table-{} after acl update full
old_acl_rule_deleted_after_acl_update_incremental: ACL rule-{} is deleted in the acl table-{} after acl update incremental
Expand All @@ -33,6 +33,7 @@ acl_rule_table_not_found: Acl Table/Rule not found
hardware_acl_mode_config_failed: Configuring Hardware ACL mode failed for {}
acl_config_status: Configuring ACL {} {}
egress_acl_rate_limit_unsupported_platform: Egress ACL rate limit not supported in this platform {}
apply_acl_interface_status: Configured ACL {} is {} on interface {}

#### Port priority shaping
traffic_transmitted_on_the_queue: Traffic {} transmitted on {} at a rate of {}
Expand Down Expand Up @@ -84,4 +85,4 @@ qos_map_running_config_verify : verification of qos maps config in running-confi
qos_map_test_pass : verification of qos map test passed {}
qos_map_test_fail : verification of qos map test failed {}
qos_map_dscp_value_tg_capture_verify_failed: verification of dscp value in tg caputre failed
qos_map_queue_counters_verify_failed : verification of queue counter values failed
qos_map_queue_counters_verify_failed : verification of queue counter values failed
32 changes: 29 additions & 3 deletions spytest/datastore/messages/routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ip6_traffic_over_link_local_nh_fail_vrf : IPv6 traffic forwarding via link local
ip6_traffic_over_link_local_nh_fail_manual : IPv6 traffic forwarding via manual configured link local address as next hop is failed
ip6_disable_link_local_failed: Disabling of IPV6 link local address on {} failed.
link_local_address_not_found: DUT IPv6 Link Local Address not found
ssh_ip6_link_local_fail: SSH failed on IPv6 Link Local Address

##BGP
bgp_router_created: BGP Router created successfully
Expand All @@ -36,6 +37,7 @@ BGP_unnumbered_neighbor_route_learn_status: Learning of IPV4 route over IPV6 in
bgp_router_create_delete : BGP Router {} through {} is {}.
bgp_neighbor_create_delete : BGP IP{} neighbor {} through {} is {}.
bgp_neighbor_status : BGP IP{} neighbor status(Established) is {} when created through {}.
bgp_nexthop_peer_intf : BGP nexthop peer interface list update {}.


##OSPF
Expand Down Expand Up @@ -76,12 +78,14 @@ v6_ping_fail_from_DUT_to_DUT : IPv6 ping fail from dut{} to dut{}

##NAT
static_twice_nat_translation_entry_create_fail : Static Twice NAT translation entry creation failed for local ip {} and global ip {}
static_twice_napt_translation_entry_create_fail : Static Twice NAPT translation entry creation failed for local ip {} and global ip {}
static_nat_translation_entry_create_fail : Static NAT translation entry creation failed for local ip {} and global ip {}
static_nat_translation_entry_del_fail : Static NAT translation entry deletion failed for local ip {} and global ip {}
snat_translation_failed_in_packet : NAT translation failed in packet, source ip {} not translated to {}
dnat_translation_fail_in_packet : NAT translation failed in packet, destination ip {} not translated to {}
dynamic_snat_translation_entry_create_fail : dynamic SNAT translation entry creation failed for local sip {} and outside sip {}
dynamic_dnat_translation_entry_create_fail : dynamic DNAT translation entry creation failed for outside dip {} and inside dip {}
dynamic_snat_translation_entry_delete_fail : dynamic SNAT translation entry deletion failed for local sip {} and outside sip {}
pool_del_fail : Dynamic pool {} deletion failed
pool_del_success : Dynamic pool {} deletion successful
nat_translation_happening_for_acl_do_not_nat_match_packets : NAT Translation happening for ACL do-not-nat rule matching packets
Expand All @@ -107,12 +111,15 @@ nat_translation_successful_after_reboot: NAT translation successful after reboot
nat_translation_successful_after_config_reload: NAT translation successful after config save and reload
dynamic_nat_scaling_failed: Failed to learn max supported dynamic nat entries
ping_fail_across_nat_zone: ping failed across nat zones
traceroute_over_nat_failed : Traceroute over NAT translation failed
traceroute_over_nat_failed : Traceroute over NAT translation failed {}
traceroute_over_nat_translation_successful : Traceroute is successful over a NAT translation
nat_warm_reboot_failed: Warm boot failed in NAT
dynamic_napt_entry_exists_after_docker_restart: Dynamic NAPT entry is not cleared during nat docker restart
static_nat_entry_not_restored_after_docker_restart: Static NAT entry not restored after docker restart
NAT_unsupported_platform : NAT is not supported on this platform {}
ssh_over_nat_failed : SSH over NAT translation failed {}
ssh_over_nat_translation_successful : SSH is successful over a NAT translation
ssh_ip_fail: SSH failed on ip address {}

## Error Handling
fib_failure_route_fail : Route {} failed in Fib Failure state.
Expand Down Expand Up @@ -166,6 +173,7 @@ ndp_table_clear_fail : NDP table is not cleared successfully

#L3 DHCP Relay
IP_Helper_address_config_failed : IP Helper address config failed on Relay agent dut {}
IPv6_Helper_address_config_failed : IPv6 Helper address config failed on Relay agent dut {}
IP_address_assignment_failed: IP address assignment failed on client dut {}
IPv6_address_assignment_failed: IPv6 address assignment failed on client dut {}
client_got_ip_with_invalid_ip_helper_address: client got ip with invalid ip helper address {}
Expand Down Expand Up @@ -204,8 +212,18 @@ IGMP_join_failed : IGMP join entry with output {} not in vtysh
PIM_join_failed : PIM join entry with output {} not in vtysh
counters_mismatch : Counters not matched for {} interface {}
drop_counters_mismatch : Drop counters not matched for {} interface {}
Mroute_bcmcmd_failed : Could not find Mroute source {} group {} in hardware
Mroute_asic_cmd_failed : Could not find Mroute source {} group {} in hardware
Mroute_appdb_update_failed : Mroute source {} group {} oif update failed
pim_igmpsnoop_convergence : pim and igmp snooping convergence {} in {} vrf
pim_igmpsnoop_convergence_wth_new_member : pim and igmp snooping convergence {} in {} vrf when new member port is added to the corresponding vlan
pim_igmpsnoop_convergence_shut : pim and igmp snooping convergence {} after shut no shut on the vlan member ports
pim_igmpsnoop_convergence_with_different_sources: pim and igmp snooping convergence {} when same group learned with different source address on different member ports of same vlan
pim_igmpsnoop_convergence_with_igmp_leave: pim and igmp snooping convergence {} with multiple vlan member ports Join and one of the member port sent leave
pim_igmpsnoop_igmp_join: IGMP Join learn {} when pim and igmp snooping enabled on vlan interface
pim_igmpsnoop_convergence_reboot: pim and igmp snooping convergence {} after {}
pim_igmpsnoop_convergence_igmp_vlan_first: pim and igmp snooping convergence {} when igmp snooping is enabled on vlan before adding the member ports to that vlan
pim_igmpsnoop_convergence_igmp_snoop_disable_enable: pim and igmp snooping convergence {} after igmp snooping and pim is disabled and enabled
pim_igmpsnoop_convergence_portchannel: pim and igmp snooping convergence {} on port channle interface


# IP helper
Expand All @@ -227,4 +245,12 @@ IP_helper_service_is_not_up : Test case failed, IP helper is not up
Vrf_Config_verification_failed : VRF config verification failed
IP_helper_test_case_msg_status : Test case {} {}

accessing_shell_status: Accessing {} shell after enable/disalbe bgp error handling {}
accessing_shell_status: Accessing {} shell after enable/disalbe bgp error handling {}

# Subinterface
subintf_dev_sanity_failed : Test failed
subintf_dev_sanity_passed : Test case passed

# RIF Counter
rif_counters_update : rif counters update {} on {} routing interface
rif_counters_clear : rif counters clear {}
Loading

0 comments on commit 2070b18

Please sign in to comment.