Project

Profile

Help

Task #7107

Refactor def self.showKeyFile(name)

Added by Mark Zaslavskiy about 4 years ago. Updated about 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 AWS\VBOX node (echo $?=>0)
./mdbci --template confs/aws_lite.json generate SOME_DIR

# 2. Up node\nodes (must be success, echo $?=>0)
./mdbci up SOME_DIR

# 3. Show keyfile for node (should print keyfile and echo $?=>0)
./mdbci show keyfile SOME_DIR

# 4. Run tests spec/7107_show_keyfile_spec.rb ( should pass all tests and echo $?=>0)
configPathToVBOXNode=SOME_DIR/galera0 rspec spec/unit/7107_show_keyfile_spec.rb


Description

https://github.com/OSLL/mdbci/blob/4a68ae9f1f9c8bf3f45cb622607e751a2466e1b8/core/network.rb#L64
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 keyfile"


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>
Related to [mdbci] Maria DB Continuous integration tool - Task #7111: Tests for def self.showKeyFile(name)Duplicated23.06.2016

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

History

#1 Updated by Mark Zaslavskiy about 4 years ago

  • Description updated (diff)

#2 Updated by Mark Zaslavskiy about 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 about 4 years ago

  • Assignee set to Ilfat Kinyaev

#4 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Active / In progress
  • Estimated time set to 3:00 h

#5 Updated by Mark Zaslavskiy about 4 years ago

  • Sprint/Milestone changed from 0.83 to 0.9

#6 Updated by Ilfat Kinyaev about 4 years ago

  • Related to Task #7111: Tests for def self.showKeyFile(name) added

#7 Updated by Ilfat Kinyaev about 4 years ago

  • % Done changed from 0 to 50

#8 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from Active / In progress to New

#10 Updated by Ilfat Kinyaev about 4 years ago

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

UPDATE: old tests contains zero\non-zero code reactions, combine to one - https://github.com/OSLL/mdbci/blob/7107_refactor_def_self.showKeyFile/spec/unit/6642_show_keyfile_exit_code_spec.rb , will be rename to 7107_show_keyfile_spec.rb and unnecessary file (https://github.com/OSLL/mdbci/blob/7107_refactor_def_self.showKeyFile/spec/unit/6803_showKeyFile_exceptions_spec.rb) deleting.

#11 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Review
  • Assignee changed from Ilfat Kinyaev to Alexander Kaluzhny
  • % Done changed from 70 to 100
  • Test scenario updated (diff)

#12 Updated by Mark Zaslavskiy about 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.

#13 Updated by Ilfat Kinyaev about 4 years ago

http://maxscale-jenkins.mariadb.com:8090/job/mdbci_integration_test/335/
Conflicts with integration branch resolved.
// waiting test results

#14 Updated by Ilfat Kinyaev about 4 years ago

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

Tests passed

#15 Updated by Mark Zaslavskiy about 4 years ago

comments at pull-request

#16 Updated by Mark Zaslavskiy about 4 years ago

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

#18 Updated by Ilfat Kinyaev about 4 years ago

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

#19 Updated by Mark Zaslavskiy about 4 years ago

Sources are ok, docker check was ok, checking AWS.

#20 Updated by Mark Zaslavskiy about 4 years ago

  • Status changed from Review to Closed

Also available in: Atom PDF