teuton 2.1.9 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -12
- data/bin/check_teuton +0 -2
- data/docs/changelog/ideas.md +132 -0
- data/docs/changelog/v2.1.md +14 -122
- data/docs/changelog/v2.2.md +52 -28
- data/docs/changelog/version2.1.md +4 -0
- data/docs/commands/README.md +58 -15
- data/docs/commands/example_check.md +0 -4
- data/docs/commands/example_run.md +0 -4
- data/docs/dsl/README.md +1 -1
- data/docs/dsl/definition/result.md +1 -0
- data/docs/dsl/definition/run_remote.md +12 -6
- data/docs/dsl/definition/target.md +9 -10
- data/docs/dsl/execution/export.md +27 -20
- data/docs/install/README.md +13 -18
- data/docs/install/vagrant_docker.md +1 -1
- data/docs/learn/README.md +8 -8
- data/docs/learn/example-01-target.md +25 -25
- data/docs/learn/example-02-config.md +38 -49
- data/docs/learn/example-03-remote-hosts.md +22 -22
- data/docs/learn/{example-11-first-test.md → example-04-new-test.md} +23 -24
- data/docs/learn/{example-04-use.md → example-05-use.md} +6 -6
- data/docs/learn/{example-05-debug.md → example-06-debug.md} +8 -8
- data/docs/learn/{example-06-log.md → example-07-log.md} +7 -7
- data/docs/learn/example-08-readme.md +59 -0
- data/docs/learn/example-09-preserve.md +41 -0
- data/docs/videos.md +19 -0
- data/lib/teuton/application.rb +22 -3
- data/lib/teuton/case_manager/case/builtin/main.rb +3 -19
- data/lib/teuton/case_manager/case/builtin/package.rb +7 -6
- data/lib/teuton/case_manager/case/builtin/service.rb +9 -8
- data/lib/teuton/case_manager/case/builtin/teuton_file.rb +28 -0
- data/lib/teuton/case_manager/case/builtin/teuton_host.rb +31 -0
- data/lib/teuton/case_manager/case/builtin/user.rb +8 -7
- data/lib/teuton/case_manager/case/case.rb +1 -1
- data/lib/teuton/case_manager/case/dsl/goto.rb +2 -2
- data/lib/teuton/case_manager/case/dsl/log.rb +1 -1
- data/lib/teuton/case_manager/case/dsl/macro.rb +4 -1
- data/lib/teuton/case_manager/case/dsl/send.rb +2 -1
- data/lib/teuton/case_manager/case/play.rb +2 -0
- data/lib/teuton/case_manager/case/result/ext_compare.rb +16 -0
- data/lib/teuton/case_manager/case/result/result.rb +1 -1
- data/lib/teuton/case_manager/case/runner.rb +30 -4
- data/lib/teuton/case_manager/case_manager.rb +1 -1
- data/lib/teuton/case_manager/dsl.rb +10 -0
- data/lib/teuton/case_manager/export_manager.rb +24 -5
- data/lib/teuton/case_manager/utils.rb +1 -1
- data/lib/teuton/{project/laboratory → check}/builtin.rb +0 -0
- data/lib/teuton/{project/laboratory → check}/dsl.rb +40 -28
- data/lib/teuton/{project/laboratory → check}/laboratory.rb +3 -8
- data/lib/teuton/{project/laboratory → check}/show.rb +53 -59
- data/lib/teuton/cli.rb +85 -14
- data/lib/teuton/{project/readme → readme}/dsl.rb +0 -0
- data/lib/teuton/{project/readme → readme}/lang.rb +1 -1
- data/lib/teuton/{project/readme → readme}/readme.rb +22 -18
- data/lib/teuton/report/formatter/array_formatter.rb +13 -1
- data/lib/teuton/report/formatter/base_formatter.rb +18 -5
- data/lib/teuton/{project/skeleton.rb → skeleton.rb} +8 -20
- data/lib/teuton/utils/configfile_reader.rb +121 -0
- data/lib/teuton/{project → utils}/name_file_finder.rb +46 -26
- data/lib/teuton/version.rb +8 -0
- data/lib/teuton.rb +39 -32
- metadata +109 -61
- data/lib/teuton/case_manager/case/dsl/deprecated.rb +0 -14
- data/lib/teuton/cli/check.rb +0 -38
- data/lib/teuton/cli/main.rb +0 -6
- data/lib/teuton/cli/play.rb +0 -38
- data/lib/teuton/cli/readme.rb +0 -26
- data/lib/teuton/cli/version.rb +0 -12
- data/lib/teuton/project/configfile_reader.rb +0 -49
- data/lib/teuton/project/project.rb +0 -80
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b14a9488a679177c5382dca457d85466a13d1544f9e50c1083de3809f3390c2
|
4
|
+
data.tar.gz: fe58ec9659005f4c441f0bb4872ce4e5421255ebf159d652de2be8e800c27286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06cd14d16baefa8894b334aaa33babbe56b2539a1e3e3bebfb88a449c9b5ba3eb471b9e418a466e228c4ee64c9e98dbda66080ff219a90d18fc77bd41105eb85
|
7
|
+
data.tar.gz: 395e8d2eb623ff313b7ecb40c57efd4402c087ecbadaf45dc1b749d22d5a9f46b11018e43f1a31507460cd66c9b2b24684890e6c08162db332689713e8cfa14d
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/teuton.svg)](https://badge.fury.io/rb/teuton)
|
3
|
+
![GitHub](https://img.shields.io/github/license/dvarrui/teuton)
|
4
|
+
![Gem](https://img.shields.io/gem/dv/teuton/2.2.2)
|
3
5
|
|
4
|
-
# TEUTON
|
6
|
+
# TEUTON
|
5
7
|
|
6
8
|
_Create Unit Test for your machines, and
|
7
9
|
test your infraestructure as code._
|
@@ -9,26 +11,27 @@ test your infraestructure as code._
|
|
9
11
|
![logo](./docs/images/logo.png)
|
10
12
|
|
11
13
|
Teuton is an intrastructure test tool, useful for:
|
12
|
-
* Sysadmin teachers to evaluate students remote machines.
|
13
|
-
* Sysadmin apprentices to evaluate their learning process as a game.
|
14
|
-
* Professional sysadmin to monitor remote machines.
|
14
|
+
* Sysadmin teachers who want to evaluate students remote machines.
|
15
|
+
* Sysadmin apprentices who want to evaluate their learning process as a game.
|
16
|
+
* Professional sysadmin who want to monitor remote machines.
|
15
17
|
|
16
18
|
Teuton allow us:
|
17
|
-
* Write
|
18
|
-
* Check compliance with requirements on remote
|
19
|
+
* Write unit tests for real or virtual devices, using simple DSL.
|
20
|
+
* Check compliance with requirements on local or remote devices.
|
19
21
|
|
20
22
|
# Documentation
|
21
23
|
|
22
|
-
* [Installation](https://github.com/teuton-software/teuton/tree/
|
24
|
+
* [Installation](https://github.com/teuton-software/teuton/tree/master/docs/install/README.md)
|
23
25
|
1. Install Ruby on your system.
|
24
|
-
1. `gem install teuton
|
25
|
-
* [
|
26
|
-
* [
|
27
|
-
* [
|
26
|
+
1. `gem install teuton`, to install Teuton.
|
27
|
+
* [Videos, blogs, news](docs/videos.md)
|
28
|
+
* [Learning](docs/learn/README.md)
|
29
|
+
* [Commands](docs/commands/README.md)
|
30
|
+
* [Teuton language](docs/dsl/README.md)
|
28
31
|
|
29
32
|
# Features
|
30
33
|
|
31
|
-
* [Free Software License](
|
34
|
+
* [Free Software License](LICENSE).
|
32
35
|
* Multiplatform.
|
33
36
|
* Remote machines only require SSH or Telnet service installed.
|
34
37
|
* Developed using ruby language.
|
data/bin/check_teuton
CHANGED
@@ -0,0 +1,132 @@
|
|
1
|
+
|
2
|
+
# Ideas
|
3
|
+
|
4
|
+
Esta es una lista de ideas para que no se me olvide... lo podemos ir ajustando 😊
|
5
|
+
|
6
|
+
1. REPOSITORIOS: teutonget in process
|
7
|
+
|
8
|
+
2. TEST-EN-CADENA (smart-shell): es un proyecto en curso que trabajará en colaboración ceon teuton. Detecta las acciones del usuario dentro de la shell y automáticamente lanza el test para validar el cumplimiento de los objetivos. Si se supera un % se pasa al siguiente test.
|
9
|
+
|
10
|
+
3. SERVIDOR TEUTON: Teuton web para recibir peticiones de los clientes... ?! Enganchar con teuton-server y teuton-client
|
11
|
+
NO. quizás mejor enfoque. Tener un servidor dedicado con una página Web para lanzar test desde el propio servidor.
|
12
|
+
|
13
|
+
4. Editor de ficheros de configuración.... una especie de asistente de ayuda..
|
14
|
+
no le veo mucho sentido tener un editor específico pero si al ejecutar un reto
|
15
|
+
si hay valores con NODATA... entonces que pregunte al usuario y complete la
|
16
|
+
configuración sobre la marcha???
|
17
|
+
|
18
|
+
5. Editor de tests ?! .... lo veo complejo... a menos que se empiece por una versión simplificada.. El DSL es tan sencillo que no le veo sentido a un editor de retos. Pero si podemos aprovechar y crear una" librería " de los módulos más frecuentes?!... una ayuda para facilitar la creación de test... esto se puede emparejar con el editor de test...
|
19
|
+
|
20
|
+
6. `result.test("...")`
|
21
|
+
7. `send :email_to => :members_emails`
|
22
|
+
|
23
|
+
8. Empaquetar tests para facilitar su movilidad . Esto se combina muy bien con la opción de búsqueda de retos.... pensar en firma gpg o md5 de comprobación etc..
|
24
|
+
Al ejecutar un test poder hacerlo "teuton run PATH/TO/FILE.zip"
|
25
|
+
|
26
|
+
|
27
|
+
# Gamification ideas
|
28
|
+
|
29
|
+
* When students demand help they could recibe some advises.
|
30
|
+
* Define a loop of executions of our activity. For example:
|
31
|
+
every 5 minutes, run the activity, and repeat this 10 times.
|
32
|
+
`start :times=>10, :duration=>5 do`
|
33
|
+
* More ideas: bonus, lives, etc.
|
34
|
+
|
35
|
+
# Ideas para QA
|
36
|
+
|
37
|
+
* actualizar las pruebas con vagrant para la versión actual. Mejora de la calidad del código.
|
38
|
+
|
39
|
+
# Ideas para PROMOCIONAR
|
40
|
+
|
41
|
+
* Documentar y hacer videos.
|
42
|
+
* Tener foros de la comunidad o presencia en reddit o stackoverflow.... o algo parecido???
|
43
|
+
|
44
|
+
Create 2 evaluation modes:
|
45
|
+
1. Evaluate targets (current mode): `start :score=>:targets do ...`
|
46
|
+
1. Evaluate task: `start :score=>:tasks do ...`
|
47
|
+
|
48
|
+
|
49
|
+
## Pending
|
50
|
+
|
51
|
+
### moodle.csv and save partial grades.
|
52
|
+
|
53
|
+
* Before play challenge read previous moodle.cvs. Then play challenge and when creates new moodle.csv... we could preseve old cases(grades) 100% for example.
|
54
|
+
|
55
|
+
### expect keyword
|
56
|
+
|
57
|
+
* `expect_equal "camaleon"`, same as `expect result.equal "camaleon"`.
|
58
|
+
* `expect_not_equal "lagarto"`, same as not expect equal.
|
59
|
+
* `expect regexp("val1|var2")`, regexp function creates regular expresion from String.
|
60
|
+
* `expect result.ok?`, result from previous goto exec.
|
61
|
+
* `result.exit_code`, exit code from previous goto exec.
|
62
|
+
|
63
|
+
|
64
|
+
* Review docs and replace `"id #{get(:username)}"` by something line `"id "+get(:username)`.
|
65
|
+
|
66
|
+
### Reports and export keyword
|
67
|
+
|
68
|
+
* Work on more output formats: CSV, HTML, XML.
|
69
|
+
* `export :format=>:html, :prefix => IAN`
|
70
|
+
* `export :format=>:xml, :prefix => IAN`
|
71
|
+
* `export :format=>:csv, :prefix => IAN`
|
72
|
+
* Improve RESUME report or create stat-report, with stat information:
|
73
|
+
* the worst target/task/case,
|
74
|
+
* the best target/task/case,
|
75
|
+
* the slowest target/task/case,
|
76
|
+
* the fastest target/task/case, etc.
|
77
|
+
* Related targets: group of targets that always have the same state in every case.
|
78
|
+
|
79
|
+
### File extension
|
80
|
+
|
81
|
+
* Change ".rb" file extension by ".tt" for example. To avoid users think on ruby when using teuton files.
|
82
|
+
* So move "ruby language" documentation to other section like "expert mode"...
|
83
|
+
* Change "start.rb" or "play.rb" name to "run.tt".
|
84
|
+
|
85
|
+
### loop keyword
|
86
|
+
|
87
|
+
* Create keyword to do loops without using ruby style:
|
88
|
+
```
|
89
|
+
loop i: 1..5 do
|
90
|
+
puts i
|
91
|
+
end
|
92
|
+
|
93
|
+
loop :a => [3,5,7] do
|
94
|
+
puts a
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
### Feedback
|
99
|
+
|
100
|
+
Add new features to DSL
|
101
|
+
* `feedback or advise "Some usefull information"` provide this information when studends demand help.
|
102
|
+
## Working
|
103
|
+
|
104
|
+
### Remote temp folder
|
105
|
+
|
106
|
+
Modify send keyword so it could works with all OS. Now only work with GNU/Linux. So we need to detect remote OS, then choose remote teuton folder where uploading files.
|
107
|
+
|
108
|
+
* First goto open new session to remote host. And then:
|
109
|
+
1. Detect remote OSTYPE: (a) GNU/Linux and MAC using "uname -a", (b) Windows using "ver" command.
|
110
|
+
2. Create teuton remote uploading folder: (a) /tmp/teuton for GNU/Linux and MAC, (b) %windir%/temp/teuton for Windows.
|
111
|
+
* Every time we send files to remote host we will use this remote folder.
|
112
|
+
|
113
|
+
### Readme
|
114
|
+
|
115
|
+
* Pass usefull information into README.md:
|
116
|
+
```
|
117
|
+
readme do
|
118
|
+
title ...
|
119
|
+
intro ...
|
120
|
+
author ...
|
121
|
+
requirements ...
|
122
|
+
tags ...
|
123
|
+
end
|
124
|
+
```
|
125
|
+
|
126
|
+
---
|
127
|
+
....
|
128
|
+
|
129
|
+
* config -> host_port
|
130
|
+
* teuton run into
|
131
|
+
* resume.html
|
132
|
+
* txt format -> remove conn_errors when errors = 0
|
data/docs/changelog/v2.1.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
|
2
2
|
# CHANGELOG teuton v 2.1
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
### 1. Export grades on csv file using Moodle format
|
4
|
+
# 1. Export grades on csv file using Moodle format
|
7
5
|
|
8
6
|
* Automaticaly exports `moodle.csv` file with all cases grades, using adecuate format so it could be imported directly into Moodle platform.
|
9
7
|
* We need to configure some params like this:
|
@@ -16,7 +14,7 @@
|
|
16
14
|
:tt_moodle_id: User Moodle Identity
|
17
15
|
```
|
18
16
|
|
19
|
-
|
17
|
+
# 2. readme keyword
|
20
18
|
|
21
19
|
We currently use the "teuton readme pry-folder" command to export README file from the challenge.
|
22
20
|
|
@@ -32,130 +30,24 @@ group "GROUPNAME" do
|
|
32
30
|
expec_one 'root'
|
33
31
|
```
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
## Working
|
38
|
-
|
39
|
-
### Remote temp folder
|
40
|
-
|
41
|
-
Modify send keyword so it could works with all OS. Now only work with GNU/Linux. So we need to detect remote OS, then choose remote teuton folder where uploading files.
|
42
|
-
|
43
|
-
* First goto open new session to remote host. And then:
|
44
|
-
1. Detect remote OSTYPE: (a) GNU/Linux and MAC using "uname -a", (b) Windows using "ver" command.
|
45
|
-
2. Create teuton remote uploading folder: (a) /tmp/teuton for GNU/Linux and MAC, (b) %windir%/temp/teuton for Windows.
|
46
|
-
* Every time we send files to remote host we will use this remote folder.
|
33
|
+
# 3. Installation process
|
47
34
|
|
48
|
-
### Readme
|
49
|
-
|
50
|
-
* Pass usefull information into README.md:
|
51
|
-
```
|
52
|
-
readme do
|
53
|
-
title ...
|
54
|
-
intro ...
|
55
|
-
author ...
|
56
|
-
requirements ...
|
57
|
-
tags ...
|
58
|
-
end
|
59
|
-
```
|
60
|
-
|
61
|
-
---
|
62
|
-
|
63
|
-
## Pending
|
64
|
-
|
65
|
-
### moodle.csv and save partial grades.
|
66
|
-
|
67
|
-
* Before play challenge read previous moodle.cvs. Then play challenge and when creates new moodle.csv... we could preseve old cases(grades) 100% for example.
|
68
|
-
|
69
|
-
### expect keyword
|
70
|
-
|
71
|
-
* `expect_equal "camaleon"`, same as `expect result.equal "camaleon"`.
|
72
|
-
* `expect_not_equal "lagarto"`, same as not expect equal.
|
73
|
-
* `expect regexp("val1|var2")`, regexp function creates regular expresion from String.
|
74
|
-
* `expect result.ok?`, result from previous goto exec.
|
75
|
-
* `result.exit_code`, exit code from previous goto exec.
|
76
|
-
|
77
|
-
### get keyword simplification
|
78
|
-
|
79
|
-
* Simplify getting and setting params process. For example: `_username`, may be alias for `get(:username)`. Then
|
80
|
-
|
81
|
-
```
|
82
|
-
target "Create user _username"
|
83
|
-
goto :host1, :exec => "id _username"
|
84
|
-
expect_one _username
|
85
|
-
```
|
86
|
-
Same as
|
87
|
-
```
|
88
|
-
target "Create user "+get(:username)
|
89
|
-
goto :host1, :exec => "id "+get(:username)
|
90
|
-
expect_one get(:username)
|
91
|
-
```
|
92
|
-
|
93
|
-
* Review docs and replace `"id #{get(:username)}"` by something line `"id "+get(:username)`.
|
94
|
-
|
95
|
-
### Reports and export keyword
|
96
|
-
|
97
|
-
* Work on more output formats: CSV, HTML, XML.
|
98
|
-
* `export :format=>:html, :prefix => IAN`
|
99
|
-
* `export :format=>:xml, :prefix => IAN`
|
100
|
-
* `export :format=>:csv, :prefix => IAN`
|
101
|
-
* Improve RESUME report or create stat-report, with stat information:
|
102
|
-
* the worst target/task/case,
|
103
|
-
* the best target/task/case,
|
104
|
-
* the slowest target/task/case,
|
105
|
-
* the fastest target/task/case, etc.
|
106
|
-
* Related targets: group of targets that always have the same state in every case.
|
107
|
-
|
108
|
-
### File extension
|
109
|
-
|
110
|
-
* Change ".rb" file extension by ".tt" for example. To avoid users think on ruby when using teuton files.
|
111
|
-
* So move "ruby language" documentation to other section like "expert mode"...
|
112
|
-
* Change "start,rb" or "play.rb" name to "run.tt".
|
113
|
-
|
114
|
-
### loop keyword
|
115
|
-
|
116
|
-
* Create keyword to do loops without using ruby style:
|
117
|
-
```
|
118
|
-
loop i: 1..5 do
|
119
|
-
puts i
|
120
|
-
end
|
121
|
-
|
122
|
-
loop :a => [3,5,7] do
|
123
|
-
puts a
|
124
|
-
end
|
125
|
-
```
|
126
|
-
|
127
|
-
### Teuton web server
|
128
|
-
|
129
|
-
* It coud be posible read students credential directly from config.yaml information..
|
130
|
-
|
131
|
-
### Feedback
|
132
|
-
|
133
|
-
Add new features to DSL
|
134
|
-
* `feedback or advise "Some usefull information"` provide this information when studends demand help.
|
135
|
-
|
136
|
-
### Installation process
|
137
35
|
* Use Bundler to install gems instead of rake.
|
138
36
|
* It will be usefull use sysadming-game as gem? And install it with `gem install teuton`.
|
139
37
|
* Vagrant: test how to use vagrant machines as case hosts.
|
140
38
|
|
141
|
-
|
142
|
-
|
39
|
+
# 4. Info sobre novedades de la versión 2.1
|
40
|
+
|
143
41
|
1. Teuton readme y dsl readme
|
144
42
|
2. Macros de define macro
|
145
43
|
3. Export yaml y html
|
146
44
|
4. Teuton --no-color
|
147
|
-
5 teuton run --case
|
148
|
-
6 teuton run --cname
|
149
|
-
7 teuton run --cpath
|
150
|
-
8 actualizar formatos de salida
|
151
|
-
9 instalación mediante gemas
|
152
|
-
10 teuton panel
|
153
|
-
11 teuton client y server
|
154
|
-
12 nuevos nombres de comandos...
|
155
|
-
13 cambio de goto a run
|
156
|
-
....
|
157
|
-
|
158
|
-
* config -> host_port
|
159
|
-
* teuton run into
|
160
|
-
* resume.html
|
161
|
-
* txt format -> remove conn_errors when errors = 0
|
45
|
+
5. teuton run --case
|
46
|
+
6. teuton run --cname
|
47
|
+
7. teuton run --cpath
|
48
|
+
8. actualizar formatos de salida
|
49
|
+
9. instalación mediante gemas
|
50
|
+
10. teuton panel
|
51
|
+
11. teuton client y server
|
52
|
+
12. nuevos nombres de comandos...
|
53
|
+
13. cambio de goto a run
|
data/docs/changelog/v2.2.md
CHANGED
@@ -1,29 +1,53 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
2
|
+
# Teuton (version 2.2)
|
3
|
+
|
4
|
+
## New features
|
5
|
+
|
6
|
+
* Let's see new features examples:
|
7
|
+
* 10 result and moodle_id
|
8
|
+
* 11 get_vars
|
9
|
+
* 12 alias
|
10
|
+
* 13 include (tt_include config param)
|
11
|
+
* 14 macros
|
12
|
+
|
13
|
+
**Configuration file**
|
14
|
+
|
15
|
+
* Por defecto los valores de clave de los ficheros de configuración serán Strings en lugar de símbolos, aunque lo símbolos seguirán funcionando.
|
16
|
+
|
17
|
+
**get_vars: To think - We are not sure about this***
|
18
|
+
|
19
|
+
* "get" keyword simplification: Simplify getting and setting params process. For example: `_username_`, may be alias for `get(:username)`. Then
|
20
|
+
|
21
|
+
```
|
22
|
+
target "Create user #{_username_}"
|
23
|
+
run "id #{_username_}"
|
24
|
+
expect_one _username_
|
25
|
+
```
|
26
|
+
Same as
|
27
|
+
|
28
|
+
```
|
29
|
+
target "Create user "+get(:username)
|
30
|
+
run "id " + get(:username)
|
31
|
+
expect_one get(:username)
|
32
|
+
```
|
33
|
+
|
34
|
+
* Promocinar el proyecto:
|
35
|
+
* Documentar y hacer videos.
|
36
|
+
* Charlas y talleres
|
37
|
+
|
38
|
+
## Fixed
|
39
|
+
|
40
|
+
* Solucionar fallo en --cname
|
41
|
+
* Revisar doc options como cpanel
|
42
|
+
|
43
|
+
## TODO
|
44
|
+
|
45
|
+
**Documentation**
|
46
|
+
|
47
|
+
* Doc learn 10,11, 12,13 y 14
|
48
|
+
* 10 result and moodle_id
|
49
|
+
* 11 get_vars
|
50
|
+
* 12 alias
|
51
|
+
* 13 include
|
52
|
+
* 14 macro
|
53
|
+
* Doc tt_include
|
data/docs/commands/README.md
CHANGED
@@ -3,14 +3,11 @@
|
|
3
3
|
# Commands
|
4
4
|
|
5
5
|
Available command functions:
|
6
|
-
1. Show help
|
7
|
-
2. Show version
|
8
|
-
3. Create new test
|
9
|
-
4. Check teuton test
|
10
|
-
5. Run teuton test
|
11
|
-
* Running Teuton test
|
12
|
-
* Command options
|
13
|
-
* Choosing other config file name
|
6
|
+
1. [Show help](#1-show-help)
|
7
|
+
2. [Show version](#2-show-version)
|
8
|
+
3. [Create new test](#3-create-new-test)
|
9
|
+
4. [Check teuton test](#4-check-teuton-test)
|
10
|
+
5. [Run teuton test](#5-run-teuton-test)
|
14
11
|
|
15
12
|
# 1. Show help
|
16
13
|
|
@@ -34,6 +31,11 @@ Commands:
|
|
34
31
|
|
35
32
|
```
|
36
33
|
|
34
|
+
Alias:
|
35
|
+
* `teuton h`
|
36
|
+
* `teuton -h`
|
37
|
+
* `teuton --help`
|
38
|
+
|
37
39
|
# 2. Show version
|
38
40
|
|
39
41
|
Usage:
|
@@ -46,7 +48,7 @@ Example:
|
|
46
48
|
|
47
49
|
```bash
|
48
50
|
$ teuton version
|
49
|
-
teuton (version 2.
|
51
|
+
teuton (version 2.2.0)
|
50
52
|
```
|
51
53
|
|
52
54
|
Alias:
|
@@ -54,7 +56,7 @@ Alias:
|
|
54
56
|
* `teuton -v`
|
55
57
|
* `teuton --version`
|
56
58
|
|
57
|
-
# 3. Create new test
|
59
|
+
# 3. Create new test
|
58
60
|
|
59
61
|
Usage:
|
60
62
|
|
@@ -62,6 +64,8 @@ Usage:
|
|
62
64
|
teuton new foo
|
63
65
|
```
|
64
66
|
|
67
|
+
Description: Create teuton test skeleton.
|
68
|
+
|
65
69
|
Example:
|
66
70
|
|
67
71
|
```bash
|
@@ -71,7 +75,6 @@ Example:
|
|
71
75
|
* Create dir => foo
|
72
76
|
* Create file => foo/config.yaml
|
73
77
|
* Create file => foo/start.rb
|
74
|
-
* Create file => foo/.gitignore
|
75
78
|
```
|
76
79
|
|
77
80
|
This command will create the next structure:
|
@@ -81,9 +84,13 @@ This command will create the next structure:
|
|
81
84
|
| foo | Base directory |
|
82
85
|
| foo/start.rb | Main Script |
|
83
86
|
| foo/config.yaml | YAML configuration file |
|
84
|
-
| foo/.gitignore | By default, ignore YAML files to be upload on git repository |
|
85
87
|
|
86
|
-
|
88
|
+
Alias:
|
89
|
+
* `teuton n foo`
|
90
|
+
* `teuton -n foo`
|
91
|
+
* `teuton --new foo`
|
92
|
+
|
93
|
+
# 4. Check teuton test
|
87
94
|
|
88
95
|
Usage:
|
89
96
|
|
@@ -91,11 +98,23 @@ Usage:
|
|
91
98
|
teuton check DIRPATH
|
92
99
|
```
|
93
100
|
|
94
|
-
Description: this command check teuton test
|
101
|
+
Description: this command check teuton test and config files located into DIRPATH folder.
|
95
102
|
|
96
103
|
[Example](example_check.md)
|
97
104
|
|
98
|
-
|
105
|
+
| Command | Description |
|
106
|
+
| ---------------------------- | ----------- |
|
107
|
+
| teuton check path/to/dir/foo | Test content of start.rb and config.yaml files. |
|
108
|
+
| teuton check path/to/dir/foo --cname=demo | Test content of start.rb and demo.yaml files. |
|
109
|
+
| teuton check path/to/file/foo.rb | Test content of foo.rb and foo.yaml files. |
|
110
|
+
| teuton check path/to/file/foo.rb --cname=demo | Test content of foo.rb and demo.yaml files.|
|
111
|
+
|
112
|
+
Alias:
|
113
|
+
* `teuton c foo`
|
114
|
+
* `teuton -c foo`
|
115
|
+
* `teuton --check foo`
|
116
|
+
|
117
|
+
# 5. Run teuton test
|
99
118
|
|
100
119
|
Usage:
|
101
120
|
|
@@ -106,3 +125,27 @@ teuton run DIRPATH
|
|
106
125
|
Description: this command run teuton test located into DIRPATH folder.
|
107
126
|
|
108
127
|
[Example](example_run.md)
|
128
|
+
|
129
|
+
Alias:
|
130
|
+
* `teuton foo`
|
131
|
+
|
132
|
+
# 6. Show README
|
133
|
+
|
134
|
+
Usage:
|
135
|
+
|
136
|
+
```bash
|
137
|
+
teuton readme DIRPATH
|
138
|
+
```
|
139
|
+
|
140
|
+
Description:
|
141
|
+
|
142
|
+
Read test and config files content, and display information about
|
143
|
+
what kind of problem/exercise it is going to be evaluated. The students need this
|
144
|
+
information to resolv the problem/exercise into their machines.
|
145
|
+
|
146
|
+
The teacher could write this information or may use this command to generate automaticaly.
|
147
|
+
|
148
|
+
Alias:
|
149
|
+
* `teuton r DIRPATH`
|
150
|
+
* `teuton -r DIRPATH`
|
151
|
+
* `teuton --readme DIRPATH`
|
@@ -14,10 +14,6 @@ Example:
|
|
14
14
|
|
15
15
|
```bash
|
16
16
|
> teuton check examples/learn-01-target
|
17
|
-
[INFO] ScriptPath => examples/learn-01-target/start.rb
|
18
|
-
[INFO] ConfigPath => examples/learn-01-target/config.yaml
|
19
|
-
[INFO] Pwd => /mnt/home/leap/proy/repos/teuton.d/teuton
|
20
|
-
[INFO] TestName => learn-01-target
|
21
17
|
|
22
18
|
+----------------------------+
|
23
19
|
| GROUP: Learn about targets |
|
@@ -19,10 +19,6 @@ Example:
|
|
19
19
|
|
20
20
|
```bash
|
21
21
|
> teuton run examples/learn-01-target
|
22
|
-
[INFO] ScriptPath => examples/learn-01-target/start.rb
|
23
|
-
[INFO] ConfigPath => examples/learn-01-target/config.yaml
|
24
|
-
[INFO] Pwd => /mnt/home/leap/proy/repos/teuton.d/teuton
|
25
|
-
[INFO] TestName => learn-01-target
|
26
22
|
|
27
23
|
==================================
|
28
24
|
Executing [teuton] (version 2.1.9)
|
data/docs/dsl/README.md
CHANGED
@@ -18,7 +18,7 @@ These are the main DSL key words, usefull to define items to be evaluated.
|
|
18
18
|
| [target](definition/target.md) | Define a target. This is the item to be checked. |
|
19
19
|
| Remote [run](definition/run_remote.md)| Execute command into remote host. |
|
20
20
|
| Local [run](definition/run_local.md) | Execute command into local host. |
|
21
|
-
| [result](definition/result.md) | Contain the output of previous `
|
21
|
+
| [result](definition/result.md) | Contain the output of previous `run` order. |
|
22
22
|
| [expect](definition/expect.md) | Check the obtained result with the expected value. |
|
23
23
|
|
24
24
|
## Execution instructions
|
@@ -81,6 +81,7 @@ result.grep_v("nologin").grep("/bin/bash").count.gt 0
|
|
81
81
|
|
82
82
|
| Function | Description |
|
83
83
|
| -------------------- | --------------------------------- |
|
84
|
+
| `result.exitstatus` | Return exit code from the last command executed by run statement |
|
84
85
|
| `result.value` | Return first output line or value |
|
85
86
|
| `result.content` | Return all output lines |
|
86
87
|
| `result.alterations` | Return transformations applied to the output |
|
@@ -50,9 +50,11 @@ goto :localhost, :execute => "id yoda"
|
|
50
50
|
|
51
51
|
**SSH connection**
|
52
52
|
|
53
|
-
Invoking `run`
|
53
|
+
Invoking `run` sentence, will open SSH session with remote host by default.
|
54
|
+
This config files examples do the same:
|
55
|
+
|
56
|
+
Sample 1. By default, SSH connection is established with remote host:
|
54
57
|
|
55
|
-
Sample 1:
|
56
58
|
```
|
57
59
|
---
|
58
60
|
:config:
|
@@ -65,7 +67,8 @@ Sample 1:
|
|
65
67
|
:host1_password: secret
|
66
68
|
```
|
67
69
|
|
68
|
-
Sample 2:
|
70
|
+
Sample 2. `host1_protocol: ssh` force SSH connection with remote host:
|
71
|
+
|
69
72
|
```
|
70
73
|
---
|
71
74
|
:config:
|
@@ -81,7 +84,8 @@ Sample 2:
|
|
81
84
|
|
82
85
|
**Telnet connection**: Open Telnet remote session.
|
83
86
|
|
84
|
-
|
87
|
+
`host1_protocol: telnet` force Telnet connection with remote host:
|
88
|
+
|
85
89
|
```
|
86
90
|
---
|
87
91
|
:global:
|
@@ -93,7 +97,9 @@ For example:
|
|
93
97
|
:host1_protocol: telnet
|
94
98
|
```
|
95
99
|
|
96
|
-
**Localhost**: When hostname is localhost, or host IP is 127.0.0.X, then
|
100
|
+
**Localhost**: When hostname value is "localhost", or host IP is "127.0.0.X", then
|
101
|
+
Teuton will assume that you want to run your command on local system, and no remote session is opened.
|
102
|
+
This examples are the same:
|
97
103
|
|
98
104
|
```
|
99
105
|
run "id david"
|
@@ -105,7 +111,7 @@ And
|
|
105
111
|
goto :localhost, :exec => "id david"
|
106
112
|
```
|
107
113
|
|
108
|
-
**SSH to localhost**: Force SSH session to localhost
|
114
|
+
**SSH to localhost**: Force SSH session to localhost:
|
109
115
|
|
110
116
|
```
|
111
117
|
---
|