a2zdeploy 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,37 @@
1
+ require_relative '../upgradeall'
2
+ require 'test/unit'
3
+ require_relative '../globalconstants'
4
+
5
+ class TestUpgrade < Test::Unit::TestCase
6
+
7
+ def test_config_load_files_exist
8
+
9
+ Dir.chdir GlobalConstants::SPEC if File.basename(Dir.pwd) != GlobalConstants::SPEC
10
+
11
+ upgradeall = UpgradeAll.new 'http://ndhaxpgit01.mckesson.com/SureshBatta/AutomatedUpgradesConfig.git', 'master'
12
+
13
+ upgradeall.retrieve_artifacts
14
+
15
+ assert_not_equal upgradeall.manifest, nil
16
+ assert_not_equal upgradeall.version_map, nil
17
+
18
+ Dir.chdir '..'
19
+
20
+ end
21
+
22
+ def test_config_load_files_do_not_exist
23
+
24
+ Dir.chdir GlobalConstants::SPEC if File.basename(Dir.pwd) != GlobalConstants::SPEC
25
+
26
+ upgradeall = UpgradeAll.new 'http://ndhaxpgit01.mckesson.com/SureshBatta/AutomatedUpgradesConfig.git', 'xyz'
27
+
28
+ upgradeall.retrieve_artifacts
29
+
30
+ assert_equal upgradeall.manifest, nil
31
+ assert_equal upgradeall.version_map, nil
32
+
33
+ Dir.chdir '..'
34
+
35
+ end
36
+
37
+ end
@@ -0,0 +1,47 @@
1
+ require_relative '../version_map'
2
+ require 'test/unit'
3
+
4
+ class TestVersionMap < Test::Unit::TestCase
5
+
6
+ def test_norepo_returns_nil
7
+ vm = VersionMap.new
8
+ versions = vm.version_map nil, nil
9
+ assert_equal nil, versions
10
+ Dir.chdir '..'
11
+ end
12
+
13
+ def test_param_hasrepourl_nobranch_returns_nil
14
+ vm = VersionMap.new
15
+ versions = vm.version_map 'http://github.com/test.git', nil
16
+ assert_equal nil, versions
17
+ Dir.chdir '..'
18
+ end
19
+
20
+ def test_param_hasbadrepourl_returns_nil
21
+ vm = VersionMap.new
22
+ versions = vm.version_map 'http://', nil
23
+ assert_equal nil, versions
24
+ Dir.chdir '..'
25
+ end
26
+
27
+ def test_hasrepo_hasbranch_returns_empty_hash_if_bad_repo
28
+ vm = VersionMap.new
29
+ versions = vm.version_map 'http://github.com/test.git', 'master'
30
+ assert_equal nil, versions
31
+ Dir.chdir '..'
32
+ end
33
+
34
+ def test_hasrepo_nobranch_returns_nil_for_real_repo
35
+ vm = VersionMap.new
36
+ versions = vm.version_map 'http://ndhaxpgit01.mckesson.com/SureshBatta/AutoUpgradeTestProject.git', 'xyz'
37
+ assert_equal nil, versions
38
+ Dir.chdir '..'
39
+ end
40
+
41
+ def test_hasrepo_hasbranch_returns_hash_for_real_repo
42
+ vm = VersionMap.new
43
+ versions = vm.version_map 'http://ndhaxpgit01.mckesson.com/Carnegie/RelayHealth.DataPlatform.git', 'develop'
44
+ assert_not_equal nil, versions
45
+ Dir.chdir '..'
46
+ end
47
+ end
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: a2zdeploy
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Suresh Batta
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Automated Upgrades Gem. Provides version upgrades, build and deployment
14
+ configuration management
15
+ email: subatta@hotmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/dependency_tree.rb
21
+ - lib/github_api.rb
22
+ - lib/globalconstants.rb
23
+ - lib/proget_api.rb
24
+ - lib/teamcity_api.rb
25
+ - lib/upgrade.rb
26
+ - lib/upgradeall.rb
27
+ - lib/version.rb
28
+ - lib/version_map.rb
29
+ - spec/dependency_tree_spec.rb
30
+ - spec/github_api_spec.rb
31
+ - spec/packages.config
32
+ - spec/proj.csproj
33
+ - spec/upgradeall_spec.rb
34
+ - spec/upgrade_spec.rb
35
+ - spec/version_map_spec.rb
36
+ - a2zdeploy.gemspec
37
+ - rakefile.rb
38
+ homepage: http://rubygems.org/gems/a2zdeploy
39
+ licenses:
40
+ - MIT
41
+ metadata: {}
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project:
58
+ rubygems_version: 2.0.14
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: Given a project dependency chain, updates versions, builds, tests, manages
62
+ service and cloud settings as well as build environment configuration
63
+ test_files: []