teuton 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/docs/commands/README.md +8 -7
- data/docs/commands/check.md +17 -15
- data/docs/commands/help.md +17 -7
- data/docs/devel/todo.md +1 -4
- data/docs/dsl/target.md +0 -14
- data/docs/install/t-node.md +10 -21
- data/docs/learn/02-target.md +49 -47
- data/docs/learn/03-remote_hosts.md +14 -15
- data/docs/learn/04-config.md +67 -68
- data/docs/learn/06-cmd_check.md +26 -24
- data/docs/learn/07-target_weight.md +3 -3
- data/docs/learn/08-unique_values.md +31 -29
- data/docs/learn/10-debug.md +36 -0
- data/docs/learn/13-feedback.md +10 -9
- data/docs/learn/15-readme.md +2 -2
- data/docs/learn/16-include.md +7 -7
- data/docs/learn/18-log.md +44 -43
- data/docs/learn/23-test-code.md +13 -10
- data/docs/learn/24-test-sql.md +5 -5
- data/docs/learn/26-expect_sequence.md +1 -1
- data/docs/learn/27-run_script.md +8 -5
- data/lib/teuton/case/{action.rb → action/action.rb} +18 -10
- data/lib/teuton/case/action/manager.rb +63 -0
- data/lib/teuton/case/case.rb +13 -13
- data/lib/teuton/case/close.rb +3 -3
- data/lib/teuton/case/dsl/all.rb +1 -0
- data/lib/teuton/case/dsl/event.rb +24 -0
- data/lib/teuton/case/dsl/expect.rb +5 -3
- data/lib/teuton/case/dsl/log.rb +3 -7
- data/lib/teuton/case/dsl/macro.rb +1 -1
- data/lib/teuton/case/dsl/run.rb +10 -15
- data/lib/teuton/case/dsl/target.rb +4 -2
- data/lib/teuton/case/play.rb +1 -1
- data/lib/teuton/case/result/ext_compare.rb +10 -10
- data/lib/teuton/case_manager/dsl.rb +6 -2
- data/lib/teuton/case_manager/ext/report.rb +0 -4
- data/lib/teuton/case_manager/show_resume_report.rb +29 -30
- data/lib/teuton/check/checker.rb +17 -8
- data/lib/teuton/check/dsl/all.rb +18 -10
- data/lib/teuton/check/dsl/expect.rb +29 -45
- data/lib/teuton/check/dsl/getset.rb +2 -2
- data/lib/teuton/check/dsl/run.rb +2 -2
- data/lib/teuton/check/show.rb +28 -34
- data/lib/teuton/cli/app.rb +1 -1
- data/lib/teuton/readme/dsl/all.rb +10 -1
- data/lib/teuton/readme/main.rb +2 -2
- data/lib/teuton/report/formatter/default/array.rb +15 -29
- data/lib/teuton/report/formatter/default/txt.rb +41 -30
- data/lib/teuton/report/formatter/resume/txt.rb +27 -26
- data/lib/teuton/report/formatter/resume/xml.rb +4 -4
- data/lib/teuton/report/report.rb +3 -1
- data/lib/teuton/utils/project.rb +4 -3
- data/lib/teuton/version.rb +1 -1
- metadata +4 -5
- data/docs/tutorial/es/nginx/README.md +0 -546
- data/lib/teuton/deprecated/utils.rb +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ffb8159388474653ba97b292becba216b9dc0d1361c5669c1c6c3ce8fd5b678
|
|
4
|
+
data.tar.gz: 7215fb1ca9e5b350c7e46498323bca0f51cc0ad2dfcbfc517ac3f2175183dbbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53b34316e0dc1e8c7a2a8a042ef1694accb3ca89f3e9d193c8471104fd89de00c123f1f6a8ccbd8e2c1335e0446b11f6dcc328e7a6c28da4d7b4f89f26e1245a
|
|
7
|
+
data.tar.gz: 42fec6d0b1846cfcc73fef79731aa98966220705a76ed81a76ae3f4e9cc01a2eaa4f7e3b97c13a334b7bcf892d1947314b16417927024976623546ca41a88a33
|
data/README.md
CHANGED
|
@@ -46,18 +46,18 @@ end
|
|
|
46
46
|
**Usage**: Run test with `teuton run TESTPATH`.
|
|
47
47
|
|
|
48
48
|
```console
|
|
49
|
-
$
|
|
49
|
+
$ teutonx examples/02-target
|
|
50
50
|
------------------------------------
|
|
51
|
-
Started at
|
|
51
|
+
Started at 2026-10-21 17:05:49 +0100
|
|
52
52
|
F.
|
|
53
53
|
Finished in 0.005 seconds
|
|
54
54
|
------------------------------------
|
|
55
55
|
|
|
56
|
-
CASE RESULTS
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
CASE RESULTS
|
|
57
|
+
┌──────┬───────────┬───────┬───────┐
|
|
58
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
59
|
+
│ 01 │ anonymous │ 33.0 │ ? │
|
|
60
|
+
└──────┴───────────┴───────┴───────┘
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
**Output**: reports saved into `var/TESTNAME` folder.
|
data/docs/commands/README.md
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
```
|
|
6
6
|
$ teuton
|
|
7
7
|
Commands:
|
|
8
|
-
teuton [run] [OPTIONS] DIRECTORY
|
|
9
|
-
teuton check [OPTIONS] DIRECTORY
|
|
10
|
-
teuton config
|
|
11
|
-
teuton help [COMMAND]
|
|
12
|
-
teuton new DIRECTORY
|
|
13
|
-
teuton readme DIRECTORY
|
|
14
|
-
teuton
|
|
8
|
+
teuton [run] [OPTIONS] DIRECTORY # Run test from directory
|
|
9
|
+
teuton check [OPTIONS] DIRECTORY # Check test and config file content
|
|
10
|
+
teuton config DIRECTORY # Suggest configuration.
|
|
11
|
+
teuton help [COMMAND] # Describe available commands or one specific command
|
|
12
|
+
teuton new DIRECTORY # Create skeleton for a new project
|
|
13
|
+
teuton readme DIRECTORY # Show README extracted from test contents
|
|
14
|
+
teuton tree # Print a tree of all available commands
|
|
15
|
+
teuton version # Show the program version
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
Available command functions:
|
data/docs/commands/check.md
CHANGED
|
@@ -27,11 +27,12 @@ Alias: `teuton c foo`, `teuton -c foo`, `teuton --check foo`
|
|
|
27
27
|
## Example
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
$ teuton check examples/02-target
|
|
30
|
+
$ teuton check examples/02-target
|
|
31
|
+
|
|
32
|
+
┌────────────────────────────┐
|
|
33
|
+
│ GROUP: Learn about targets │
|
|
34
|
+
└────────────────────────────┘
|
|
31
35
|
|
|
32
|
-
+----------------------------+
|
|
33
|
-
| GROUP: Learn about targets |
|
|
34
|
-
+----------------------------+
|
|
35
36
|
(001) target Create user obiwan
|
|
36
37
|
weight 2.0
|
|
37
38
|
run 'id obiwan' on localhost
|
|
@@ -42,17 +43,18 @@ $ teuton check examples/02-target
|
|
|
42
43
|
run 'id vader' on localhost
|
|
43
44
|
expect_fail
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
|
|
47
|
+
┌──────────────┬───────┐
|
|
48
|
+
│ DSL Stats │ Count │
|
|
49
|
+
├──────────────┼───────┤
|
|
50
|
+
│ Groups │ 1 │
|
|
51
|
+
│ Targets │ 2 │
|
|
52
|
+
│ Runs │ 2 │
|
|
53
|
+
│ * localhost │ 2 │
|
|
54
|
+
└──────────────┴───────┘
|
|
55
|
+
Warn | Configfile not found
|
|
56
|
+
- File: ../examples/02-target/config.yaml
|
|
57
|
+
Info | Recomended content:
|
|
56
58
|
---
|
|
57
59
|
global:
|
|
58
60
|
cases:
|
data/docs/commands/help.md
CHANGED
|
@@ -15,23 +15,33 @@ Alias: `teuton h`,`teuton -h`, `teuton --help`
|
|
|
15
15
|
Commands:
|
|
16
16
|
teuton [run] [OPTIONS] DIRECTORY # Run test from directory
|
|
17
17
|
teuton check [OPTIONS] DIRECTORY # Check test and config file content
|
|
18
|
-
teuton config [OPTIONS] DIRECTORY # Suggest configuration
|
|
18
|
+
teuton config [OPTIONS] DIRECTORY # Suggest configuration.
|
|
19
19
|
teuton help [COMMAND] # Describe available commands or one specific command
|
|
20
20
|
teuton new DIRECTORY # Create skeleton for a new project
|
|
21
21
|
teuton readme DIRECTORY # Show README extracted from test contents
|
|
22
|
+
teuton tree # Print a tree of all available commands
|
|
22
23
|
teuton version # Show the program version
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
**Example**: `teuton help
|
|
26
|
+
**Example**: `teuton help check`
|
|
27
|
+
|
|
26
28
|
```
|
|
27
29
|
Usage:
|
|
28
|
-
teuton
|
|
30
|
+
teuton check [OPTIONS] DIRECTORY
|
|
29
31
|
|
|
30
32
|
Options:
|
|
31
|
-
[--
|
|
33
|
+
[--onlyconfig], [--no-onlyconfig], [--skip-onlyconfig]
|
|
34
|
+
[--color], [--no-color], [--skip-color]
|
|
35
|
+
[--cname=CNAME]
|
|
36
|
+
[--cpath=CPATH]
|
|
32
37
|
|
|
33
38
|
Description:
|
|
34
|
-
|
|
39
|
+
(1) teuton check PATH/TO/DIR , Check content of start.rb and config.yaml files.
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
(2) teuton check PATH/TO/DIR --cname=demo , Check content of start.rb and demo.yaml files:
|
|
42
|
+
|
|
43
|
+
(3) teuton check PATH/TO/DIR --onlyconfig , Only show config file recomendations
|
|
44
|
+
|
|
45
|
+
(4) teuton check PATH/TO/DIR/foo.rb , Check content of foo.rb and foo.yaml files.
|
|
46
|
+
|
|
47
|
+
(5) teuton check PATH/TO/DIR/foo.rb --cname=demo , Check content of foo.rb and demo.yaml files.```
|
data/docs/devel/todo.md
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
[<< back](../../README.md)
|
|
2
2
|
|
|
3
|
-
# Roadmap Teuton v3.
|
|
3
|
+
# Roadmap Teuton v3.3.0 - 2026
|
|
4
4
|
|
|
5
5
|
# 1. Revisar
|
|
6
6
|
|
|
7
7
|
* Revisar (tests): result.grep(a).grep(b)
|
|
8
|
-
* "Limpiar" las funciones "deprecated"
|
|
9
8
|
* Aplicar las recomendaciones del informe de seguridad de Andrés.
|
|
10
9
|
* verify get(:key) and get('key') works fine!
|
|
11
10
|
* Formatter: xml
|
|
12
|
-
* Revisar la utilidad de action.assets al generar README.
|
|
13
11
|
|
|
14
12
|
# 2. Documentacion
|
|
15
13
|
|
|
16
|
-
* Nuevo repo `teuton-book`: para documentación, tutoriales en español.
|
|
17
14
|
* Documentar y hacer videos. Tener foros de la comunidad o presencia en reddit o stackoverflow.... o algo parecido???
|
|
18
15
|
* Snode Dockerfile with SSH server
|
|
19
16
|
* **ngrok**:
|
data/docs/dsl/target.md
CHANGED
|
@@ -17,17 +17,3 @@ By default weight is `1.0`, but it's posible specified other values:
|
|
|
17
17
|
```ruby
|
|
18
18
|
target "Write here your description", weight: 2.5
|
|
19
19
|
```
|
|
20
|
-
|
|
21
|
-
## [DEPRECATED] Alias
|
|
22
|
-
|
|
23
|
-
`goal` keyword is an alias of `target`. So it's the same:
|
|
24
|
-
|
|
25
|
-
```ruby
|
|
26
|
-
target "Write here your description"
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
or
|
|
30
|
-
|
|
31
|
-
```ruby
|
|
32
|
-
goal "Write here your description"
|
|
33
|
-
```
|
data/docs/install/t-node.md
CHANGED
|
@@ -106,24 +106,13 @@ CMD ["/bin/bash"]
|
|
|
106
106
|
If you want to install Teuton by your own, or there are not installation scripts for your OS, here you have information how to install all the required packages for Teuton.
|
|
107
107
|
|
|
108
108
|
Manual installation:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
1.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
1.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
1.
|
|
119
|
-
* (a) `git clone https://github.com/dvarrui/teuton.git` or
|
|
120
|
-
* (b) Download and unzip [file](https://github.com/dvarrui/teuton-panel/archive/master.zip).
|
|
121
|
-
1. Move into Teuton folder
|
|
122
|
-
* Run `cd teuton`
|
|
123
|
-
1. Gems installation.
|
|
124
|
-
* `rake install`, to install required gems.
|
|
125
|
-
1. Only for developers
|
|
126
|
-
* Run `rake devel:debian` or
|
|
127
|
-
* `rake devel:opensuse`, install gem for developers.
|
|
128
|
-
1. Final check
|
|
129
|
-
* `rake`
|
|
109
|
+
|
|
110
|
+
1. Install Git. Run `git --version` to show current version
|
|
111
|
+
1. Install ruby. Run `ruby -v` to show current version (3.2.8)
|
|
112
|
+
1. Install Rake (`gem install rake`), then `rake --version` to show current version (13.4.2).
|
|
113
|
+
1. Clone repo `git clone https://github.com/dvarrui/teuton.git` or download and unzip.
|
|
114
|
+
1. Move into Teuton folder: `cd teuton`
|
|
115
|
+
1. Install gems: `rake install`.
|
|
116
|
+
1. Only Debian OS: `rake devel:debian`.
|
|
117
|
+
1. Obly OpenSUSE OS: `rake devel:opensuse`.
|
|
118
|
+
1. Final check: `rake`
|
data/docs/learn/02-target.md
CHANGED
|
@@ -62,13 +62,13 @@ end
|
|
|
62
62
|
Execute this command to run the test:
|
|
63
63
|
|
|
64
64
|
```
|
|
65
|
-
$ teuton
|
|
66
|
-
|
|
67
|
-
CASE RESULTS
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
$ teuton examples/02-target
|
|
66
|
+
|
|
67
|
+
CASE RESULTS
|
|
68
|
+
┌──────┬───────────┬───────┬───────┐
|
|
69
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
70
|
+
│ 01 │ anonymous │ 33.0 │ ? │
|
|
71
|
+
└──────┴───────────┴───────┴───────┘
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Report files are created into `var/02-target/` folder:
|
|
@@ -85,44 +85,46 @@ Let's see one report:
|
|
|
85
85
|
|
|
86
86
|
```
|
|
87
87
|
$ cat var/02-target/case-01.txt
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
88
|
+
|
|
89
|
+
CONFIGURATION
|
|
90
|
+
┌────────────────┬────────────────────────────────┐
|
|
91
|
+
│ tt_config_path │ examples/02-target/config.yaml │
|
|
92
|
+
│ tt_members │ anonymous │
|
|
93
|
+
│ tt_script_path │ examples/02-target/start.rb │
|
|
94
|
+
│ tt_sequence │ false │
|
|
95
|
+
│ tt_skip │ false │
|
|
96
|
+
└────────────────┴────────────────────────────────┘
|
|
97
|
+
|
|
98
|
+
GROUPS
|
|
99
|
+
▶ Learn about targets
|
|
100
|
+
✖ 01 (0.0/2.0) ┌──
|
|
101
|
+
Description │ Create user obiwan
|
|
102
|
+
Command │ id obiwan
|
|
103
|
+
Output │ id: «obiwan»: no existe ese usuario
|
|
104
|
+
Duration │ 0.002 (local)
|
|
105
|
+
Alterations │ find(uid=) & find((obiwan)) & find(gid=) & count
|
|
106
|
+
Expected │ Greater than 0
|
|
107
|
+
Result │ 0
|
|
108
|
+
✔ 02 (1.0/1.0) ├──
|
|
109
|
+
Description │ Delete user vader
|
|
110
|
+
Command │ id vader
|
|
111
|
+
Output │ id: «vader»: no existe ese usuario
|
|
112
|
+
Duration │ 0.002 (local)
|
|
113
|
+
Alterations │ Read exit code
|
|
114
|
+
Expected │ Greater than 0
|
|
115
|
+
Result │ 1
|
|
116
|
+
└──
|
|
117
|
+
RESULTS
|
|
118
|
+
┌──────────────┬───────────────────────────┐
|
|
119
|
+
│ unique_fault │ 0 │
|
|
120
|
+
│ case_id │ 01 │
|
|
121
|
+
│ start_time │ 2026-10-21 21:32:24 +0100 │
|
|
122
|
+
│ finish_time │ 2026-10-21 21:32:24 +0100 │
|
|
123
|
+
│ duration │ 0.004153712 │
|
|
124
|
+
│ max_weight │ 3.0 │
|
|
125
|
+
│ good_weight │ 1.0 │
|
|
126
|
+
│ fail_weight │ 2.0 │
|
|
127
|
+
│ fail_counter │ 1 │
|
|
128
|
+
│ grade │ 33 │
|
|
129
|
+
└──────────────┴───────────────────────────┘
|
|
128
130
|
```
|
|
@@ -55,22 +55,21 @@ end
|
|
|
55
55
|
Execution:
|
|
56
56
|
|
|
57
57
|
```
|
|
58
|
-
$
|
|
58
|
+
$ teutonx examples/03-remote_hosts
|
|
59
59
|
|
|
60
|
-
CASE RESULTS
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
CONN ERRORS
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
CASE RESULTS
|
|
61
|
+
┌──────┬───────────┬───────┬───────┐
|
|
62
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
63
|
+
│ 01 │ student_1 │ 0.0 │ ? │
|
|
64
|
+
│ - │ - │ 0.0 │ S │
|
|
65
|
+
│ 03 │ student_3 │ 100.0 │ ✔ │
|
|
66
|
+
└──────┴───────────┴───────┴───────┘
|
|
67
|
+
|
|
68
|
+
CONN ERRORS
|
|
69
|
+
┌──────┬───────────┬───────┬──────────────────┐
|
|
70
|
+
│ CASE │ MEMBERS │ HOST │ ERROR │
|
|
71
|
+
│ 01 │ student_1 │ host1 │ host_unreachable │
|
|
72
|
+
└──────┴───────────┴───────┴──────────────────┘
|
|
74
73
|
```
|
|
75
74
|
|
|
76
75
|
Notice that:
|
data/docs/learn/04-config.md
CHANGED
|
@@ -35,14 +35,14 @@ end
|
|
|
35
35
|
## Example
|
|
36
36
|
|
|
37
37
|
```
|
|
38
|
-
$ teuton
|
|
39
|
-
|
|
40
|
-
CASE RESULTS
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
$ teuton examples/04-config
|
|
39
|
+
|
|
40
|
+
CASE RESULTS
|
|
41
|
+
┌──────┬───────────┬───────┬───────┐
|
|
42
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
43
|
+
│ 01 │ student_1 │ 100.0 │ ✔ │
|
|
44
|
+
│ 02 │ student_2 │ 0.0 │ ? │
|
|
45
|
+
└──────┴───────────┴───────┴───────┘
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Reports:
|
|
@@ -58,44 +58,43 @@ var/04-config/default
|
|
|
58
58
|
Let's see case 01 report.
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
$
|
|
62
|
-
|
|
63
|
-
CONFIGURATION
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
+--------------+---------------------------+
|
|
61
|
+
$ cat var/04-config/default/case-01.txt
|
|
62
|
+
|
|
63
|
+
CONFIGURATION
|
|
64
|
+
┌────────────────┬────────────────────────────────┐
|
|
65
|
+
│ tt_config_path │ examples/04-config/config.yaml │
|
|
66
|
+
│ tt_members │ student_1 │
|
|
67
|
+
│ tt_output_dir │ var/04-config/default │
|
|
68
|
+
│ tt_script_path │ examples/04-config/start.rb │
|
|
69
|
+
│ tt_sequence │ false │
|
|
70
|
+
│ tt_skip │ false │
|
|
71
|
+
│ username │ david │
|
|
72
|
+
└────────────────┴────────────────────────────────┘
|
|
73
|
+
|
|
74
|
+
GROUPS
|
|
75
|
+
▶ Reading params from config file
|
|
76
|
+
✔ 01 (1.0/1.0) ┌──
|
|
77
|
+
Description │ Create user david
|
|
78
|
+
Command │ id david
|
|
79
|
+
Output │ uid=1000(david) gid=1000(david) grupos=1000(david),478(wheel),464(vboxusers),108(libvirt),107(qemu),462(vagrant),460(docker),452(ollama)
|
|
80
|
+
Duration │ 0.004 (local)
|
|
81
|
+
Alterations │ find(uid=) & find((david)) & find(gid=) & count
|
|
82
|
+
Expected │ Greater than 0
|
|
83
|
+
Result │ 1
|
|
84
|
+
└──
|
|
85
|
+
RESULTS
|
|
86
|
+
┌──────────────┬───────────────────────────┐
|
|
87
|
+
│ unique_fault │ 0 │
|
|
88
|
+
│ case_id │ 01 │
|
|
89
|
+
│ start_time │ 2026-10-21 21:36:41 +0100 │
|
|
90
|
+
│ finish_time │ 2026-10-21 21:36:41 +0100 │
|
|
91
|
+
│ duration │ 0.004390772 │
|
|
92
|
+
│ max_weight │ 1.0 │
|
|
93
|
+
│ good_weight │ 1.0 │
|
|
94
|
+
│ fail_weight │ 0 │
|
|
95
|
+
│ fail_counter │ 0 │
|
|
96
|
+
│ grade │ 100 │
|
|
97
|
+
└──────────────┴───────────────────────────┘
|
|
99
98
|
```
|
|
100
99
|
|
|
101
100
|
## Using differents configuration files
|
|
@@ -109,38 +108,38 @@ Execute the same test but using diferents config files. Config files available:
|
|
|
109
108
|
**Example 1**: Run test usign default config file (`config.yaml`). Output files saved in `tt_output_dir: var/04-config/defautl`.
|
|
110
109
|
|
|
111
110
|
```
|
|
112
|
-
$ teuton
|
|
113
|
-
|
|
114
|
-
CASE RESULTS
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
$ teuton examples/04-config
|
|
112
|
+
|
|
113
|
+
CASE RESULTS
|
|
114
|
+
┌──────┬───────────┬───────┬───────┐
|
|
115
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
116
|
+
│ 01 │ student_1 │ 100.0 │ ✔ │
|
|
117
|
+
│ 02 │ student_2 │ 0.0 │ ? │
|
|
118
|
+
└──────┴───────────┴───────┴───────┘
|
|
120
119
|
```
|
|
121
120
|
|
|
122
121
|
**Example 2**: Run test using `example/04-config/starwars.yaml` config file. Output files saved in `tt_output_dir: var/04-config/starwars`.
|
|
123
122
|
|
|
124
123
|
```
|
|
125
124
|
$ teuton run --cname=starwars examples/04-config
|
|
126
|
-
|
|
127
|
-
CASE RESULTS
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
|
|
126
|
+
CASE RESULTS
|
|
127
|
+
┌──────┬────────────┬───────┬───────┐
|
|
128
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
129
|
+
│ 01 │ Yoda │ 0.0 │ ? │
|
|
130
|
+
│ 02 │ Darth Maul │ 0.0 │ ? │
|
|
131
|
+
└──────┴────────────┴───────┴───────┘
|
|
133
132
|
```
|
|
134
133
|
|
|
135
134
|
**Example 3**: Run test using `example/04-config/rock.yaml` config file. Output files saved in `tt_output_dir: var/04-config/rock`.
|
|
136
135
|
|
|
137
136
|
```
|
|
138
137
|
$ teuton run --cpath=examples/04-config/rock.yaml examples/04-config
|
|
139
|
-
|
|
140
|
-
CASE RESULTS
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
|
|
139
|
+
CASE RESULTS
|
|
140
|
+
┌──────┬────────────┬───────┬───────┐
|
|
141
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
142
|
+
│ 01 │ AC/DC band │ 0.0 │ ? │
|
|
143
|
+
│ 02 │ Muse band │ 0.0 │ ? │
|
|
144
|
+
└──────┴────────────┴───────┴───────┘
|
|
146
145
|
```
|
data/docs/learn/06-cmd_check.md
CHANGED
|
@@ -8,43 +8,45 @@
|
|
|
8
8
|
## Example
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
$ teuton check examples/05-use
|
|
11
|
+
$ teuton check examples/05-use
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
┌─────────────────────────┐
|
|
14
|
+
│ USE: external libraries │
|
|
15
|
+
└─────────────────────────┘
|
|
16
|
+
1. examples/05-use/lib/users.rb
|
|
17
|
+
2. examples/05-use/lib/network.rb
|
|
18
|
+
|
|
19
|
+
┌──────────────────────────┐
|
|
20
|
+
│ GROUP: Using file: users │
|
|
21
|
+
└──────────────────────────┘
|
|
16
22
|
(001) target Create user get(username)
|
|
17
23
|
weight 1.0
|
|
18
24
|
run 'id get(username)' on host1
|
|
19
25
|
expect ["uid=", "(get(username))", "gid="] (Array)
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
┌────────────────────────────┐
|
|
28
|
+
│ GROUP: Using file: network │
|
|
29
|
+
└────────────────────────────┘
|
|
24
30
|
(002) target Update computer name with get(hostname)
|
|
25
31
|
weight 1.0
|
|
26
32
|
run 'hostname' on host1
|
|
27
33
|
expect_one get(hostname) (String)
|
|
28
34
|
|
|
29
|
-
(003) target Ensure DNS
|
|
35
|
+
(003) target Ensure DNS is properly configured
|
|
30
36
|
weight 1.0
|
|
31
37
|
run 'host www.google.es' on host1
|
|
32
38
|
expect www.google.es has address (String)
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
| * username | 3 |
|
|
47
|
-
| * hostname | 2 |
|
|
48
|
-
| Sets | 0 |
|
|
49
|
-
+-------------+-------+
|
|
40
|
+
┌─────────────┬───────┐
|
|
41
|
+
│ DSL Stats │ Count │
|
|
42
|
+
├─────────────┼───────┤
|
|
43
|
+
│ Uses │ 2 │
|
|
44
|
+
│ Groups │ 2 │
|
|
45
|
+
│ Targets │ 3 │
|
|
46
|
+
│ Runs │ 3 │
|
|
47
|
+
│ * host1 │ 3 │
|
|
48
|
+
│ Gets │ 5 │
|
|
49
|
+
│ * username │ 3 │
|
|
50
|
+
│ * hostname │ 2 │
|
|
51
|
+
└─────────────┴───────┘
|
|
50
52
|
```
|
|
@@ -26,9 +26,9 @@ end
|
|
|
26
26
|
|
|
27
27
|
Output:
|
|
28
28
|
```
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
┌────────────────────────────┐
|
|
30
|
+
│ GROUP: Using file: network │
|
|
31
|
+
└────────────────────────────┘
|
|
32
32
|
(002) target Update computer name with get(hostname)
|
|
33
33
|
weight 1.0
|
|
34
34
|
run 'hostname' on host1
|