teuton 2.9.5 → 2.9.6
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 +3 -3
- data/docs/changelog/changelog.2.md +9 -1
- data/docs/commands/README.md +33 -65
- data/docs/commands/{example_check.md → check-example.md} +2 -6
- data/docs/commands/{example_run.md → howto-run-tests.md} +16 -10
- data/docs/install/README.md +10 -6
- data/docs/install/s-node.md +3 -3
- data/docs/install/t-node.md +75 -6
- data/lib/teuton/case/dsl/expect_sequence.rb +2 -2
- data/lib/teuton/case_manager/case_manager.rb +1 -0
- data/lib/teuton/case_manager/export_manager.rb +12 -4
- data/lib/teuton/case_manager/report.rb +1 -1
- data/lib/teuton/case_manager/show_report.rb +0 -1
- data/lib/teuton/readme/readme.rb +1 -0
- data/lib/teuton/version.rb +1 -1
- metadata +8 -12
- data/docs/install/manual.md +0 -41
- data/docs/install/vagrant_docker.md +0 -56
- /data/docs/{diagram.md → devel/diagram.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b77d496bd14e955446cbb709c63c7df74059c708949159326e3d2e0edc09b81a
|
|
4
|
+
data.tar.gz: f721aa3a9fd30021bdf15ca26c19b308d7f38e00ea016a43d6b847f7b673f7b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cdc0745e4b04b7c81893a3aaef4fa1478f55d2c8390edaf1153ad82005238cce3d6a4ff668566528e2eca1a127c941adc1683f2164e4afd75c4125380c2bb77
|
|
7
|
+
data.tar.gz: 88b54291a14bb76f074dd9ec27657ede78142e2388b7e40af5ed058b8cad0e43d1257a6c48b9e60106268aa4b932a532b8953a96a0b600bdfe9787ff4d623cc4
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://badge.fury.io/rb/teuton)
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
_Test your infrastructure as code._
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
@@ -25,7 +25,7 @@ gem install teuton
|
|
|
25
25
|
|
|
26
26
|
# Usage
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Use `teuton run TESTPATH` command to run test:
|
|
29
29
|
|
|
30
30
|
```console
|
|
31
31
|
> teuton run examples/01-target
|
|
@@ -41,7 +41,7 @@ CASE RESULTS
|
|
|
41
41
|
|
|
42
42
|
# Features
|
|
43
43
|
|
|
44
|
-
*
|
|
44
|
+
* Use simple DSL to define your tests: `target`, `run`,`expect` and more.
|
|
45
45
|
* Remote devices only require SSH or Telnet service installed.
|
|
46
46
|
* Output format: txt, html, json, yaml, etc.
|
|
47
47
|
* Multiplatform.
|
|
@@ -125,4 +125,12 @@ DSL send:
|
|
|
125
125
|
## [2.9.4] 20250410
|
|
126
126
|
|
|
127
127
|
- [FIX] Improve the markdown output of the readme.
|
|
128
|
-
- [FIX] Telnet exitcode
|
|
128
|
+
- [FIX] Telnet exitcode
|
|
129
|
+
|
|
130
|
+
## [2.9.5] 20250514
|
|
131
|
+
|
|
132
|
+
- [FIX] `require "json_pure"`is deprecated. Use `json` gem instead of `json_pure`.
|
|
133
|
+
|
|
134
|
+
## [2.9.6] 20251106
|
|
135
|
+
|
|
136
|
+
- [FIX] Problem with `export preserve: true`. It was using old class Application. Now use Project class.
|
data/docs/commands/README.md
CHANGED
|
@@ -6,66 +6,56 @@ Available command functions:
|
|
|
6
6
|
1. [Show help](#1-show-help)
|
|
7
7
|
2. [Show version](#2-show-version)
|
|
8
8
|
3. [Create new test](#3-create-new-test)
|
|
9
|
-
4. [Check
|
|
10
|
-
5. [Run
|
|
9
|
+
4. [Check test](#4-check-test)
|
|
10
|
+
5. [Run test](#5-run-test)
|
|
11
|
+
6. [Show test info as README file](#6-show-test-info-as-readme-file)
|
|
11
12
|
|
|
12
13
|
# 1. Show help
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
teuton
|
|
16
|
-
```
|
|
15
|
+
Show help about command functions.
|
|
17
16
|
|
|
18
17
|
Example:
|
|
19
|
-
|
|
20
18
|
```bash
|
|
21
|
-
|
|
19
|
+
$ teuton help
|
|
22
20
|
Commands:
|
|
23
|
-
teuton [run] [OPTIONS] DIRECTORY # Run
|
|
24
|
-
teuton check [OPTIONS] DIRECTORY #
|
|
21
|
+
teuton [run] [OPTIONS] DIRECTORY # Run test from directory
|
|
22
|
+
teuton check [OPTIONS] DIRECTORY # Check test and config file content
|
|
23
|
+
teuton config DIRECTORY # Suggest configuration
|
|
25
24
|
teuton help [COMMAND] # Describe available commands or one specific command
|
|
26
25
|
teuton new DIRECTORY # Create skeleton for a new project
|
|
27
|
-
teuton readme DIRECTORY #
|
|
26
|
+
teuton readme DIRECTORY # Show README extracted from test contents
|
|
28
27
|
teuton version # Show the program version
|
|
29
|
-
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
Execute `teuton help FUNCTION_NAME` for more information.
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
* `teuton -h`
|
|
36
|
-
* `teuton --help`
|
|
32
|
+
Alias: `teuton h`,`teuton -h`, `teuton --help`
|
|
37
33
|
|
|
38
34
|
# 2. Show version
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
Show current version.
|
|
37
|
+
|
|
38
|
+
Usage: `teuton version`
|
|
43
39
|
|
|
44
40
|
Example:
|
|
45
41
|
|
|
46
42
|
```bash
|
|
47
43
|
$ teuton version
|
|
48
|
-
teuton (version 2.
|
|
44
|
+
teuton (version 2.9.5)
|
|
49
45
|
```
|
|
50
46
|
|
|
51
|
-
Alias:
|
|
52
|
-
|
|
53
|
-
* `teuton v`
|
|
54
|
-
* `teuton -v`
|
|
55
|
-
* `teuton --version`
|
|
47
|
+
Alias: `teuton v`, `teuton -v`, `teuton --version`
|
|
56
48
|
|
|
57
49
|
# 3. Create new test
|
|
58
50
|
|
|
59
|
-
Create
|
|
51
|
+
Create test skeleton.
|
|
60
52
|
|
|
61
|
-
|
|
62
|
-
teuton new foo
|
|
63
|
-
```
|
|
53
|
+
Usage: `teuton new foo`
|
|
64
54
|
|
|
65
55
|
Example:
|
|
66
56
|
|
|
67
57
|
```console
|
|
68
|
-
|
|
58
|
+
$ teuton new foo
|
|
69
59
|
|
|
70
60
|
[INFO] Creating foo project skeleton
|
|
71
61
|
* Create dir => foo
|
|
@@ -78,24 +68,18 @@ This command will create the next structure:
|
|
|
78
68
|
| File/Directory | Description |
|
|
79
69
|
| --------------- | -------------- |
|
|
80
70
|
| foo | Base directory |
|
|
81
|
-
| foo/start.rb | Main
|
|
71
|
+
| foo/start.rb | Main file with test definitions |
|
|
82
72
|
| foo/config.yaml | YAML configuration file |
|
|
83
73
|
|
|
84
|
-
Alias:
|
|
85
|
-
|
|
86
|
-
* `teuton n foo`
|
|
87
|
-
* `teuton -n foo`
|
|
88
|
-
* `teuton --new foo`
|
|
74
|
+
Alias: `teuton n foo`, `teuton -n foo`, `teuton --new foo`
|
|
89
75
|
|
|
90
|
-
# 4. Check
|
|
76
|
+
# 4. Check test
|
|
91
77
|
|
|
92
|
-
|
|
93
|
-
teuton check DIRPATH
|
|
94
|
-
```
|
|
78
|
+
Check test and config files located into DIRPATH folder.
|
|
95
79
|
|
|
96
|
-
|
|
80
|
+
Usage: `teuton check DIRPATH`
|
|
97
81
|
|
|
98
|
-
[Example](
|
|
82
|
+
[Example](check-example.md)
|
|
99
83
|
|
|
100
84
|
| Command | Description |
|
|
101
85
|
| ---------------------------- | ----------- |
|
|
@@ -104,37 +88,21 @@ Description: this command check teuton test and config files located into DIRPAT
|
|
|
104
88
|
| teuton check path/to/file/foo.rb | Test content of foo.rb and foo.yaml files. |
|
|
105
89
|
| teuton check path/to/file/foo.rb --cname=demo | Test content of foo.rb and demo.yaml files.|
|
|
106
90
|
|
|
107
|
-
Alias:
|
|
91
|
+
Alias: `teuton c foo`, `teuton -c foo`, `teuton --check foo`
|
|
108
92
|
|
|
109
|
-
|
|
110
|
-
* `teuton -c foo`
|
|
111
|
-
* `teuton --check foo`
|
|
93
|
+
# 5. Run test
|
|
112
94
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
teuton run DIRPATH
|
|
117
|
-
```
|
|
95
|
+
Read about [how to run tests](howto-run-tests.md)
|
|
118
96
|
|
|
119
|
-
|
|
97
|
+
# 6. Show test info as README file
|
|
120
98
|
|
|
121
|
-
|
|
99
|
+
Create a readme file for the exercise.
|
|
122
100
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
* `teuton foo`
|
|
126
|
-
|
|
127
|
-
# 6. Show README
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
teuton readme DIRPATH
|
|
131
|
-
```
|
|
101
|
+
Usage: `teuton readme DIRPATH > README.md`
|
|
132
102
|
|
|
133
|
-
|
|
134
|
-
what kind of problem/exercise it is going to be evaluated. The students need this
|
|
135
|
-
information to resolv the problem/exercise into their machines.
|
|
103
|
+
This function reads test and config files, and generate Markdown output with guidelines and target descriptions.
|
|
136
104
|
|
|
137
|
-
|
|
105
|
+
Students will need this information to resolv the proposed problem/exercise into their machines.
|
|
138
106
|
|
|
139
107
|
Alias:
|
|
140
108
|
* `teuton r DIRPATH`
|
|
@@ -9,16 +9,12 @@
|
|
|
9
9
|
| --cpath | Specify path to config file | TEST-FOLDER/config.yaml |
|
|
10
10
|
| --cname | Specify name to config file | config.yaml |
|
|
11
11
|
|
|
12
|
-
Usage:
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
teuton check PATH-TO-TEST-FOLDER
|
|
16
|
-
```
|
|
12
|
+
Usage: `teuton check PATH-TO-TEST-FOLDER`
|
|
17
13
|
|
|
18
14
|
Example:
|
|
19
15
|
|
|
20
16
|
```bash
|
|
21
|
-
|
|
17
|
+
$ teuton check examples/02-target
|
|
22
18
|
|
|
23
19
|
+----------------------------+
|
|
24
20
|
| GROUP: Learn about targets |
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
[<< back](README.md)
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
# Run test
|
|
5
|
+
|
|
6
|
+
Run test located into DIRPATH folder.
|
|
7
|
+
|
|
8
|
+
Usage: `teuton run DIRPATH`
|
|
9
|
+
|
|
10
|
+
Alias: `teuton foo`
|
|
11
|
+
|
|
12
|
+
1. [Example](#1-example)
|
|
13
|
+
2. [Options](#2-options)
|
|
6
14
|
3. [Choosing config file](#3-choosing-config-file)
|
|
7
15
|
|
|
8
|
-
# 1.
|
|
16
|
+
# 1. Example
|
|
9
17
|
|
|
10
18
|
Running Teuton test located into `example/01-target` folder.
|
|
11
19
|
|
|
12
20
|
```bash
|
|
13
|
-
teuton run example/01-target
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Example:
|
|
21
|
+
$ teuton run example/01-target
|
|
17
22
|
|
|
18
|
-
```bash
|
|
19
23
|
------------------------------------
|
|
20
24
|
Started at 2023-01-21 13:32:24 +0000
|
|
21
25
|
F
|
|
@@ -29,10 +33,12 @@ CASE RESULTS
|
|
|
29
33
|
+------+-----------+-------+-------+
|
|
30
34
|
```
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
> Output files are saved into `var/01-target` folder.
|
|
37
|
+
|
|
38
|
+
# 2. Options
|
|
33
39
|
|
|
34
40
|
```
|
|
35
|
-
|
|
41
|
+
$ teuton help run
|
|
36
42
|
|
|
37
43
|
Usage:
|
|
38
44
|
teuton [run] [OPTIONS] DIRECTORY
|
data/docs/install/README.md
CHANGED
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Installation
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Teuton installation**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
| **S-node** | [SSH server installation](s-node.md) | S-NODE hosts are monitorized by T-NODE host |
|
|
7
|
+
We call a device with Teuton installed as t-node. [T-NODE](t-node.md) host monitors one or severals S-NODE hosts.
|
|
8
|
+
1. Install Ruby on your system.
|
|
9
|
+
2. `gem install teuton`
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
**SSH server installation**
|
|
12
|
+
|
|
13
|
+
We call e device with SSH/Telnet service as s-node. [S-NODE](s-node.md) hosts are monitorized by T-NODE host.
|
|
14
|
+
1. Install SSH service.
|
|
15
|
+
|
|
16
|
+
Read [modes of use](modes_of_use.md) to know more about differents T-NODE/S-NODE schemes.
|
|
13
17
|
|
|
14
18
|
## Tested OS list
|
|
15
19
|
|
data/docs/install/s-node.md
CHANGED
|
@@ -6,7 +6,7 @@ Install SSH server on every machine with S-NODE role.
|
|
|
6
6
|
|
|
7
7
|
**S-node**: Host where SSH server is installed. This hosts are monitorized by T-NODE host.
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**GNU/Linux installation**
|
|
10
10
|
|
|
11
11
|
Run this command as `root` user:
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Run this command as `root` user:
|
|
|
14
14
|
wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/s-node_install.sh | bash
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
**
|
|
17
|
+
**Windows installation**
|
|
18
18
|
|
|
19
19
|
Requirements:
|
|
20
20
|
* Windows 7+ / Windows Server 2003+
|
|
@@ -26,7 +26,7 @@ Run this command on **PowerShell (PS)** as `Administrator` user:
|
|
|
26
26
|
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/install/windows/s-node_install.ps1'))
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
**
|
|
29
|
+
**Mac OS X installation**
|
|
30
30
|
|
|
31
31
|
Run this command as `root` user:
|
|
32
32
|
|
data/docs/install/t-node.md
CHANGED
|
@@ -30,7 +30,7 @@ Option B:
|
|
|
30
30
|
|
|
31
31
|
If you don't know how to install Ruby on your system, execute this script to run automatical installation for your OS.
|
|
32
32
|
|
|
33
|
-
**
|
|
33
|
+
**GNU/Linux installation**
|
|
34
34
|
|
|
35
35
|
Run this command as `root` user:
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Run this command as `root` user:
|
|
|
38
38
|
wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/t-node_install.sh | bash
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
**
|
|
41
|
+
**Windows installation**
|
|
42
42
|
|
|
43
43
|
Requirements:
|
|
44
44
|
* Windows 7+ / Windows Server 2003+
|
|
@@ -50,7 +50,7 @@ Run this command on **PowerShell (PS)** as `Administrator` user:
|
|
|
50
50
|
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/install/windows/t-node_install.ps1'))
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
**
|
|
53
|
+
**Mac OS X installation**
|
|
54
54
|
|
|
55
55
|
Run this command as admin user (member of `admin` group):
|
|
56
56
|
|
|
@@ -58,14 +58,83 @@ Run this command as admin user (member of `admin` group):
|
|
|
58
58
|
curl -sL https://raw.githubusercontent.com/teuton-software/teuton/master/install/mac/t-node_install.sh | bash
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
# 4. Vagrant
|
|
61
|
+
# 4. Vagrant and Docker installation
|
|
62
62
|
|
|
63
63
|
Choose this way if you plan to install Teuton into virtual machines or containers, and you are familiar with Vagrant and Docker technologies.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
## 4.1 Install using Vagrant
|
|
66
|
+
|
|
67
|
+
* First, install `Vagrant` and `VirtualBox` on your host.
|
|
68
|
+
* Create directory for vagrant project. For example, `mkdir teuton-vagrant`.
|
|
69
|
+
* Move into that directory: `cd teuton-vagrant`.
|
|
70
|
+
* Choose and download [Vagrantfile](../../install/vagrant).
|
|
71
|
+
* Run `vagrant up` to create your Virtual Machine.
|
|
72
|
+
|
|
73
|
+
## 4.2 Install using Docker
|
|
74
|
+
|
|
75
|
+
First:
|
|
76
|
+
* Install `docker` on your host.
|
|
77
|
+
|
|
78
|
+
Second, choose:
|
|
79
|
+
* Pulling docker image from remote or
|
|
80
|
+
* Rebuild local docker image.
|
|
81
|
+
|
|
82
|
+
## 4.2 Pulling docker images from remote
|
|
83
|
+
|
|
84
|
+
Run this command to pull **dvarrui/teuton** image from Docker Hub and create "teuton" container:
|
|
85
|
+
|
|
86
|
+
`docker run --name teuton -v /home/teuton -i -t dvarrui/teuton /bin/bash`
|
|
87
|
+
|
|
88
|
+
## 4.2 Rebuild local docker image
|
|
89
|
+
|
|
90
|
+
1. Create Dockerfile like this:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
FROM debian:latest
|
|
94
|
+
|
|
95
|
+
MAINTAINER teuton 2.1
|
|
96
|
+
|
|
97
|
+
RUN apt-get update
|
|
98
|
+
RUN apt-get install -y apt-utils
|
|
99
|
+
RUN apt-get install -y vim tree
|
|
100
|
+
RUN apt-get install -y ruby
|
|
101
|
+
RUN gem install teuton
|
|
102
|
+
RUN mkdir /home/teuton
|
|
103
|
+
|
|
104
|
+
EXPOSE 80
|
|
105
|
+
|
|
106
|
+
WORKDIR /home/teuton
|
|
107
|
+
CMD ["/bin/bash"]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
1. Build local docker image **dvarrui/teuton** with `docker build -t dvarrui/teuton .`
|
|
111
|
+
1. Create **teuton** container with `docker run --name teuton -v /home/teuton -i -t dvarrui/teuton /bin/bash`.
|
|
112
|
+
|
|
113
|
+
> Notice `/home/teuton` folder is persistent volume.
|
|
66
114
|
|
|
67
115
|
# 5. Source code
|
|
68
116
|
|
|
69
117
|
If you want to install Teuton by your own, or there are not installation scripts for your OS, and you don't want to use Vagrant then... here you have information how to install all the required packages for Teuton.
|
|
70
118
|
|
|
71
|
-
|
|
119
|
+
Manual installation:
|
|
120
|
+
1. Git installation
|
|
121
|
+
* Install Git.
|
|
122
|
+
* Run `git --version` to show current version
|
|
123
|
+
1. Ruby installation
|
|
124
|
+
* Install ruby.
|
|
125
|
+
* Run `ruby -v` to show current version (2.1.3p242+)
|
|
126
|
+
1. Rake installation
|
|
127
|
+
* Run `gem install rake`, then
|
|
128
|
+
* `rake --version` to show current version (10.4.2+).
|
|
129
|
+
1. Download this project
|
|
130
|
+
* (a) `git clone https://github.com/dvarrui/teuton.git` or
|
|
131
|
+
* (b) Download and unzip [file](https://github.com/dvarrui/teuton-panel/archive/master.zip).
|
|
132
|
+
1. Move into Teuton folder
|
|
133
|
+
* Run `cd teuton`
|
|
134
|
+
1. Gems installation.
|
|
135
|
+
* `rake install:gems`, to install required gems.
|
|
136
|
+
1. Only for developers
|
|
137
|
+
* Run `rake install:debian` or
|
|
138
|
+
* `rake install:opensuse`, install gem for developers.
|
|
139
|
+
1. Final check
|
|
140
|
+
* `rake`
|
|
@@ -38,8 +38,8 @@ class ExpectSequence
|
|
|
38
38
|
|
|
39
39
|
def find_best_state
|
|
40
40
|
@states.each do |state|
|
|
41
|
-
state[:score] =
|
|
42
|
-
state[:fails] =
|
|
41
|
+
state[:score] = state[:steps].select { it }.size
|
|
42
|
+
state[:fails] = state[:steps].select { !it }.size
|
|
43
43
|
state[:ok] = (state[:fails] == 0)
|
|
44
44
|
end
|
|
45
45
|
best = @states[0]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "rainbow"
|
|
4
|
+
require_relative "../utils/project"
|
|
4
5
|
|
|
5
6
|
##
|
|
6
7
|
# Execute "export" order: Export every case report
|
|
@@ -57,13 +58,20 @@ class ExportManager
|
|
|
57
58
|
##
|
|
58
59
|
# Preserve output files for current project execution
|
|
59
60
|
def preserve_files
|
|
60
|
-
|
|
61
|
+
srcdir = File.join(
|
|
62
|
+
Project.value[:output_basedir],
|
|
63
|
+
Project.value[:test_name]
|
|
64
|
+
)
|
|
65
|
+
|
|
61
66
|
t = Time.now
|
|
62
|
-
data = {
|
|
67
|
+
data = {
|
|
68
|
+
year: t.year, month: t.month, day: t.day,
|
|
69
|
+
hour: t.hour, min: t.min, sec: t.sec
|
|
70
|
+
}
|
|
63
71
|
subdir = format("%<year>s%<month>02d%<day>02d-" \
|
|
64
72
|
"%<hour>02d%<min>02d%<sec>02d", data)
|
|
65
|
-
logdir = File.join(
|
|
66
|
-
|
|
73
|
+
logdir = File.join(srcdir, subdir)
|
|
74
|
+
|
|
67
75
|
puts "[INFO] Preserving files => #{logdir}"
|
|
68
76
|
FileUtils.mkdir(logdir)
|
|
69
77
|
Dir.glob(File.join(srcdir, "**.*")).each { |file| FileUtils.cp(file, logdir) }
|
|
@@ -26,7 +26,7 @@ class CaseManager
|
|
|
26
26
|
@report.tail[:finish_time] = finish_time
|
|
27
27
|
@report.tail[:duration] = finish_time - start_time
|
|
28
28
|
|
|
29
|
-
duration = format("%3.3f",
|
|
29
|
+
duration = format("%3.3f", finish_time - start_time)
|
|
30
30
|
verboseln Rainbow("\nFinished in #{duration} seconds").green
|
|
31
31
|
verboseln Rainbow("-" * 36).green
|
|
32
32
|
verboseln " "
|
data/lib/teuton/readme/readme.rb
CHANGED
data/lib/teuton/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: teuton
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.9.
|
|
4
|
+
version: 2.9.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Vargas Ruiz
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-11-06 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rainbow
|
|
@@ -127,9 +127,9 @@ extra_rdoc_files:
|
|
|
127
127
|
- docs/changelog/changelog.2.md
|
|
128
128
|
- docs/changelog/todo.md
|
|
129
129
|
- docs/commands/README.md
|
|
130
|
-
- docs/commands/
|
|
131
|
-
- docs/commands/
|
|
132
|
-
- docs/diagram.md
|
|
130
|
+
- docs/commands/check-example.md
|
|
131
|
+
- docs/commands/howto-run-tests.md
|
|
132
|
+
- docs/devel/diagram.md
|
|
133
133
|
- docs/dsl/README.md
|
|
134
134
|
- docs/dsl/expect.md
|
|
135
135
|
- docs/dsl/export.md
|
|
@@ -153,11 +153,9 @@ extra_rdoc_files:
|
|
|
153
153
|
- docs/ideas/servidor-de-retos.md
|
|
154
154
|
- docs/ideas/todo.md
|
|
155
155
|
- docs/install/README.md
|
|
156
|
-
- docs/install/manual.md
|
|
157
156
|
- docs/install/modes_of_use.md
|
|
158
157
|
- docs/install/s-node.md
|
|
159
158
|
- docs/install/t-node.md
|
|
160
|
-
- docs/install/vagrant_docker.md
|
|
161
159
|
- docs/learn/01-cmd_new.md
|
|
162
160
|
- docs/learn/02-target.md
|
|
163
161
|
- docs/learn/03-remote_hosts.md
|
|
@@ -196,9 +194,9 @@ files:
|
|
|
196
194
|
- docs/changelog/changelog.2.md
|
|
197
195
|
- docs/changelog/todo.md
|
|
198
196
|
- docs/commands/README.md
|
|
199
|
-
- docs/commands/
|
|
200
|
-
- docs/commands/
|
|
201
|
-
- docs/diagram.md
|
|
197
|
+
- docs/commands/check-example.md
|
|
198
|
+
- docs/commands/howto-run-tests.md
|
|
199
|
+
- docs/devel/diagram.md
|
|
202
200
|
- docs/dsl/README.md
|
|
203
201
|
- docs/dsl/expect.md
|
|
204
202
|
- docs/dsl/export.md
|
|
@@ -222,11 +220,9 @@ files:
|
|
|
222
220
|
- docs/ideas/servidor-de-retos.md
|
|
223
221
|
- docs/ideas/todo.md
|
|
224
222
|
- docs/install/README.md
|
|
225
|
-
- docs/install/manual.md
|
|
226
223
|
- docs/install/modes_of_use.md
|
|
227
224
|
- docs/install/s-node.md
|
|
228
225
|
- docs/install/t-node.md
|
|
229
|
-
- docs/install/vagrant_docker.md
|
|
230
226
|
- docs/learn/01-cmd_new.md
|
|
231
227
|
- docs/learn/02-target.md
|
|
232
228
|
- docs/learn/03-remote_hosts.md
|
data/docs/install/manual.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
[<< back](README.md)
|
|
2
|
-
|
|
3
|
-
# Teuton installation for developers
|
|
4
|
-
|
|
5
|
-
There are diferents Teuton [Modes of use](Modes of use). For every mode there are 2 node types and every node has their own installation:
|
|
6
|
-
|
|
7
|
-
* **T-node**: This host has installed Teuton software.
|
|
8
|
-
* **S-node**: This host has installed SSH server.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
# T-NODE: Manual installation
|
|
12
|
-
|
|
13
|
-
1. Git installation
|
|
14
|
-
* Install Git.
|
|
15
|
-
* Run `git --version` to show current version
|
|
16
|
-
1. Ruby installation
|
|
17
|
-
* Install ruby.
|
|
18
|
-
* Run `ruby -v` to show current version (2.1.3p242+)
|
|
19
|
-
1. Rake installation
|
|
20
|
-
* Run `gem install rake`, then
|
|
21
|
-
* `rake --version` to show current version (10.4.2+).
|
|
22
|
-
1. Download this project
|
|
23
|
-
* (a) `git clone https://github.com/dvarrui/teuton.git` or
|
|
24
|
-
* (b) Download and unzip [file](https://github.com/dvarrui/teuton-panel/archive/master.zip).
|
|
25
|
-
1. Move into Teuton folder
|
|
26
|
-
* Run `cd teuton`
|
|
27
|
-
1. Gems installation.
|
|
28
|
-
* `rake install:gems`, to install required gems.
|
|
29
|
-
1. Only for developers
|
|
30
|
-
* Run `rake install:debian` or
|
|
31
|
-
* `rake install:opensuse`, install gem for developers.
|
|
32
|
-
1. Final check
|
|
33
|
-
* `rake`
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
# S-NODE: Manual installation
|
|
38
|
-
|
|
39
|
-
* Install SSH server on your host.
|
|
40
|
-
|
|
41
|
-
> How to [install SSH on Windows](s-node.md)
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
[<< back](README.md)
|
|
2
|
-
|
|
3
|
-
# Vagrant and Docker installation
|
|
4
|
-
|
|
5
|
-
1. Vagrant
|
|
6
|
-
2. Docker
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
# 1. Install using Vagrant
|
|
10
|
-
|
|
11
|
-
* First, install `Vagrant` and `VirtualBox` on your host.
|
|
12
|
-
* Create directory for vagrant project. For example, `mkdir teuton-vagrant`.
|
|
13
|
-
* Move into that directory: `cd teuton-vagrant`.
|
|
14
|
-
* Choose and download [Vagrantfile](../../install/vagrant).
|
|
15
|
-
* Run `vagrant up` to create your Virtual Machine.
|
|
16
|
-
|
|
17
|
-
# 2. Install using Docker
|
|
18
|
-
|
|
19
|
-
First:
|
|
20
|
-
* Install `docker` on your host.
|
|
21
|
-
|
|
22
|
-
Second, choose:
|
|
23
|
-
* Pulling docker image from remote or
|
|
24
|
-
* Rebuild local docker image.
|
|
25
|
-
|
|
26
|
-
## 2.1 Pulling docker images from remote
|
|
27
|
-
|
|
28
|
-
Run this command to pull **dvarrui/teuton** image from Docker Hub and create "teuton" container:
|
|
29
|
-
|
|
30
|
-
`docker run --name teuton -v /home/teuton -i -t dvarrui/teuton /bin/bash`
|
|
31
|
-
|
|
32
|
-
## 2.2 Rebuild local docker image
|
|
33
|
-
|
|
34
|
-
1. Create Dockerfile like this:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
FROM debian:latest
|
|
38
|
-
|
|
39
|
-
MAINTAINER teuton 2.1
|
|
40
|
-
|
|
41
|
-
RUN apt-get update
|
|
42
|
-
RUN apt-get install -y apt-utils
|
|
43
|
-
RUN apt-get install -y vim tree
|
|
44
|
-
RUN apt-get install -y ruby
|
|
45
|
-
RUN gem install teuton
|
|
46
|
-
RUN mkdir /home/teuton
|
|
47
|
-
|
|
48
|
-
EXPOSE 80
|
|
49
|
-
|
|
50
|
-
WORKDIR /home/teuton
|
|
51
|
-
CMD ["/bin/bash"]
|
|
52
|
-
```
|
|
53
|
-
1. Build local docker image **dvarrui/teuton** with `docker build -t dvarrui/teuton .`
|
|
54
|
-
1. Create **teuton** container with `docker run --name teuton -v /home/teuton -i -t dvarrui/teuton /bin/bash`.
|
|
55
|
-
|
|
56
|
-
> Notice `/home/teuton` folder is persistent volume.
|
|
File without changes
|