Project

Profile

Help

Task #7108

Refactor def self.private_ip(name)

Added by Mark Zaslavskiy over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
mdbci features
Sprint/Milestone:
Start date:
23.06.2016
Due date:
% Done:

100%

Estimated time:
3:00 h
Spent time:
Target branch:
Test scenario:

# 1. Generate node
./mdbci --template confs/aws_lite.json generate SOME_DIR

# 2. Up node\nodes .
./mdbci up SOME_DIR

# 3. Show IP: must print info:
# Node: node_name
# IP: ip_of_node
./mdbci show private_ip SOME_DIR

# 4. For test: write path to generated and upped node\nodes at configPath ENV[] (all tests must be passed and echo $? => 0):
configPath=SOME_DIR/galera0 rspec spec/unit/7108_show_private_ip_spec.rb


Description

https://github.com/OSLL/mdbci/blob/4a68ae9f1f9c8bf3f45cb622607e751a2466e1b8/core/network.rb#L179

Function:
- should not contain code duplications
- should work with arguments in transparently way (for exmaple - all args[i] should be replaced for human readable and understandable name)
- exit code magic should be converted to raise
- split for two functions:
-- the first which returns its result as string in return
-- the second just wraps first and print it to $out.out
- add integration test for the whole command "show private_ip"


Related issues

Related to [mdbci] Maria DB Continuous integration tool - Task #7102: Collect info from set_environment during mdbci up and put it to text file in case of successful upClosed22.06.2016

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Mark Zaslavskiy over 4 years ago

  • Description updated (diff)

#2 Updated by Mark Zaslavskiy over 4 years ago

  • Related to Task #7102: Collect info from set_environment during mdbci up and put it to text file in case of successful up added

#3 Updated by Mark Zaslavskiy over 4 years ago

  • Assignee set to Alexander Kaluzhny

#4 Updated by Mark Zaslavskiy over 4 years ago

  • Sprint/Milestone changed from 0.83 to 0.9

#5 Updated by Mark Zaslavskiy over 4 years ago

  • Assignee changed from Alexander Kaluzhny to Ilfat Kinyaev

#6 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from New to Active / In progress
  • % Done changed from 0 to 50
  • Estimated time set to 3:00 h
  • Test scenario updated (diff)

#7 Updated by Ilfat Kinyaev over 4 years ago

  • % Done changed from 50 to 70

Bug: NPE of $session.awsConfig in test.

#8 Updated by Ilfat Kinyaev over 4 years ago

  • % Done changed from 70 to 90
  • Test scenario updated (diff)

NPE bug fixed with adding to test:
$session.awsConfigFile='aws-config.yml'
$session.loadCollections

private_ip was separated to two def: it uses getIP(args) to get IPs, and showArrayHash(array, params) to show it.
IPs storage in Hash, which in turn storage in Array. This doing for divide show and get scope.

#9 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from Active / In progress to Review
  • Assignee changed from Ilfat Kinyaev to Alexander Kaluzhny
  • % Done changed from 90 to 100
  • Test scenario updated (diff)

#10 Updated by Mark Zaslavskiy over 4 years ago

  • Status changed from Review to New
  • Assignee changed from Alexander Kaluzhny to Ilfat Kinyaev

Please sync this branch with integration and run mdbci_integration_tests after.

#11 Updated by Ilfat Kinyaev over 4 years ago

http://maxscale-jenkins.mariadb.com:8090/job/mdbci_integration_test/334/
No conflicts with integration branch.
// waiting result of test

#12 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from New to Review
  • Assignee changed from Ilfat Kinyaev to Mark Zaslavskiy
  • Test scenario updated (diff)

Tests passed

#13 Updated by Mark Zaslavskiy over 4 years ago

Please fix comments at pull-request https://github.com/OSLL/mdbci/pull/222/files

#14 Updated by Mark Zaslavskiy over 4 years ago

  • Status changed from Review to New
  • Assignee changed from Mark Zaslavskiy to Ilfat Kinyaev

#15 Updated by Ilfat Kinyaev over 4 years ago

  • Status changed from New to Review
  • Assignee changed from Ilfat Kinyaev to Mark Zaslavskiy

#16 Updated by Mark Zaslavskiy over 4 years ago

  • Status changed from Review to Closed

Also available in: Atom PDF