Commit 81daea2
committed
Add a unit test to illustrate the pyvenv bootstrap issue
This module that manage python needs python to be installed in order to
work properly under certain conditions.
When python is not installed on a node, the python_version fact does not
have a value. When using `python::pyvenv` on such a system without a
specific version set, a call of the split() function on this unde value
cause an error te be raised:
```
Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, The function 'split' was called with arguments it does not accept. It expects one of:
(String str, String pattern)
rejected: parameter 'str' expects a String value, got Undef
(String str, Regexp pattern)
rejected: parameter 'str' expects a String value, got Undef
(String str, Type[Regexp] pattern)
rejected: parameter 'str' expects a String value, got Undef
(Sensitive[String] sensitive, String pattern)
rejected: parameter 'sensitive' expects a Sensitive[String] value, got Undef
(Sensitive[String] sensitive, Regexp pattern)
rejected: parameter 'sensitive' expects a Sensitive[String] value, got Undef
(Sensitive[String] sensitive, Type[Regexp] pattern)
rejected: parameter 'sensitive' expects a Sensitive[String] value, got Undef (file: /etc/puppetlabs/code/environments/production/modules/python/manifests/pyvenv.pp, line: 48, column: 34) (file: /etc/puppetlabs/code/environments/production/modules/taiga/manifests/back/install.pp, line: 15) on node debian12-64-puppet7.example.com
```1 parent 16043ea commit 81daea2
1 file changed
+68
-57
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
23 | 48 | | |
24 | 49 | | |
25 | | - | |
26 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
27 | 62 | | |
28 | 63 | | |
29 | | - | |
| 64 | + | |
30 | 65 | | |
31 | 66 | | |
32 | 67 | | |
33 | 68 | | |
34 | | - | |
| 69 | + | |
| 70 | + | |
35 | 71 | | |
36 | 72 | | |
37 | 73 | | |
38 | | - | |
39 | 74 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
56 | 83 | | |
57 | 84 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
74 | 91 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
79 | 95 | | |
80 | 96 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
| |||
0 commit comments