-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrun_params.feature
89 lines (78 loc) · 2.99 KB
/
run_params.feature
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
Feature: Run parameters
Background:
Given a new working directory
When I successfully run "git init"
And I successfully run "ctf init"
And I successfully run "ctf remote add steps https://github.com/Containers-Testing-Framework/common-steps.git"
And I successfully run "ctf remote add features https://github.com/Containers-Testing-Framework/common-features.git"
And I create a file named "tests/environment.py" with
"""
from steps.common_steps.common_environment import docker_setup
def before_all(context):
docker_setup(context)
"""
Scenario: Verbose
When I successfully run "ctf -v run"
Then the command output should contain:
"""
INFO: Running behave inside working directory 'behave -v
"""
Scenario: Junit
When I successfully run "ctf -v run -j junit_results_dir"
Then the command output should contain:
"""
INFO: Running behave inside working directory 'behave -v --junit --junit-directory=junit_results_dir
"""
And the directory "workdir/junit_results_dir" should exist
Scenario: Behave data
When I successfully run "ctf run --behave-data FOO=Bar"
Then the command output should contain:
"""
INFO: Running behave inside working directory 'behave -D FOO=Bar
"""
Scenario: Behave tags (no verbose)
When I successfully run "ctf run --behave-tags tag1 --behave-tags ~tag2"
Then the command output should contain:
"""
INFO: Running behave inside working directory 'behave -t tag1 -t ~tag2 --no-skipped -D
"""
Scenario: Behave tags with verbose
When I successfully run "ctf -v run --behave-tags tag1 --behave-tags ~tag2"
Then the command output should contain:
"""
INFO: Running behave inside working directory 'behave -v -t tag1 -t ~tag2 -D
"""
Scenario: Behave opts
Given a directory named "tests/features"
And a file named "tests/features/foo.feature" with:
"""
Feature: test feature
Scenario: First scenario
Scenario: Second scenario
Scenario: Third scenario
"""
When I successfully run "ctf run --behave-opts 'tests/features/foo.feature:5'"
Then the command output should contain:
"""
INFO: Running behave inside working directory 'behave tests/features/foo.feature:5'
"""
And the command output should contain:
"""
Scenario: Second scenario
"""
And the command output should not contain:
"""
Scenario: First scenario
"""
And the command output should not contain:
"""
Scenario: Third scenario
"""
Scenario: Run with existing work directory
Given a directory named "workdir"
When I successfully run "ctf -v run"
Then the command output should contain:
"""
DEBUG: Working directory '{__WORKDIR__}/workdir' exists. Removing it!
DEBUG: Creating working directory '/tmp/__WORKDIR__/workdir'.
"""