flare-tools 0.4.5.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +24 -0
- data/.travis.yml +15 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +28 -0
- data/History.txt +5 -0
- data/Makefile +25 -0
- data/README.txt +2 -2
- data/Rakefile +36 -34
- data/flare-tools.gemspec +26 -0
- data/lib/flare/entity/server.rb +4 -0
- data/lib/flare/tools.rb +3 -3
- data/lib/flare/tools/cli.rb +1 -0
- data/lib/flare/tools/cli/activate.rb +19 -13
- data/lib/flare/tools/cli/balance.rb +15 -8
- data/lib/flare/tools/cli/deploy.rb +53 -49
- data/lib/flare/tools/cli/dispatch.rb +101 -0
- data/lib/flare/tools/cli/down.rb +19 -14
- data/lib/flare/tools/cli/dump.rb +19 -14
- data/lib/flare/tools/cli/dumpkey.rb +21 -16
- data/lib/flare/tools/cli/flare_admin.rb +16 -72
- data/lib/flare/tools/cli/flare_argv0.rb +7 -51
- data/lib/flare/tools/cli/index.rb +10 -7
- data/lib/flare/tools/cli/index_server_config.rb +94 -0
- data/lib/flare/tools/cli/list.rb +14 -12
- data/lib/flare/tools/cli/master.rb +18 -12
- data/lib/flare/tools/cli/option.rb +55 -0
- data/lib/flare/tools/cli/part.rb +13 -12
- data/lib/flare/tools/cli/ping.rb +11 -13
- data/lib/flare/tools/cli/reconstruct.rb +22 -15
- data/lib/flare/tools/cli/remove.rb +20 -17
- data/lib/flare/tools/cli/restore.rb +20 -20
- data/lib/flare/tools/cli/slave.rb +20 -14
- data/lib/flare/tools/cli/stats.rb +171 -118
- data/lib/flare/tools/cli/sub_command.rb +16 -5
- data/lib/flare/tools/cli/summary.rb +12 -10
- data/lib/flare/tools/cli/threads.rb +15 -9
- data/lib/flare/tools/cli/verify.rb +20 -18
- data/lib/flare/tools/cluster.rb +3 -2
- data/lib/flare/util/constant.rb +3 -0
- data/lib/flare/util/pretty_table.rb +8 -0
- data/lib/flare/util/pretty_table/column.rb +41 -0
- data/lib/flare/util/pretty_table/row.rb +29 -0
- data/lib/flare/util/pretty_table/table.rb +37 -0
- data/package/Rakefile +44 -0
- data/package/flare-tools/Makefile +23 -0
- data/package/flare-tools/debian/changelog +135 -0
- data/package/flare-tools/debian/compat +1 -0
- data/package/flare-tools/debian/control +20 -0
- data/package/flare-tools/debian/copyright +35 -0
- data/package/flare-tools/debian/dirs +2 -0
- data/{.gemtest → package/flare-tools/debian/docs} +0 -0
- data/package/flare-tools/debian/rules +125 -0
- data/test/{test/experimental → experimental}/cache_test.rb +0 -0
- data/test/{test/experimental → experimental}/key_distribution_test.rb +0 -0
- data/test/{test/experimental → experimental}/keychecker_test.rb +0 -0
- data/test/{test/experimental → experimental}/list_test.rb +0 -0
- data/test/{test/extra → extra}/replication_test.rb +0 -0
- data/test/{test/integration → integration}/cli_test.rb +9 -7
- data/test/{test/integration → integration}/dump_expired_test.rb +4 -3
- data/test/{test/integration → integration}/dump_test.rb +5 -5
- data/test/{test/integration → integration}/index_server_test.rb +1 -1
- data/test/{test/integration → integration}/node_test.rb +1 -1
- data/test/{test/integration → integration}/partition_test.rb +6 -5
- data/test/{test/integration → integration}/proxy_test.rb +4 -3
- data/test/{test/integration → integration}/stats_test.rb +1 -1
- data/test/integration/subcommands.rb +128 -0
- data/test/{test/system → system}/flare_admin_test.rb +7 -5
- data/test/{test/unit → unit}/bwlimit_test.rb +0 -0
- data/test/{test/unit → unit}/cluster_test.rb +1 -1
- data/test/{test/unit → unit}/daemon_test.rb +0 -0
- data/test/{test/unit → unit}/logger_test.rb +0 -0
- data/test/{test/unit → unit}/tools_test.rb +0 -0
- data/test/unit/util/pretty_table_test.rb +46 -0
- data/test/{test/unit → unit}/util_test.rb +7 -2
- metadata +88 -100
- data/PostInstall.txt +0 -7
- data/lib/flare/tools/cli/cli_util.rb +0 -77
- data/lib/flare/util/command_line.rb +0 -79
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
BINDIR=/usr/bin
|
3
|
+
RUBYLIBDIR=/usr/lib/ruby/${RUBYVER}
|
4
|
+
SRCDIR=../..
|
5
|
+
|
6
|
+
install:
|
7
|
+
install -d ${DESTDIR}${BINDIR}
|
8
|
+
install -m 755 ${SRCDIR}/bin/* ${DESTDIR}${BINDIR}
|
9
|
+
install -d ${DESTDIR}${RUBYLIBDIR}/flare
|
10
|
+
install -m 644 ${SRCDIR}/lib/flare/*.rb ${DESTDIR}${RUBYLIBDIR}/flare
|
11
|
+
install -d ${DESTDIR}${RUBYLIBDIR}/flare/tools
|
12
|
+
install -m 644 ${SRCDIR}/lib/flare/tools/*.rb ${DESTDIR}${RUBYLIBDIR}/flare/tools
|
13
|
+
install -d ${DESTDIR}${RUBYLIBDIR}/flare/tools/cli
|
14
|
+
install -m 644 ${SRCDIR}/lib/flare/tools/cli/*.rb ${DESTDIR}${RUBYLIBDIR}/flare/tools/cli
|
15
|
+
install -d ${DESTDIR}${RUBYLIBDIR}/flare/util
|
16
|
+
install -m 644 ${SRCDIR}/lib/flare/util/*.rb ${DESTDIR}${RUBYLIBDIR}/flare/util
|
17
|
+
install -d ${DESTDIR}${RUBYLIBDIR}/flare/net
|
18
|
+
install -m 644 ${SRCDIR}/lib/flare/net/*.rb ${DESTDIR}${RUBYLIBDIR}/flare/net
|
19
|
+
install -d ${DESTDIR}${RUBYLIBDIR}/flare/test
|
20
|
+
install -m 644 ${SRCDIR}/lib/flare/test/*.rb ${DESTDIR}${RUBYLIBDIR}/flare/test
|
21
|
+
|
22
|
+
clean:
|
23
|
+
|
@@ -0,0 +1,135 @@
|
|
1
|
+
flare-tools (0.4.5) unstable; urgency=low
|
2
|
+
|
3
|
+
* fixed install target of Makefile
|
4
|
+
|
5
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Wed, 17 Oct 2012 16:52:09 +0900
|
6
|
+
|
7
|
+
flare-tools (0.4.4) unstable; urgency=low
|
8
|
+
|
9
|
+
* added 'summary' subcommand
|
10
|
+
|
11
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Wed, 01 Aug 2012 14:17:29 +0900
|
12
|
+
|
13
|
+
flare-tools (0.4.3) unstable; urgency=low
|
14
|
+
|
15
|
+
* added --option
|
16
|
+
* fixed 'stats' subcommand
|
17
|
+
|
18
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Wed, 04 Jul 2012 14:11:12 +0900
|
19
|
+
|
20
|
+
flare-tools (0.4.2) unstable; urgency=low
|
21
|
+
|
22
|
+
* fixed short and long options with paramters.
|
23
|
+
|
24
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Wed, 23 May 2012 12:37:08 +0900
|
25
|
+
|
26
|
+
flare-tools (0.4.1) unstable; urgency=low
|
27
|
+
|
28
|
+
* supported FLARE_INDEX_SERVER environment variable.
|
29
|
+
|
30
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Tue, 15 May 2012 19:48:26 +0900
|
31
|
+
|
32
|
+
flare-tools (0.4.0) unstable; urgency=low
|
33
|
+
|
34
|
+
* public release
|
35
|
+
|
36
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Tue, 08 May 2012 20:00:05 +0900
|
37
|
+
|
38
|
+
flare-tools (0.3.5) unstable; urgency=low
|
39
|
+
|
40
|
+
* added --version option.
|
41
|
+
* added --raw option to 'dump' subcommand.
|
42
|
+
|
43
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Fri, 04 May 2012 22:19:52 +0900
|
44
|
+
|
45
|
+
flare-tools (0.3.4) unstable; urgency=low
|
46
|
+
|
47
|
+
* added 'restore' subcommand.
|
48
|
+
|
49
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Thu, 26 Apr 2012 20:24:59 +0900
|
50
|
+
|
51
|
+
flare-tools (0.3.3) unstable; urgency=low
|
52
|
+
|
53
|
+
* added --meta option to verify subcommand.
|
54
|
+
|
55
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Mon, 23 Apr 2012 12:01:20 +0900
|
56
|
+
|
57
|
+
flare-tools (0.3.2) unstable; urgency=low
|
58
|
+
|
59
|
+
* added 'verify' subcommand.
|
60
|
+
|
61
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> Sat, 14 Apr 2012 19:06:04 +0900
|
62
|
+
|
63
|
+
flare-tools (0.3.1) unstable; urgency=low
|
64
|
+
|
65
|
+
* fixed threads subcommand.
|
66
|
+
|
67
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Sat, 25 Feb 2012 16:06:44 +0900
|
68
|
+
|
69
|
+
flare-tools (0.3.0) unstable; urgency=low
|
70
|
+
|
71
|
+
* internal release
|
72
|
+
|
73
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Fri, 24 Feb 2012 19:58:03 +0900
|
74
|
+
|
75
|
+
flare-tools (0.2.7-1) unstable; urgency=low
|
76
|
+
|
77
|
+
* added some extra tests for experimental features.
|
78
|
+
|
79
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Thu, 02 Feb 2012 14:52:26 +0900
|
80
|
+
|
81
|
+
flare-tools (0.2.7) unstable; urgency=low
|
82
|
+
|
83
|
+
* added flare-keydump command for checking key distribution among nodes.
|
84
|
+
* added bandwidth limit function to Flare::Net::Connection class.
|
85
|
+
|
86
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Fri, 20 Jan 2012 11:45:09 +0900
|
87
|
+
|
88
|
+
flare-tools (0.2.6-2) unstable; urgency=low
|
89
|
+
|
90
|
+
* changed dependency of debian package.
|
91
|
+
|
92
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Fri, 13 Jan 2012 10:16:55 +0900
|
93
|
+
|
94
|
+
flare-tools (0.2.6-1) unstable; urgency=low
|
95
|
+
|
96
|
+
* added 'dump' and 'dumpkey' subcommands.
|
97
|
+
|
98
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Thu, 12 Jan 2012 19:13:44 +0900
|
99
|
+
|
100
|
+
flare-tools (0.2.5-1) unstable; urgency=low
|
101
|
+
|
102
|
+
* added various options to 'deploy' subcommand.
|
103
|
+
|
104
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Fri, 06 Jan 2012 17:39:15 +0900
|
105
|
+
|
106
|
+
flare-tools (0.2.4-1) unstable; urgency=low
|
107
|
+
|
108
|
+
* added activate subcommand.
|
109
|
+
|
110
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Thu, 22 Dec 2011 19:11:21 +0900
|
111
|
+
|
112
|
+
flare-tools (0.2.3-4) unstable; urgency=low
|
113
|
+
|
114
|
+
* fixed top level script files.
|
115
|
+
|
116
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Mon, 05 Dec 2011 21:47:24 +0900
|
117
|
+
|
118
|
+
flare-tools (0.2.3-3) unstable; urgency=low
|
119
|
+
|
120
|
+
* fixed dependency again.
|
121
|
+
|
122
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Mon, 05 Dec 2011 19:44:29 +0900
|
123
|
+
|
124
|
+
flare-tools (0.2.3-2) unstable; urgency=low
|
125
|
+
|
126
|
+
* fixed dependency.
|
127
|
+
|
128
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Mon, 05 Dec 2011 19:21:00 +0900
|
129
|
+
|
130
|
+
flare-tools (0.2.3-1) unstable; urgency=low
|
131
|
+
|
132
|
+
* Initial release
|
133
|
+
|
134
|
+
-- Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp> Mon, 05 Dec 2011 17:25:58 +0900
|
135
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
7
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Source: flare-tools
|
2
|
+
Section: misc
|
3
|
+
Priority: extra
|
4
|
+
Maintainer: Kiyoshi Ikehara <kiyoshi.ikehara@gree.co.jp>
|
5
|
+
Build-Depends: debhelper (>= 7)
|
6
|
+
Standards-Version: 3.7.3
|
7
|
+
|
8
|
+
Package: flare-tools-ruby1.8
|
9
|
+
Architecture: all
|
10
|
+
Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.8 (>= 1.8.7)
|
11
|
+
Recommends: rubygems1.8, liblog4r-ruby1.8
|
12
|
+
Description: administration tools for flare server
|
13
|
+
This is a collection of command line tools to maintain a flare cluster.
|
14
|
+
|
15
|
+
Package: flare-tools-ruby1.9
|
16
|
+
Architecture: all
|
17
|
+
Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.9 (>= 1.9.0)
|
18
|
+
Recommends: rubygems1.9, liblog4r-ruby
|
19
|
+
Description: administration tools for flare server
|
20
|
+
This is a collection of command line tools to maintain a flare cluster.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
This package was debianized by Kiyoshi Ikehara <kiyoshi.ikehara@gree.net> on
|
2
|
+
Mon, 05 Dec 2011 17:25:58 +0900.
|
3
|
+
|
4
|
+
It was downloaded from <https://github.com/gree/flare-tools>
|
5
|
+
|
6
|
+
Upstream Author:
|
7
|
+
|
8
|
+
Kiyoshi Ikehara <kiyoshi.ikehara@gree.net>
|
9
|
+
|
10
|
+
Copyright:
|
11
|
+
|
12
|
+
Copyright (C) 2011 GREE, Inc.
|
13
|
+
|
14
|
+
License: MIT-style
|
15
|
+
|
16
|
+
Copyright (c) 2011 GREE, Inc.
|
17
|
+
|
18
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
19
|
+
of this software and associated documentation files (the "Software"), to deal
|
20
|
+
in the Software without restriction, including without limitation the rights
|
21
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
22
|
+
copies of the Software, and to permit persons to whom the Software is
|
23
|
+
furnished to do so, subject to the following conditions:
|
24
|
+
|
25
|
+
The above copyright notice and this permission notice shall be included in
|
26
|
+
all copies or substantial portions of the Software.
|
27
|
+
|
28
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
29
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
31
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
32
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
33
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
34
|
+
THE SOFTWARE.
|
35
|
+
|
File without changes
|
@@ -0,0 +1,125 @@
|
|
1
|
+
#!/usr/bin/make -f
|
2
|
+
# -*- makefile -*-
|
3
|
+
# Sample debian/rules that uses debhelper.
|
4
|
+
#
|
5
|
+
# This file was originally written by Joey Hess and Craig Small.
|
6
|
+
# As a special exception, when this file is copied by dh-make into a
|
7
|
+
# dh-make output file, you may use that output file without restriction.
|
8
|
+
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
9
|
+
#
|
10
|
+
# Modified to make a template file for a multi-binary package with separated
|
11
|
+
# build-arch and build-indep targets by Bill Allombert 2001
|
12
|
+
|
13
|
+
# Uncomment this to turn on verbose mode.
|
14
|
+
#export DH_VERBOSE=1
|
15
|
+
|
16
|
+
# This has to be exported to make some magic below work.
|
17
|
+
export DH_OPTIONS
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
configure: configure-stamp
|
25
|
+
configure-stamp:
|
26
|
+
dh_testdir
|
27
|
+
# Add here commands to configure the package.
|
28
|
+
|
29
|
+
touch configure-stamp
|
30
|
+
|
31
|
+
|
32
|
+
#Architecture
|
33
|
+
build: build-arch build-indep
|
34
|
+
|
35
|
+
build-arch: build-arch-stamp
|
36
|
+
build-arch-stamp: configure-stamp
|
37
|
+
|
38
|
+
# Add here commands to compile the arch part of the package.
|
39
|
+
#$(MAKE)
|
40
|
+
touch $@
|
41
|
+
|
42
|
+
build-indep: build-indep-stamp
|
43
|
+
build-indep-stamp: configure-stamp
|
44
|
+
|
45
|
+
# Add here commands to compile the indep part of the package.
|
46
|
+
#$(MAKE) doc
|
47
|
+
touch $@
|
48
|
+
|
49
|
+
clean:
|
50
|
+
dh_testdir
|
51
|
+
dh_testroot
|
52
|
+
rm -f build-arch-stamp build-indep-stamp configure-stamp
|
53
|
+
|
54
|
+
# Add here commands to clean up after the build process.
|
55
|
+
$(MAKE) clean
|
56
|
+
|
57
|
+
dh_clean
|
58
|
+
|
59
|
+
install: install-indep install-arch
|
60
|
+
install-indep:
|
61
|
+
dh_testdir
|
62
|
+
dh_testroot
|
63
|
+
dh_clean -k -i
|
64
|
+
dh_installdirs -i
|
65
|
+
|
66
|
+
# Add here commands to install the indep part of the package into
|
67
|
+
# debian/<package>-doc.
|
68
|
+
#INSTALLDOC#
|
69
|
+
$(MAKE) DESTDIR=$(CURDIR)/debian/flare-tools-ruby1.8 RUBYVER=1.8 install
|
70
|
+
$(MAKE) DESTDIR=$(CURDIR)/debian/flare-tools-ruby1.9 RUBYVER=1.9 install
|
71
|
+
|
72
|
+
dh_install -i
|
73
|
+
|
74
|
+
install-arch:
|
75
|
+
dh_testdir
|
76
|
+
dh_testroot
|
77
|
+
dh_clean -k -s
|
78
|
+
dh_installdirs -s
|
79
|
+
|
80
|
+
# Add here commands to install the arch part of the package into
|
81
|
+
# debian/tmp.
|
82
|
+
|
83
|
+
dh_install -s
|
84
|
+
# Must not depend on anything. This is to be called by
|
85
|
+
# binary-arch/binary-indep
|
86
|
+
# in another 'make' thread.
|
87
|
+
binary-common:
|
88
|
+
dh_testdir
|
89
|
+
dh_testroot
|
90
|
+
dh_installchangelogs
|
91
|
+
dh_installdocs
|
92
|
+
dh_installexamples
|
93
|
+
# dh_installmenu
|
94
|
+
# dh_installdebconf
|
95
|
+
# dh_installlogrotate
|
96
|
+
# dh_installemacsen
|
97
|
+
# dh_installpam
|
98
|
+
# dh_installmime
|
99
|
+
# dh_python
|
100
|
+
# dh_installinit
|
101
|
+
# dh_installcron
|
102
|
+
# dh_installinfo
|
103
|
+
dh_installman
|
104
|
+
dh_link
|
105
|
+
dh_strip
|
106
|
+
dh_compress
|
107
|
+
dh_fixperms
|
108
|
+
# dh_perl
|
109
|
+
dh_makeshlibs
|
110
|
+
dh_installdeb
|
111
|
+
dh_shlibdeps
|
112
|
+
dh_gencontrol
|
113
|
+
dh_md5sums
|
114
|
+
dh_builddeb
|
115
|
+
# Build architecture independant packages using the common target.
|
116
|
+
binary-indep: build-indep install-indep
|
117
|
+
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
118
|
+
|
119
|
+
# Build architecture dependant packages using the common target.
|
120
|
+
binary-arch: build-arch install-arch
|
121
|
+
# $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
|
122
|
+
|
123
|
+
binary: binary-arch binary-indep
|
124
|
+
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
|
125
|
+
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# -*- coding: utf-8; -*-
|
3
3
|
|
4
4
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__)+"
|
5
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__)+"/../../lib")
|
6
6
|
|
7
7
|
require 'rubygems'
|
8
8
|
gem 'test-unit'
|
@@ -22,13 +22,14 @@ class CliTest < Test::Unit::TestCase
|
|
22
22
|
@node_servers = ['node1', 'node2', 'node3'].map {|name| @flare_cluster.create_node(name)}
|
23
23
|
sleep 1 # XXX
|
24
24
|
@flare_cluster.wait_for_ready
|
25
|
+
|
25
26
|
@config = {
|
26
27
|
:command => 'dummy',
|
27
|
-
:index_server_hostname => @flare_cluster.indexname,
|
28
|
-
:index_server_port => @flare_cluster.indexport,
|
29
28
|
:dry_run => false,
|
30
29
|
:timeout => 10
|
31
30
|
}
|
31
|
+
@index_server_hostname = @flare_cluster.indexname
|
32
|
+
@index_server_port = @flare_cluster.indexport
|
32
33
|
end
|
33
34
|
|
34
35
|
def teardown
|
@@ -208,11 +209,12 @@ class CliTest < Test::Unit::TestCase
|
|
208
209
|
assert_equal(S_OK, index())
|
209
210
|
end
|
210
211
|
|
211
|
-
def
|
212
|
+
def remove_boostheader_and_version(s)
|
212
213
|
lines = s.split("\n")
|
213
214
|
h1 = lines.shift
|
214
215
|
h2 = lines.shift
|
215
|
-
lines.shift
|
216
|
+
lines.shift # XXX boost header
|
217
|
+
lines.shift # XXX version
|
216
218
|
lines.unshift(h2)
|
217
219
|
lines.unshift(h1)
|
218
220
|
lines.join("\n")
|
@@ -224,8 +226,8 @@ class CliTest < Test::Unit::TestCase
|
|
224
226
|
args = ["--output=flare.xml"]
|
225
227
|
assert_equal(S_OK, index(*args))
|
226
228
|
assert_equal(true, File.exist?("flare.xml"))
|
227
|
-
flarexml =
|
228
|
-
indexxml =
|
229
|
+
flarexml = remove_boostheader_and_version(open("flare.xml").read)
|
230
|
+
indexxml = remove_boostheader_and_version(@flare_cluster.index)
|
229
231
|
assert_equal(indexxml, flarexml)
|
230
232
|
File.delete("flare.xml")
|
231
233
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# -*- coding: utf-8; -*-
|
3
3
|
|
4
4
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__)+"
|
5
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__)+"/../../lib")
|
6
6
|
|
7
7
|
require 'test/unit'
|
8
8
|
require 'flare/tools'
|
@@ -20,13 +20,14 @@ class DumpExpiredTest < Test::Unit::TestCase
|
|
20
20
|
@node_servers = ['node1', 'node2', 'node3'].map {|name| @flare_cluster.create_node(name)}
|
21
21
|
sleep 1 # XXX
|
22
22
|
@flare_cluster.wait_for_ready
|
23
|
+
|
23
24
|
@config = {
|
24
25
|
:command => 'dummy',
|
25
|
-
:index_server_hostname => @flare_cluster.indexname,
|
26
|
-
:index_server_port => @flare_cluster.indexport,
|
27
26
|
:dry_run => false,
|
28
27
|
:timeout => 10
|
29
28
|
}
|
29
|
+
@index_server_hostname = @flare_cluster.indexname
|
30
|
+
@index_server_port = @flare_cluster.indexport
|
30
31
|
end
|
31
32
|
|
32
33
|
def teardown
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# -*- coding: utf-8; -*-
|
3
3
|
|
4
4
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__)+"
|
5
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__)+"/../../lib")
|
6
6
|
|
7
7
|
require 'rubygems'
|
8
8
|
gem 'test-unit'
|
@@ -59,19 +59,19 @@ class DumpTest < Test::Unit::TestCase
|
|
59
59
|
|
60
60
|
puts "dumping"
|
61
61
|
@config = {
|
62
|
-
:index_server_hostname => src_cluster.indexname,
|
63
|
-
:index_server_port => src_cluster.indexport,
|
64
62
|
:timeout => 10
|
65
63
|
}
|
64
|
+
@index_server_hostname = src_cluster.indexname
|
65
|
+
@index_server_port = src_cluster.indexport
|
66
66
|
args = %w(--format=tch --output=src.tch)
|
67
67
|
args.concat extra_dump_options
|
68
68
|
assert_equal(S_OK, dump(*args))
|
69
69
|
|
70
70
|
@config = {
|
71
|
-
:index_server_hostname => dest_cluster.indexname,
|
72
|
-
:index_server_port => dest_cluster.indexport,
|
73
71
|
:timeout => 10
|
74
72
|
}
|
73
|
+
@index_server_hostname = dest_cluster.indexname
|
74
|
+
@index_server_port = dest_cluster.indexport
|
75
75
|
n = dest_nodes[0]
|
76
76
|
args = %w(--format=tch --input=src.tch)
|
77
77
|
args.concat extra_restore_options
|