File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
tests/mutest_after/env_vars Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ topology :
3
+ nodes :
4
+ - name : r1
5
+ cmd : |
6
+ echo $foo0
7
+ env :
8
+ - name : foo0
9
+ value : bar
10
+ - name : foo1
11
+ value : ' bar '' " baz'
Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 eval: (blacken-mode 1) -*-
2
+ # SPDX-License-Identifier: GPL-2.0-or-later
3
+ #
4
+ # April 18 2025, Liam Brady <[email protected] >
5
+ #
6
+ # Copyright (c) 2022, LabN Consulting, L.L.C.
7
+ #
8
+ """Test for config of env variables.
9
+
10
+ This test is for ensuring that configured environment variables properly appear
11
+ within run commands.
12
+ """
13
+ import munet
14
+ from munet .mutest .userapi import match_step
15
+ from munet .mutest .userapi import section
16
+
17
+ # Configured environment variables also should be set within
18
+ # new munet windows, however, this is not tested here.
19
+
20
+ section ("Test config for env variables" )
21
+
22
+ match_step (
23
+ "r1" ,
24
+ "cat cmd.out" ,
25
+ "bar" ,
26
+ "Check for env variable in cmd.out" ,
27
+ exact_match = True ,
28
+ )
29
+ match_step (
30
+ "r1" ,
31
+ "echo $foo0" ,
32
+ "bar" ,
33
+ "Check for env variable in Linux namespace" ,
34
+ exact_match = True ,
35
+ )
36
+ match_step (
37
+ "r1" ,
38
+ "echo $foo1" ,
39
+ "bar '\" baz" ,
40
+ "Check env variable for proper quoting" ,
41
+ exact_match = True ,
42
+ )
You can’t perform that action at this time.
0 commit comments