manageiq-cross_repo 0.3.1 → 1.0.0
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 +10 -12
- data/exe/manageiq-cross_repo +14 -23
- data/lib/manageiq/cross_repo/runner.rb +8 -7
- data/lib/manageiq/cross_repo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecad3c073c0e642e1b0c6acdbd4aee93ab2ee491761c6674ca8333b8ddd2b778
|
4
|
+
data.tar.gz: '0952c2b0fe57ee11a23ed5749ae3e1728e9c4eac1257e09b01edd17ac4b6b88b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a519f48d8f113042c44c9a31a169ce415fb86b6c2ca0db0251bdda0f9a01d25bf76bb92b974054350bd800ca6f69a39ca0e3ec6fbea48c6f6142bf484b223378
|
7
|
+
data.tar.gz: b7b6e3974e05fad7c7f8d2727fc174de49329bcec10445e97089f5adc2d2d95902dffb992b46eacfbd046808022c41d991e8577254ce6beace91223308bbb211
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# ManageIQ cross-repository testing framework
|
2
2
|
|
3
3
|
```
|
4
|
-
Usage: manageiq-cross_repo --test-repo repo [--
|
4
|
+
Usage: manageiq-cross_repo --test-repo repo [--repos repo1 repo2 ...]
|
5
5
|
|
6
6
|
manageiq-cross_repo is a cross repository test framework for the ManageIQ project.
|
7
7
|
Its purpose is to allow running multiple repository tests suites in the context
|
@@ -12,12 +12,10 @@ Options:
|
|
12
12
|
-t, --test-repo=<s> This is the repository which will be tested.
|
13
13
|
Can also be passed as a TEST_REPO environment variable.
|
14
14
|
(default: ManageIQ/manageiq@master)
|
15
|
-
-
|
16
|
-
|
17
|
-
|
18
|
-
Can also be passed as a
|
19
|
-
-g, --gem-repos=<s+> Optional, a list of other plugin/gem overrides which are needed to run the tests.
|
20
|
-
Can also be passed as a GEM_REPOS environment variable.
|
15
|
+
-r, --repos=<s+> Optional, a list of other repos and/or gems to override while running the tests.
|
16
|
+
If any of the repositories in the list are a core repository that will
|
17
|
+
be used as the root repository, otherwise ManageIQ/manageiq@master will be the default.
|
18
|
+
Can also be passed as a REPOS environment variable.
|
21
19
|
|
22
20
|
-v, --version Print version and exit
|
23
21
|
-h, --help Show this message
|
@@ -39,7 +37,7 @@ Examples:
|
|
39
37
|
manageiq-cross_repo --test-repo manageiq-ui-classic
|
40
38
|
|
41
39
|
# Test a plugin against a ManageIQ SHA
|
42
|
-
manageiq-cross_repo --test-repo manageiq-ui-classic --
|
40
|
+
manageiq-cross_repo --test-repo manageiq-ui-classic --repos manageiq@1234abcd
|
43
41
|
|
44
42
|
# Test a plugin branch
|
45
43
|
manageiq-cross_repo --test-repo manageiq-ui-classic@feature
|
@@ -51,16 +49,16 @@ Examples:
|
|
51
49
|
manageiq-cross_repo --test-repo manageiq-ui-classic#1234
|
52
50
|
|
53
51
|
# Test a plugin with a set of other plugins
|
54
|
-
manageiq-cross_repo --test-repo manageiq-ui-classic --
|
52
|
+
manageiq-cross_repo --test-repo manageiq-ui-classic --repos manageiq-providers-vmware@feature manageiq-content@feature
|
55
53
|
|
56
54
|
# Test a plugin branch with a ManageIQ SHA and a set of other plugins
|
57
|
-
manageiq-cross_repo --test-repo manageiq-ui-classic@feature --
|
55
|
+
manageiq-cross_repo --test-repo manageiq-ui-classic@feature --repos manageiq@1234abcd manageiq-providers-vmware@feature manageiq-content@feature
|
58
56
|
|
59
57
|
# Run core tests with ManageIQ master using a gem version
|
60
|
-
manageiq-cross_repo --
|
58
|
+
manageiq-cross_repo --repos johndoe/manageiq-ui-classic@feature
|
61
59
|
|
62
60
|
# Run core tests for a branch and a set of gems
|
63
|
-
manageiq-cross_repo --test-repo johndoe/manageiq@feature --
|
61
|
+
manageiq-cross_repo --test-repo johndoe/manageiq@feature --repos manageiq-providers-vmware@feature manageiq-content@feature
|
64
62
|
```
|
65
63
|
|
66
64
|
## License
|
data/exe/manageiq-cross_repo
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require "bundler"
|
3
4
|
require "bundler/setup"
|
4
5
|
|
5
6
|
require "manageiq-cross_repo"
|
6
7
|
require "optimist"
|
7
8
|
|
8
9
|
opts = Optimist.options do
|
9
|
-
usage "--test-repo repo [--
|
10
|
+
usage "--test-repo repo [--repos repo1 repo2 ...]"
|
10
11
|
|
11
12
|
version "v#{ManageIQ::CrossRepo::VERSION}\n"
|
12
13
|
|
@@ -23,16 +24,11 @@ opts = Optimist.options do
|
|
23
24
|
Can also be passed as a TEST_REPO environment variable.
|
24
25
|
EOS
|
25
26
|
|
26
|
-
opt :
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
Can also be passed as a
|
31
|
-
EOS
|
32
|
-
|
33
|
-
opt :gem_repos, <<~EOS, :type => :strings, :multi => true, :default => Array(ENV["GEM_REPOS"].presence)
|
34
|
-
Optional, a list of other plugin/gem overrides which are needed to run the tests.
|
35
|
-
Can also be passed as a GEM_REPOS environment variable.
|
27
|
+
opt :repos, <<~EOS, :type => :strings, :default => Array(ENV["REPOS"].presence)
|
28
|
+
Optional, a list of other repos and/or gems to override while running the tests.
|
29
|
+
If any of the repositories in the list are a core repository that will
|
30
|
+
be used as the root repository, otherwise ManageIQ/manageiq@master will be the default.
|
31
|
+
Can also be passed as a REPOS environment variable.
|
36
32
|
EOS
|
37
33
|
|
38
34
|
# Manually add these so they appear in the right order in the help output
|
@@ -62,7 +58,7 @@ opts = Optimist.options do
|
|
62
58
|
manageiq-cross_repo --test-repo manageiq-ui-classic
|
63
59
|
|
64
60
|
# Test a plugin against a ManageIQ SHA
|
65
|
-
manageiq-cross_repo --test-repo manageiq-ui-classic --
|
61
|
+
manageiq-cross_repo --test-repo manageiq-ui-classic --repos manageiq@1234abcd
|
66
62
|
|
67
63
|
# Test a plugin branch
|
68
64
|
manageiq-cross_repo --test-repo manageiq-ui-classic@feature
|
@@ -74,28 +70,23 @@ opts = Optimist.options do
|
|
74
70
|
manageiq-cross_repo --test-repo manageiq-ui-classic#1234
|
75
71
|
|
76
72
|
# Test a plugin with a set of other plugins
|
77
|
-
manageiq-cross_repo --test-repo manageiq-ui-classic --
|
73
|
+
manageiq-cross_repo --test-repo manageiq-ui-classic --repos manageiq-providers-vmware@feature manageiq-content@feature
|
78
74
|
|
79
75
|
# Test a plugin branch with a ManageIQ SHA and a set of other plugins
|
80
|
-
manageiq-cross_repo --test-repo manageiq-ui-classic@feature --
|
76
|
+
manageiq-cross_repo --test-repo manageiq-ui-classic@feature --repos manageiq@1234abcd manageiq-providers-vmware@feature manageiq-content@feature
|
81
77
|
|
82
78
|
# Run core tests with ManageIQ master using a gem version
|
83
|
-
manageiq-cross_repo --
|
79
|
+
manageiq-cross_repo --repos johndoe/manageiq-ui-classic@feature
|
84
80
|
|
85
81
|
# Run core tests for a branch and a set of gems
|
86
|
-
manageiq-cross_repo --test-repo johndoe/manageiq@feature --
|
82
|
+
manageiq-cross_repo --test-repo johndoe/manageiq@feature --repos manageiq-providers-vmware@feature manageiq-content@feature
|
87
83
|
EOS
|
88
84
|
end
|
89
85
|
|
90
|
-
opts[:
|
91
|
-
|
92
|
-
if ENV["CI"] && opts[:test_repo] == "ManageIQ/manageiq@master" && opts[:core_repo].blank? && opts[:gem_repos].blank?
|
93
|
-
puts "Nothing to do!"
|
94
|
-
exit
|
95
|
-
end
|
86
|
+
opts[:repos] = opts[:repos].flatten.flat_map { |repo| repo.split(",").map(&:strip) }
|
96
87
|
|
97
88
|
begin
|
98
|
-
ManageIQ::CrossRepo.run(opts[:test_repo], opts[:
|
89
|
+
ManageIQ::CrossRepo.run(opts[:test_repo], opts[:repos])
|
99
90
|
rescue ArgumentError => e
|
100
91
|
Optimist.die e
|
101
92
|
end
|
@@ -5,20 +5,21 @@ module ManageIQ::CrossRepo
|
|
5
5
|
class Runner
|
6
6
|
attr_reader :test_repo, :core_repo, :gem_repos
|
7
7
|
|
8
|
-
def initialize(test_repo,
|
8
|
+
def initialize(test_repo, repos)
|
9
9
|
@test_repo = Repository.new(test_repo || "ManageIQ/manageiq@master")
|
10
|
+
|
11
|
+
core_repos, @gem_repos = Array(repos).collect { |repo| Repository.new(repo) }.partition(&:core?)
|
12
|
+
@core_repo = core_repos.first
|
13
|
+
|
10
14
|
if @test_repo.core?
|
11
|
-
raise ArgumentError, "You cannot pass core repo when running a core test"
|
12
|
-
raise ArgumentError, "You must pass at least one gem repo when running a core test" if gem_repos.blank?
|
15
|
+
raise ArgumentError, "You cannot pass a different core repo when running a core test" if @core_repo.present? && @core_repo != @test_repo
|
13
16
|
|
14
17
|
@core_repo = @test_repo
|
15
18
|
else
|
16
|
-
raise ArgumentError, "You must pass
|
19
|
+
raise ArgumentError, "You must pass at least one repo when running a plugin test." if repos.blank?
|
17
20
|
|
18
|
-
@core_repo
|
21
|
+
@core_repo ||= Repository.new("ManageIQ/manageiq@master")
|
19
22
|
end
|
20
|
-
|
21
|
-
@gem_repos = gem_repos.to_a.map { |repo| Repository.new(repo) }
|
22
23
|
end
|
23
24
|
|
24
25
|
def run
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageiq-cross_repo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|