bucky-core 0.10.6 → 0.10.13
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 +5 -5
- data/.circleci/config.yml +9 -7
- data/.circleci/deploy_to_rubygems.sh +1 -1
- data/.rubocop.yml +2 -2
- data/Dockerfile +2 -14
- data/Dockerfile.system-test +2 -1
- data/Gemfile.lock +47 -44
- data/bucky-core.gemspec +5 -4
- data/docker-compose.system-test.yml +3 -0
- data/exe/bucky +3 -0
- data/lib/bucky/core/test_core/test_case_loader.rb +5 -0
- data/lib/bucky/test_equipment/user_operation/user_operation_helper.rb +0 -1
- data/lib/bucky/test_equipment/verifications/status_checker.rb +22 -11
- data/lib/bucky/version.rb +1 -1
- data/system_testing/test_bucky_project/config/e2e_config.yml +1 -1
- data/system_testing/test_bucky_project/services/service_a/pc/pageobject/index.rb +1 -1
- data/system_testing/test_bucky_project/services/service_a/pc/verifications/index.rb +1 -1
- data/system_testing/test_bucky_project/services/service_a/sp/pageobject/index.rb +1 -1
- data/system_testing/test_bucky_project/services/service_a/tablet/pageobject/index.rb +1 -1
- metadata +24 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ccb222e4d46f71d5351c9fcfde3e700998714b8e78195b0e4455c4cbb233f7e2
|
|
4
|
+
data.tar.gz: db981e13bfc12ca2a67fc6c05867553d16590b030083d9f805d90f23546d45fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 268616fca9bc44744125d61b64111f287b525b47bcaec655133dfa51f8c85c2c197e9194939be5609197c28101c2605084d9708e88a3ec7a09b86704cdf2c691
|
|
7
|
+
data.tar.gz: 1d78e67f2f27b1de60c0104a49e6753a78d4b462a5f093db8317accc364b9b9ca1e7f276926cde555f72f1aefc2f4e2b0f1bd41b64b73f1a6456d4c8e0a32d2f
|
data/.circleci/config.yml
CHANGED
|
@@ -5,7 +5,7 @@ jobs:
|
|
|
5
5
|
steps:
|
|
6
6
|
- checkout
|
|
7
7
|
- restore_cache:
|
|
8
|
-
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
|
|
8
|
+
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
|
|
9
9
|
- run:
|
|
10
10
|
command: |
|
|
11
11
|
if [ ! -f ~/caches/images.tar ]; then
|
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
docker save $(docker images | awk 'NR>=2 && ! /^<none>/{print $1}') -o ~/caches/images.tar
|
|
15
15
|
fi
|
|
16
16
|
- save_cache:
|
|
17
|
-
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
|
|
17
|
+
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
|
|
18
18
|
paths: ~/caches/images.tar
|
|
19
19
|
system_test:
|
|
20
20
|
machine: true
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
steps:
|
|
23
23
|
- checkout
|
|
24
24
|
- restore_cache:
|
|
25
|
-
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
|
|
25
|
+
key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
|
|
26
26
|
- run:
|
|
27
27
|
command: docker load -q -i ~/caches/images.tar
|
|
28
28
|
- run:
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
unit_test:
|
|
38
38
|
working_directory: ~/bucky-core
|
|
39
39
|
docker:
|
|
40
|
-
- image: circleci/ruby:2.
|
|
40
|
+
- image: circleci/ruby:2.5.8
|
|
41
41
|
environment:
|
|
42
42
|
CC_TEST_REPORTER_ID: fd7bd9d517bdf8953c4d4803ca4ad7539d12d5c760048b8daf80cbc7d54fb262
|
|
43
43
|
steps:
|
|
@@ -62,7 +62,7 @@ jobs:
|
|
|
62
62
|
./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
|
63
63
|
static_code_analysis:
|
|
64
64
|
docker:
|
|
65
|
-
- image: circleci/ruby:2.
|
|
65
|
+
- image: circleci/ruby:2.5.8
|
|
66
66
|
steps:
|
|
67
67
|
- checkout
|
|
68
68
|
- type: cache-restore
|
|
@@ -77,7 +77,7 @@ jobs:
|
|
|
77
77
|
path: report.html
|
|
78
78
|
publish_to_rubygems:
|
|
79
79
|
docker:
|
|
80
|
-
- image: circleci/ruby:2.
|
|
80
|
+
- image: circleci/ruby:2.5.8
|
|
81
81
|
steps:
|
|
82
82
|
- add_ssh_keys:
|
|
83
83
|
finerprints:
|
|
@@ -130,4 +130,6 @@ workflows:
|
|
|
130
130
|
tags:
|
|
131
131
|
only: /^v[0-9]{1,}(\.[0-9]{1,}){2}$/
|
|
132
132
|
branches:
|
|
133
|
-
ignore: /.*/
|
|
133
|
+
ignore: /.*/
|
|
134
|
+
requires:
|
|
135
|
+
- publish_to_rubygems
|
data/.rubocop.yml
CHANGED
|
@@ -8,7 +8,7 @@ AllCops:
|
|
|
8
8
|
- 'template/**/*'
|
|
9
9
|
- 'tmp/**/*'
|
|
10
10
|
- 'vendor/**/*'
|
|
11
|
-
TargetRubyVersion: 2.
|
|
11
|
+
TargetRubyVersion: 2.5
|
|
12
12
|
|
|
13
13
|
AbcSize:
|
|
14
14
|
Enabled: false
|
|
@@ -61,7 +61,7 @@ MethodLength:
|
|
|
61
61
|
Enabled: false
|
|
62
62
|
|
|
63
63
|
ModuleLength:
|
|
64
|
-
Max:
|
|
64
|
+
Max: 130
|
|
65
65
|
Exclude:
|
|
66
66
|
- 'spec/**/*.rb'
|
|
67
67
|
|
data/Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FROM ruby:2.
|
|
1
|
+
FROM ruby:2.5.8-alpine
|
|
2
2
|
ENV LANG ja_JP.UTF-8
|
|
3
3
|
ENV PAGER busybox less
|
|
4
4
|
|
|
@@ -21,19 +21,7 @@ RUN apk update && \
|
|
|
21
21
|
yaml-dev \
|
|
22
22
|
zlib-dev
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
WORKDIR $BC_DIR
|
|
26
|
-
COPY . $BC_DIR
|
|
27
|
-
|
|
28
|
-
RUN \
|
|
29
|
-
gem install bundler -v 1.17.3 && \
|
|
30
|
-
echo 'gem: --no-document' >> ~/.gemrc && \
|
|
31
|
-
cp ~/.gemrc /etc/gemrc && \
|
|
32
|
-
chmod uog+r /etc/gemrc && \
|
|
33
|
-
bundle config --global build.nokogiri --use-system-libraries && \
|
|
34
|
-
bundle config --global jobs 4 && \
|
|
35
|
-
bundle install && \
|
|
36
|
-
rm -rf ~/.gem
|
|
24
|
+
RUN gem install bucky-core
|
|
37
25
|
|
|
38
26
|
WORKDIR /app
|
|
39
27
|
RUN chown -R nobody:nobody /app
|
data/Dockerfile.system-test
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
FROM ruby:2.
|
|
1
|
+
FROM ruby:2.5.8-alpine
|
|
2
2
|
ENV LANG ja_JP.UTF-8
|
|
3
3
|
ENV PAGER busybox less
|
|
4
4
|
|
|
@@ -29,6 +29,7 @@ RUN git clone https://github.com/bats-core/bats-core.git /tmp/bats-core \
|
|
|
29
29
|
&& rm -rf /tmp/bats-core
|
|
30
30
|
|
|
31
31
|
ENV BC_DIR /bucky-core/
|
|
32
|
+
ENV PATH /bucky-core/exe/:$PATH
|
|
32
33
|
WORKDIR $BC_DIR
|
|
33
34
|
COPY . $BC_DIR
|
|
34
35
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bucky-core (0.10.
|
|
4
|
+
bucky-core (0.10.7)
|
|
5
5
|
addressable (~> 2.5)
|
|
6
6
|
color_echo (~> 3.1)
|
|
7
|
-
json (~> 2.
|
|
8
|
-
nokogiri (~> 1.
|
|
7
|
+
json (~> 2.3.0)
|
|
8
|
+
nokogiri (~> 1.11.1)
|
|
9
9
|
parallel (~> 1.11)
|
|
10
10
|
ruby-mysql (~> 2.9)
|
|
11
11
|
selenium-webdriver (~> 3.142)
|
|
@@ -18,54 +18,56 @@ GEM
|
|
|
18
18
|
addressable (2.7.0)
|
|
19
19
|
public_suffix (>= 2.0.2, < 5.0)
|
|
20
20
|
ansi (1.5.0)
|
|
21
|
-
ast (2.4.
|
|
21
|
+
ast (2.4.1)
|
|
22
22
|
awesome_print (1.8.0)
|
|
23
23
|
binding_of_caller (0.8.0)
|
|
24
24
|
debug_inspector (>= 0.0.1)
|
|
25
|
-
byebug (
|
|
25
|
+
byebug (11.1.3)
|
|
26
26
|
childprocess (3.0.0)
|
|
27
|
-
coderay (1.1.
|
|
27
|
+
coderay (1.1.3)
|
|
28
28
|
color_echo (3.1.1)
|
|
29
|
-
debug_inspector (0.0
|
|
30
|
-
diff-lcs (1.
|
|
29
|
+
debug_inspector (1.0.0)
|
|
30
|
+
diff-lcs (1.4.4)
|
|
31
31
|
docile (1.1.5)
|
|
32
32
|
hirb (0.7.3)
|
|
33
|
-
jaro_winkler (1.5.
|
|
34
|
-
json (2.1
|
|
35
|
-
method_source (0.
|
|
36
|
-
mini_portile2 (2.
|
|
37
|
-
nokogiri (1.
|
|
38
|
-
mini_portile2 (~> 2.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
33
|
+
jaro_winkler (1.5.4)
|
|
34
|
+
json (2.3.1)
|
|
35
|
+
method_source (1.0.0)
|
|
36
|
+
mini_portile2 (2.5.0)
|
|
37
|
+
nokogiri (1.11.1)
|
|
38
|
+
mini_portile2 (~> 2.5.0)
|
|
39
|
+
racc (~> 1.4)
|
|
40
|
+
parallel (1.20.1)
|
|
41
|
+
parser (3.0.0.0)
|
|
42
|
+
ast (~> 2.4.1)
|
|
43
|
+
power_assert (1.2.0)
|
|
44
|
+
pry (0.13.1)
|
|
45
|
+
coderay (~> 1.1)
|
|
46
|
+
method_source (~> 1.0)
|
|
47
|
+
pry-byebug (3.9.0)
|
|
48
|
+
byebug (~> 11.0)
|
|
49
|
+
pry (~> 0.13.0)
|
|
50
|
+
pry-stack_explorer (0.4.13)
|
|
51
|
+
binding_of_caller (~> 0.7)
|
|
52
|
+
pry (~> 0.13)
|
|
53
|
+
public_suffix (4.0.6)
|
|
54
|
+
racc (1.5.2)
|
|
53
55
|
rainbow (3.0.0)
|
|
54
|
-
rake (13.0.
|
|
55
|
-
rspec (3.
|
|
56
|
-
rspec-core (~> 3.
|
|
57
|
-
rspec-expectations (~> 3.
|
|
58
|
-
rspec-mocks (~> 3.
|
|
59
|
-
rspec-core (3.
|
|
60
|
-
rspec-support (~> 3.
|
|
61
|
-
rspec-expectations (3.
|
|
56
|
+
rake (13.0.3)
|
|
57
|
+
rspec (3.10.0)
|
|
58
|
+
rspec-core (~> 3.10.0)
|
|
59
|
+
rspec-expectations (~> 3.10.0)
|
|
60
|
+
rspec-mocks (~> 3.10.0)
|
|
61
|
+
rspec-core (3.10.1)
|
|
62
|
+
rspec-support (~> 3.10.0)
|
|
63
|
+
rspec-expectations (3.10.1)
|
|
62
64
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
63
|
-
rspec-support (~> 3.
|
|
64
|
-
rspec-mocks (3.
|
|
65
|
+
rspec-support (~> 3.10.0)
|
|
66
|
+
rspec-mocks (3.10.1)
|
|
65
67
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
66
|
-
rspec-support (~> 3.
|
|
67
|
-
rspec-support (3.
|
|
68
|
-
rspec_junit_formatter (0.
|
|
68
|
+
rspec-support (~> 3.10.0)
|
|
69
|
+
rspec-support (3.10.1)
|
|
70
|
+
rspec_junit_formatter (0.4.1)
|
|
69
71
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
70
72
|
rubocop (0.68.1)
|
|
71
73
|
jaro_winkler (~> 1.5.1)
|
|
@@ -75,7 +77,7 @@ GEM
|
|
|
75
77
|
ruby-progressbar (~> 1.7)
|
|
76
78
|
unicode-display_width (>= 1.4.0, < 1.6)
|
|
77
79
|
ruby-mysql (2.9.14)
|
|
78
|
-
ruby-progressbar (1.
|
|
80
|
+
ruby-progressbar (1.11.0)
|
|
79
81
|
rubyzip (2.3.0)
|
|
80
82
|
selenium-webdriver (3.142.7)
|
|
81
83
|
childprocess (>= 0.5, < 4.0)
|
|
@@ -90,7 +92,7 @@ GEM
|
|
|
90
92
|
hirb
|
|
91
93
|
simplecov
|
|
92
94
|
simplecov-html (0.10.2)
|
|
93
|
-
test-unit (3.3.
|
|
95
|
+
test-unit (3.3.9)
|
|
94
96
|
power_assert
|
|
95
97
|
unicode-display_width (1.5.0)
|
|
96
98
|
|
|
@@ -108,7 +110,8 @@ DEPENDENCIES
|
|
|
108
110
|
rake (~> 13)
|
|
109
111
|
rspec (~> 3.6)
|
|
110
112
|
rspec_junit_formatter (~> 0.3)
|
|
111
|
-
rubocop (~> 0.
|
|
113
|
+
rubocop (~> 0.68.1)
|
|
114
|
+
simplecov (~> 0.15.1)
|
|
112
115
|
simplecov-console (~> 0.4.2)
|
|
113
116
|
|
|
114
117
|
BUNDLED WITH
|
data/bucky-core.gemspec
CHANGED
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
|
|
17
17
|
When working with Bucky-management, Bucky-core can also record test results. You can make test results visualization by using Bucky-management.
|
|
18
18
|
DESCRIPTION
|
|
19
|
-
spec.required_ruby_version = '>= 2.
|
|
19
|
+
spec.required_ruby_version = '>= 2.5'
|
|
20
20
|
spec.homepage = 'https://github.com/lifull-dev/bucky-core'
|
|
21
21
|
spec.license = 'Apache License 2.0'
|
|
22
22
|
|
|
@@ -36,13 +36,14 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
spec.add_development_dependency 'rake', '~> 13'
|
|
37
37
|
spec.add_development_dependency 'rspec', '~> 3.6'
|
|
38
38
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.3'
|
|
39
|
-
spec.add_development_dependency 'rubocop',
|
|
39
|
+
spec.add_development_dependency 'rubocop', '~> 0.68.1'
|
|
40
|
+
spec.add_development_dependency 'simplecov', '~> 0.15.1'
|
|
40
41
|
spec.add_development_dependency 'simplecov-console', '~> 0.4.2'
|
|
41
42
|
|
|
42
43
|
spec.add_runtime_dependency 'addressable', '~> 2.5'
|
|
43
44
|
spec.add_runtime_dependency 'color_echo', '~> 3.1'
|
|
44
|
-
spec.add_runtime_dependency 'json', '~> 2.
|
|
45
|
-
spec.add_runtime_dependency 'nokogiri', '~> 1.
|
|
45
|
+
spec.add_runtime_dependency 'json', '~> 2.3.0'
|
|
46
|
+
spec.add_runtime_dependency 'nokogiri', '~> 1.11.1'
|
|
46
47
|
spec.add_runtime_dependency 'parallel', '~> 1.11'
|
|
47
48
|
spec.add_runtime_dependency 'ruby-mysql', '~> 2.9'
|
|
48
49
|
spec.add_runtime_dependency 'selenium-webdriver', '~> 3.142'
|
data/exe/bucky
CHANGED
|
@@ -83,6 +83,9 @@ end
|
|
|
83
83
|
opts.on('-l', '--label LABEL_NAME') do |v|
|
|
84
84
|
test_cond[:label] = v
|
|
85
85
|
end
|
|
86
|
+
opts.on('--xl', '--exclude_label EXCLUDE_LABEL_NAME') do |v|
|
|
87
|
+
test_cond[:xlabel] = v
|
|
88
|
+
end
|
|
86
89
|
opts.on('-m', '--link_check_max_times') do |v|
|
|
87
90
|
test_cond[:link_check_max_times] = v.to_i
|
|
88
91
|
end
|
|
@@ -148,6 +148,11 @@ module Bucky
|
|
|
148
148
|
suite[:cases].delete_if { |c| c[:labels].nil? }
|
|
149
149
|
suite[:cases].delete_if { |c| !(test_cond[:label].sort - [c[:labels]].flatten.sort).empty? }
|
|
150
150
|
end
|
|
151
|
+
# Exclude by label
|
|
152
|
+
if test_cond.key? :xlabel
|
|
153
|
+
# Delete test case that have specify label
|
|
154
|
+
suite[:cases].delete_if { |c| (test_cond[:xlabel].sort - [c[:labels]].flatten.sort).empty? }
|
|
155
|
+
end
|
|
151
156
|
# If there is no option, do nothing.
|
|
152
157
|
return suite unless test_cond.key? :case
|
|
153
158
|
|
|
@@ -34,7 +34,11 @@ module Bucky
|
|
|
34
34
|
# If number of requests is over redirect limit
|
|
35
35
|
return { error_message: "\n[Redirect Error] #{url} is redirected more than #{REDIRECT_LIMIT}" } if redirect_count > REDIRECT_LIMIT
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
begin
|
|
38
|
+
check_result = check_log_and_get_response(url, device, link_check_max_times, url_log)
|
|
39
|
+
rescue Net::ReadTimeout => e
|
|
40
|
+
return { error_message: "#{e.message} Please check this url: #{url}" }
|
|
41
|
+
end
|
|
38
42
|
# If result include response continue to check, else return result
|
|
39
43
|
!check_result.key?(:response) ? (return check_result) : response = check_result[:response]
|
|
40
44
|
|
|
@@ -46,13 +50,8 @@ module Bucky
|
|
|
46
50
|
puts " #{url} ... [#{response.code}:OK]"
|
|
47
51
|
{ entity: response.entity }
|
|
48
52
|
when /3[0-9]{2}/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
# Add fqdn if location doesn't include fqdn
|
|
52
|
-
redirect_url = fqdn << redirect_url unless redirect_url.include?('http')
|
|
53
|
-
puts " #{url} ... redirect to #{redirect_url} [#{response.code}:RD]"
|
|
54
|
-
http_status_check_args = { url: redirect_url, device: device, link_check_max_times: link_check_max_times, url_log: url_log, redirect_count: redirect_count + 1, redirect_url_list: redirect_url_list }
|
|
55
|
-
http_status_check(http_status_check_args)
|
|
53
|
+
http_status_check_args = { url: url, device: device, link_check_max_times: link_check_max_times, url_log: url_log, redirect_count: redirect_count + 1, redirect_url_list: redirect_url_list }
|
|
54
|
+
redirect_and_http_status_check(response, http_status_check_args)
|
|
56
55
|
when /(4|5)[0-9]{2}/
|
|
57
56
|
url_log[url][:error_message] = "[Status Error] http status returned #{response.code}.\ncheck this url: #{redirect_url_list.join(' -> ')}"
|
|
58
57
|
puts " #{url} ... [#{response.code}:NG]"
|
|
@@ -82,12 +81,12 @@ module Bucky
|
|
|
82
81
|
# Check base url
|
|
83
82
|
http_status_check_args = { url: url, device: device, link_check_max_times: link_check_max_times, url_log: url_log, redirect_count: 0, redirect_url_list: [] }
|
|
84
83
|
base_response = http_status_check(http_status_check_args)
|
|
85
|
-
|
|
84
|
+
raise Test::Unit::AssertionFailedError, "Response of base URL is incorrect.\n#{base_response[:error_message]}" unless base_response[:error_message].nil?
|
|
86
85
|
|
|
87
86
|
# Collect links
|
|
88
87
|
links_args = { base_url: base_url, base_fqdn: base_fqdn, url_reg: url_reg, only_same_fqdn: only_same_fqdn, entity: base_response[:entity] }
|
|
89
88
|
links = make_target_links(links_args)
|
|
90
|
-
links = exclude(links, exclude_urls)
|
|
89
|
+
links = exclude(links, exclude_urls)
|
|
91
90
|
|
|
92
91
|
errors = []
|
|
93
92
|
Parallel.each(links.uniq, in_threads: Bucky::Utils::Config.instance[:linkstatus_thread_num]) do |link|
|
|
@@ -96,7 +95,7 @@ module Bucky
|
|
|
96
95
|
link_response = http_status_check(http_status_check_args)
|
|
97
96
|
errors << link_response[:error_message] if link_response[:error_message]
|
|
98
97
|
end
|
|
99
|
-
|
|
98
|
+
raise Test::Unit::AssertionFailedError, errors.join("\n") unless errors.empty?
|
|
100
99
|
end
|
|
101
100
|
|
|
102
101
|
def make_target_links(args)
|
|
@@ -128,6 +127,8 @@ module Bucky
|
|
|
128
127
|
|
|
129
128
|
# Exclude non test target url
|
|
130
129
|
def exclude(links, exclude_urls)
|
|
130
|
+
return links if exclude_urls.nil?
|
|
131
|
+
|
|
131
132
|
excluded_links = links - exclude_urls
|
|
132
133
|
|
|
133
134
|
# Exclude url if it has "*" in the last of it
|
|
@@ -178,6 +179,16 @@ module Bucky
|
|
|
178
179
|
href.insert(0, '/') unless href.match(%r{^/|^#})
|
|
179
180
|
base_url + href
|
|
180
181
|
end
|
|
182
|
+
|
|
183
|
+
def redirect_and_http_status_check(response, http_status_check_args)
|
|
184
|
+
fqdn = http_status_check_args[:url][%r{^(https?:\/\/([a-zA-Z0-9\-_.]+))}]
|
|
185
|
+
redirect_url = response['location']
|
|
186
|
+
# Add fqdn if location doesn't include fqdn
|
|
187
|
+
redirect_url = fqdn << redirect_url unless redirect_url.include?('http')
|
|
188
|
+
puts " #{http_status_check_args[:url]} ... redirect to #{redirect_url} [#{response.code}:RD]"
|
|
189
|
+
http_status_check_args[:url] = redirect_url
|
|
190
|
+
http_status_check(http_status_check_args)
|
|
191
|
+
end
|
|
181
192
|
end
|
|
182
193
|
end
|
|
183
194
|
end
|
data/lib/bucky/version.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:selenium_ip: 'docker_host_ip' # Default selenium ip. please set ip or 'docker_host_ip'. ip route | awk 'NR==1 {print $3}'
|
|
2
2
|
:selenium_port: '4444' # Default selenium port
|
|
3
3
|
:browser: :chrome # Only chrome
|
|
4
|
-
:headless:
|
|
4
|
+
:headless: true
|
|
5
5
|
:e2e_parallel_num: 1
|
|
6
6
|
:sp_device_name: :iphone
|
|
7
7
|
:tablet_device_name: :ipad
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bucky-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- NaotoKishino
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire:
|
|
14
14
|
bindir: exe
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date:
|
|
16
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: awesome_print
|
|
@@ -147,14 +147,28 @@ dependencies:
|
|
|
147
147
|
requirements:
|
|
148
148
|
- - "~>"
|
|
149
149
|
- !ruby/object:Gem::Version
|
|
150
|
-
version:
|
|
150
|
+
version: 0.68.1
|
|
151
151
|
type: :development
|
|
152
152
|
prerelease: false
|
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements:
|
|
155
155
|
- - "~>"
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
|
-
version:
|
|
157
|
+
version: 0.68.1
|
|
158
|
+
- !ruby/object:Gem::Dependency
|
|
159
|
+
name: simplecov
|
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
|
161
|
+
requirements:
|
|
162
|
+
- - "~>"
|
|
163
|
+
- !ruby/object:Gem::Version
|
|
164
|
+
version: 0.15.1
|
|
165
|
+
type: :development
|
|
166
|
+
prerelease: false
|
|
167
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
168
|
+
requirements:
|
|
169
|
+
- - "~>"
|
|
170
|
+
- !ruby/object:Gem::Version
|
|
171
|
+
version: 0.15.1
|
|
158
172
|
- !ruby/object:Gem::Dependency
|
|
159
173
|
name: simplecov-console
|
|
160
174
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -203,28 +217,28 @@ dependencies:
|
|
|
203
217
|
requirements:
|
|
204
218
|
- - "~>"
|
|
205
219
|
- !ruby/object:Gem::Version
|
|
206
|
-
version:
|
|
220
|
+
version: 2.3.0
|
|
207
221
|
type: :runtime
|
|
208
222
|
prerelease: false
|
|
209
223
|
version_requirements: !ruby/object:Gem::Requirement
|
|
210
224
|
requirements:
|
|
211
225
|
- - "~>"
|
|
212
226
|
- !ruby/object:Gem::Version
|
|
213
|
-
version:
|
|
227
|
+
version: 2.3.0
|
|
214
228
|
- !ruby/object:Gem::Dependency
|
|
215
229
|
name: nokogiri
|
|
216
230
|
requirement: !ruby/object:Gem::Requirement
|
|
217
231
|
requirements:
|
|
218
232
|
- - "~>"
|
|
219
233
|
- !ruby/object:Gem::Version
|
|
220
|
-
version: 1.
|
|
234
|
+
version: 1.11.1
|
|
221
235
|
type: :runtime
|
|
222
236
|
prerelease: false
|
|
223
237
|
version_requirements: !ruby/object:Gem::Requirement
|
|
224
238
|
requirements:
|
|
225
239
|
- - "~>"
|
|
226
240
|
- !ruby/object:Gem::Version
|
|
227
|
-
version: 1.
|
|
241
|
+
version: 1.11.1
|
|
228
242
|
- !ruby/object:Gem::Dependency
|
|
229
243
|
name: parallel
|
|
230
244
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -453,15 +467,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
453
467
|
requirements:
|
|
454
468
|
- - ">="
|
|
455
469
|
- !ruby/object:Gem::Version
|
|
456
|
-
version: 2.
|
|
470
|
+
version: '2.5'
|
|
457
471
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
458
472
|
requirements:
|
|
459
473
|
- - ">="
|
|
460
474
|
- !ruby/object:Gem::Version
|
|
461
475
|
version: '0'
|
|
462
476
|
requirements: []
|
|
463
|
-
|
|
464
|
-
rubygems_version: 2.6.13
|
|
477
|
+
rubygems_version: 3.0.3
|
|
465
478
|
signing_key:
|
|
466
479
|
specification_version: 4
|
|
467
480
|
summary: System testing framework for web application.
|