1#!/usr/bin/env bash
2# Copyright 2024 Nordic Semiconductor
3# SPDX-License-Identifier: Apache-2.0
4
5source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
6
7# Test verifies that bridging table works correctly
8#
9# Test procedure:
10# 1. Tester configures itself and creates subnets equal to number of non-bridge nodes.
11# 2. Tester provisions and configures Subnet Bridge node.
12# 3. Tester provisions and configures non-bridge nodes for each subnet.
13# 4. While bridging table is empty, Tester sends a GET message to each node encrypted with primary
14# key and verifies that no response is received.
15# 5. Tester adds an entry to the bridging table to bridge traffic in one direction from tester to
16# device 1
17# 6. Tester sends a DATA and GET messages to device 1 encrypted with primary key and verifies that
18# no response is received.
19# 9. Tester adds a reverse entry to the bridging table to bridge traffic in the other direction from
20# device 1 to tester.
21# 10. Tester sends a GET message to device 1 encrypted with primary key and verifies that a STATUS
22# message is received with the content of the previously sent DATA message.
23# 11. Tester removes the reverse entry from the bridging table and updates direction of the first
24# entry to bridge traffic in the both directions between tester and device 1.
25# 12. Tester sends a GET message to device 1 encrypted with primary key and verifies that a STATUS
26# message is received with the empty content.
27RunTest mesh_brg_table_state_change \
28	brg_tester_table_state_change brg_bridge_simple brg_device_simple brg_device_simple
29
30overlay=overlay_psa_conf
31RunTest mesh_brg_table_state_change_psa \
32	brg_tester_table_state_change brg_bridge_simple brg_device_simple brg_device_simple
33