@@ -32,7 +32,7 @@ def test_decrypt
32
32
def test_set_ports
33
33
tasks = Options . parse ( [ "-b" ] )
34
34
assert ( tasks [ :set_ports ] )
35
- assert_equal ( tasks [ :unit_tests ] , [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ] )
35
+ assert_equal ( tasks [ :unit_tests ] , expected_unit_test_tasks )
36
36
37
37
tasks = Options . parse ( [ "-r" ] )
38
38
assert ( tasks [ :set_ports ] )
@@ -81,7 +81,7 @@ def test_acceptance_test_target_task_default_value
81
81
ClimateControl . modify HOST_TO_TEST : nil , AWESTRUCT_HOST_PORT : '32768' do
82
82
tasks = Options . parse ( [ "--acceptance_test_docker" ] )
83
83
assert ( tasks [ :build ] )
84
- assert_equal ( tasks [ :unit_tests ] , [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ] )
84
+ assert_equal ( tasks [ :unit_tests ] , expected_unit_test_tasks )
85
85
refute ( tasks [ :set_ports ] )
86
86
assert_equal ( nil , ENV [ 'HOST_TO_TEST' ] )
87
87
assert_equal ( [ "--no-deps" , "--rm" , "--service-ports" , "awestruct_acceptance" , "bundle exec rake features" ] , tasks [ :acceptance_test_target_task ] )
@@ -91,7 +91,7 @@ def test_acceptance_test_target_task_default_value
91
91
def test_acceptance_test_target_task
92
92
tasks = Options . parse ( [ "--acceptance_test_target=http://example.com" ] )
93
93
assert ( tasks [ :build ] )
94
- assert_equal ( tasks [ :unit_tests ] , [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ] )
94
+ assert_equal ( tasks [ :unit_tests ] , expected_unit_test_tasks )
95
95
assert_equal ( 'http://example.com' , ENV [ 'HOST_TO_TEST' ] )
96
96
refute ( tasks [ :set_ports ] )
97
97
assert_equal ( [ "--no-deps" , "--rm" , "--service-ports" , "awestruct" , "bundle exec rake features" ] , tasks [ :acceptance_test_target_task ] )
@@ -102,7 +102,7 @@ def test_run_docker_nightly
102
102
refute_equal ( [ "--no-deps" , "--rm" , "--service-ports" , "awestruct" , "bundle exec rake acceptance_test_target" ] , tasks [ :acceptance_test_target_task ] )
103
103
assert_equal ( [ "--no-deps" , "--rm" , "--service-ports" , "awestruct" , "bundle exec rake create_pr_dirs[docker-nightly,build,docker-nightly] clean deploy[staging_docker]" ] , tasks [ :awestruct_command_args ] )
104
104
assert ( tasks [ :kill_all ] )
105
- assert_equal ( tasks [ :unit_tests ] , [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ] )
105
+ assert_equal ( tasks [ :unit_tests ] , expected_unit_test_tasks )
106
106
assert ( tasks [ :set_ports ] )
107
107
assert ( tasks [ :build ] )
108
108
assert_equal ( tasks [ :supporting_services ] , %w( -d elasticsearch mysql searchisko searchiskoconfigure ) )
@@ -112,15 +112,15 @@ def test_run_stage_pr
112
112
tasks = Options . parse ( [ "--stage-pr" , "6" ] )
113
113
assert ( tasks [ :kill_all ] )
114
114
assert ( tasks [ :build ] )
115
- assert_equal ( tasks [ :unit_tests ] , [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ] )
115
+ assert_equal ( tasks [ :unit_tests ] , expected_unit_test_tasks )
116
116
assert ( tasks [ :set_ports ] )
117
117
assert_equal ( tasks [ :supporting_services ] , %w( -d elasticsearch mysql searchisko searchiskoconfigure ) )
118
118
end
119
119
120
120
def test_run_the_stack
121
121
tasks = Options . parse ( [ "--run-the-stack" ] )
122
122
assert ( tasks [ :kill_all ] )
123
- assert_equal ( tasks [ :unit_tests ] , [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ] )
123
+ assert_equal ( tasks [ :unit_tests ] , expected_unit_test_tasks )
124
124
assert_equal ( tasks [ :supporting_services ] , %w( -d elasticsearch mysql searchisko searchiskoconfigure ) )
125
125
assert_equal ( [ '--no-deps' , '--rm' , '--service-ports' , 'awestruct' , 'rake git_setup clean preview[docker]' ] , tasks [ :awestruct_command_args ] )
126
126
end
@@ -130,12 +130,16 @@ def test_test_task
130
130
assert ( tasks [ :build ] )
131
131
assert ( tasks [ :set_ports ] )
132
132
assert ( tasks [ :decrypt ] )
133
- assert_equal ( tasks [ :unit_tests ] , [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ] )
133
+ assert_equal ( tasks [ :unit_tests ] , expected_unit_test_tasks )
134
134
end
135
135
136
136
def test_docker_url
137
137
tasks = Options . parse ( [ "-d" , "SOMETHING" ] )
138
138
assert_equal ( "SOMETHING" , tasks [ :docker ] )
139
139
end
140
+
141
+ private def expected_unit_test_tasks
142
+ [ '--no-deps' , '--rm' , 'awestruct' , 'bundle exec rake test' ]
143
+ end
140
144
end
141
145
0 commit comments