Produced by Araxis Merge on 10/2/2017 7:00:31 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | cds.zip\cds\product\tests\acceptance-tests | Rakefile | Mon Aug 28 20:42:06 2017 UTC |
| 2 | cds.zip\cds\product\tests\acceptance-tests | Rakefile | Thu Sep 28 17:32:34 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 11 | 294 |
| Changed | 10 | 26 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | require 'r ubygems' | |
| 2 | require 'c ucumber' | |
| 3 | require 'c ucumber/ra ke/task' | |
| 4 | require 'r ubocop/rak e_task' | |
| 5 | ||
| 6 | $LOAD_PATH .push(File .expand_pa th(File.di rname(__FI LE__) + '/ features/l ib')) | |
| 7 | ||
| 8 | # Check en vironment sanity and fail fast if not co rrect | |
| 9 | fail 'WORK SPACE envi ronment va riable not set. Did you "sourc e infrastr ucture/set .env.sh"?' unless EN V.keys.inc lude?('WOR KSPACE') | |
| 10 | fail 'GEM_ HOME envir onment var iable not set. Did y ou "source infrastru cture/set. env.sh"?' unless ENV .keys.incl ude?('GEM_ HOME') | |
| 11 | ||
| 12 | task :defa ult => [:e ndToEndTes ts] | |
| 13 | ||
| 14 | task endTo EndTests: [:codequal ity] | |
| 15 | task endTo EndTestsCD S: [:codeq uality] | |
| 16 | task endTo EndStableT ests: [:co dequality] | |
| 17 | task endTo EndUnstabl eTests: [: codequalit y] | |
| 18 | ||
| 19 | task codeq uality: [ | |
| 20 | :info, | |
| 21 | :rubocop | |
| 22 | ] | |
| 23 | ||
| 24 | task :endT oEndTests, [:env] => [:environ ment_setup ] | |
| 25 | task :endT oEndTestsC DS, [:env] => [:envi ronment_se tup] | |
| 26 | task :endT oEndStable Tests, [:e nv] => [:e nvironment _setup] | |
| 27 | task :endT oEndUnstab leTests, [ :env] => [ :environme nt_setup] | |
| 28 | task :endT oEndOncTes ts, [:env] => [:envi ronment_se tup] | |
| 29 | ||
| 30 | ### This b lock defin es the def ault test selection | |
| 31 | Cucumber:: Rake::Task .new(:endT oEndTests) do |t| | |
| 32 | t.cucumb er_opts = "features --verbose --color -- format pre tty --tags ~@full_st ack --tags ~@future --tags ~@U I --tags ~ @debug --t ags ~@manu al -f json _pretty -o cucumber. json -f ht ml -o cucu mber.html" | |
| 33 | end | |
| 34 | ||
| 35 | ## This bl ock captur es thoses tests tagg ed as CDS | |
| 36 | Cucumber:: Rake::Task .new(:endT oEndTestsC DS) do |t| | |
| 37 | t.cucumb er_opts = "features --verbose --color -- format pre tty --tags @cds --ta gs ~@futur e --tags ~ @UI --tags ~@debug - -tags ~@ma nual -f js on_pretty -o cucumbe r.json -f html -o cu cumber.htm l" | |
| 38 | end | |
| 39 | ||
| 40 | Cucumber:: Rake::Task .new(:endT oEndStable Tests) do |t| | |
| 41 | t.cucumb er_opts = "features --verbose --color -- format pre tty --tags ~@unstabl e --tags ~ @onc --tag s ~@future --tags ~@ UI --tags ~@debug -- tags ~@man ual -f jso n_pretty - o cucumber .json -f h tml -o cuc umber.html " | |
| 42 | end | |
| 43 | ||
| 44 | Cucumber:: Rake::Task .new(:endT oEndUnstab leTests) d o |t| | |
| 45 | t.cucumb er_opts = "features --verbose --color -- format pre tty --tags @unstable -f json_p retty -o c ucumber.js on -f html -o cucumb er.html" | |
| 46 | end | |
| 47 | ||
| 48 | ## Placeho lder task for execut ing all Ac ceptance T ests for a ll Mobile Applicatio ns | |
| 49 | Cucumber:: Rake::Task .new(:allA cceptanceT ests) do | t| | |
| 50 | t.cucumb er_opts = "features --verbose --color -- format pre tty --tags ~@future" | |
| 51 | end | |
| 52 | ||
| 53 | task :info do | |
| 54 | puts '== ========== ========== ========== ========== ========== ========== ========== ==' | |
| 55 | puts '# Runnin g codequal ity checks . #' | |
| 56 | puts '# For detail s, see htt ps://wiki. vistacore. us/display / DNS RE/Ruby #' | |
| 57 | puts '== ========== ========== ========== ========== ========== ========== ========== ==' | |
| 58 | end | |
| 59 | ||
| 60 | # Rubocop files not created ye t | |
| 61 | desc 'Rubo cop code q uality che cks config ured in .r ubocop.yml file' | |
| 62 | Rubocop::R akeTask.ne w(:rubocop ) do |rubo cop| | |
| 63 | # Specif y config f ile in non -standard location. | |
| 64 | rubocop. options = ['-c.ruboc op.yml'] | |
| 65 | ||
| 66 | # Specif y Ruby fil e location s | |
| 67 | rubocop. patterns = ['**/*.rb ', 'Rakefi le'] | |
| 68 | ||
| 69 | # Show e macs style output, a nd offense counts | |
| 70 | # See ht tps://gith ub.com/bba tsov/ruboc op#formatt ers for ot her output options | |
| 71 | rubocop. formatters = ['emacs ', 'o'] | |
| 72 | ||
| 73 | # Abort rake on fa ilure | |
| 74 | rubocop. fail_on_er ror = true | |
| 75 | end | |
| 76 | ||
| 77 | task :envi ronment_se tup, :env do |_task, args| | |
| 78 | env = ar gs[:env] | | 'virtual box' | |
| 79 | environm ent_endpoi nts(env) | |
| 80 | end | |
| 81 | ||
| 82 | def enviro nment_endp oints(env) | |
| 83 | case env | |
| 84 | when "vi rtualbox" | |
| 85 | ENV["R DK_IP"] = knife_sear ch_for_ip( "resource_ server") | |
| 86 | ENV["RDK_P ORT"] = " PORT " | |
| 87 | ENV["RDK_W RITEBACK_P ORT"]=" PORT " | |
| 88 | ENV["RDK_P ICKLIST_PO RT"]=" PORT " | |
| 89 | begin | |
| 90 | ENV[ "CDSINVOCA TION_IP"] = knife_se arch_for_i p("cdsinvo cation") | |
| 91 | ENV["CDSIN VOCATION_P ORT"] = " PORT " | |
| 92 | ENV[ "OPENCDS_I P"] = knif e_search_f or_ip("ope ncds") | |
| 93 | ENV["OPENC DS_PORT"] = " PORT " | |
| 94 | ENV[ "CDSDB_IP" ] = knife_ search_for _ip("cdsdb ") | |
| 95 | ENV[ "CDSDB_POR T"] = knif e_search_f or_attribu te("cdsdb" , %w(mongo db config port), "de fault") | |
| 96 | ip = knife_sea rch_for_ip ("cdsdashb oard") | |
| 97 | ENV["CDSDA SHBOARD_IP "] = 'http ://' + "#{ ip}: PORT " | |
| 98 | rescue => error | |
| 99 | rais e error | |
| 100 | #rai se error i f Rake.app lication.t op_level_t asks.inclu de? "cdsTe sts" | |
| 101 | end | |
| 102 | when "aw s" | |
| 103 | ENV["R DK_IP"] = knife_sear ch_for_ip( "resource_ server") | |
| 104 | ENV["RDK_P ORT"] = " PORT " | |
| 105 | ENV["RDK_W RITEBACK_P ORT"]=" PORT " | |
| 106 | ENV["R DK_WRITEBA CK_HOST"] = knife_se arch_for_i p("resourc e_server") | |
| 107 | ENV["RDK_P ICKLIST_PO RT"]=" PORT " | |
| 108 | ENV["R DK_PICKLIS T_HOST"] = knife_sea rch_for_ip ("resource _server") | |
| 109 | ENV["Perf_ Monitor_IP "] = ' IP ' | |
| 110 | ENV["C DSINVOCATI ON_IP"] = knife_sear ch_for_ip( "cdsinvoca tion") | |
| 111 | ENV["CDSIN VOCATION_P ORT"] = " PORT " | |
| 112 | ENV["O PENCDS_IP" ] = knife_ search_for _ip("openc ds") | |
| 113 | ENV["OPENC DS_PORT"] = " PORT " | |
| 114 | ENV["C DSDB_IP"] = knife_se arch_for_i p("cdsdb") | |
| 115 | ENV["C DSDB_PORT" ] = knife_ search_for _attribute ("cdsdb", %w(mongodb config po rt), "defa ult") | |
| 116 | ip = k nife_searc h_for_ip(" cdsdashboa rd") | |
| 117 | ENV["C DSDASHBOAR D_IP"] = ' https://' + "#{ip}" | |
| 118 | else | |
| 119 | fail " Unrecogniz ed environ ment type: #{env}. A llowable t ypes are: 'virtualbo x' and 'aw s'" | |
| 120 | end | |
| 121 | end | |
| 122 | ||
| 123 | def knife_ search_for _ip(machin e_name) | |
| 124 | release = File.rea d(File.dir name(__FIL E__) + "/. ./../../in frastructu re/propert ies/releas eVersion") | |
| 125 | stack = ENV['JOB_N AME'] || " #{ENV['USE R']}-#{rel ease}" || ENV['USER' ] | |
| 126 | if ENV.k ey?('BUNDL E_BIN_PATH ') | |
| 127 | raw_se arch = Bun dler.with_ clean_env { `/opt/ch efdk/bin/k nife searc h node \'r ole:#{mach ine_name} AND stack: #{stack}\' -Fj --con fig ~/Proj ects/vista core/.chef /knife.rb` } | |
| 128 | else | |
| 129 | raw_se arch = `/o pt/chefdk/ bin/knife search nod e \'role:# {machine_n ame} AND s tack:#{sta ck}\' -Fj --config ~ /Projects/ vistacore/ .chef/knif e.rb` | |
| 130 | end | |
| 131 | parsed_s earch = JS ON.parse(r aw_search) | |
| 132 | puts '== ========== ========== ========== ========== ========== ========== ========== ==' | |
| 133 | puts par sed_search | |
| 134 | puts '== ========== ========== ========== ========== ========== ========== ========== ==' | |
| 135 | fail "Mo re than on e node wit h that nam e found" i f parsed_s earch["res ults"] > 1 | |
| 136 | fail "No node with that name found" if parsed_se arch["resu lts"] == 0 | |
| 137 | ip = par sed_search ["rows"][0 ]['automat ic']['ipad dress'] | |
| 138 | end | |
| 139 | ||
| 140 | def knife_ search_for _attribute (machine_n ame, attri bute, attr ibute_type ) | |
| 141 | release = File.rea d(File.dir name(__FIL E__) + "/. ./../../in frastructu re/propert ies/releas eVersion") | |
| 142 | stack = ENV['JOB_N AME'] || " #{ENV['USE R']}-#{rel ease}" || ENV['USER' ] | |
| 143 | if ENV.k ey?('BUNDL E_BIN_PATH ') | |
| 144 | raw_se arch = Bun dler.with_ clean_env { `/opt/ch efdk/bin/k nife searc h node \'r ole:#{mach ine_name} AND stack: #{stack}\' -Fj --con fig ~/Proj ects/vista core/.chef /knife.rb` } | |
| 145 | else | |
| 146 | raw_se arch = `/o pt/chefdk/ bin/knife search nod e \'role:# {machine_n ame} AND s tack:#{sta ck}\' -Fj --config ~ /Projects/ vistacore/ .chef/knif e.rb` | |
| 147 | end | |
| 148 | parsed_s earch = JS ON.parse(r aw_search) | |
| 149 | fail "Mo re than on e node wit h that nam e found" i f parsed_s earch["res ults"] > 1 | |
| 150 | fail "No node with that name found" if parsed_se arch["resu lts"] == 0 | |
| 151 | node_att ributes = parsed_sea rch["rows" ][0][attri bute_type] | |
| 152 | depth = 0 | |
| 153 | while no de_attribu tes.is_a?( Hash) && n ode_attrib utes.keys. size > 0 | |
| 154 | node_a ttribute = attribute [depth] | |
| 155 | node_a ttributes = node_att ributes["# {node_attr ibute}"] | |
| 156 | depth = depth + 1 | |
| 157 | puts " #{node_att ribute} = #{node_att ributes}" | |
| 158 | end | |
| 159 | return n ode_attrib utes.inspe ct | |
| 160 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.