Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
f8ef5700
Commit
f8ef5700
authored
Aug 01, 2019
by
Julien Muchembled
Committed by
Rafael Monnerat
Aug 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: fix generate_dump.sh
parent
397c52cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
slapos/tests/test_slapproxy/generate_dump.sh
slapos/tests/test_slapproxy/generate_dump.sh
+7
-6
No files found.
slapos/tests/test_slapproxy/generate_dump.sh
View file @
f8ef5700
#!/bin/bash
#!/bin/sh
set
-e
# Update an old dump to current format. Useful to update tests date
# Update an old dump to current format. Useful to update tests date
# when increasing database version number.
# when increasing database version number.
...
@@ -6,7 +7,7 @@
...
@@ -6,7 +7,7 @@
# `computer` for slapos/tests/test_slapproxy/database_dump_version_??.sql
# `computer` for slapos/tests/test_slapproxy/database_dump_version_??.sql
# and `slaprunner` for slapos/tests/test_slapproxy/database_dump_version_current.sql
# and `slaprunner` for slapos/tests/test_slapproxy/database_dump_version_current.sql
if
[
-z
"
$1
"
]
||
[
-z
"
$2
"
]
||
[
-z
"
$3
"
]
;
then
if
[
-z
"
$1
"
]
||
[
-z
"
$2
"
]
||
[
-z
"
$3
"
]
;
then
echo
"Usage:
$0
computer_id dump_before.sql dump_after.sql"
echo
"Usage:
$0
computer_id dump_before.sql dump_after.sql"
exit
1
;
exit
1
;
fi
fi
...
@@ -16,7 +17,7 @@ DUMP_BEFORE=$2
...
@@ -16,7 +17,7 @@ DUMP_BEFORE=$2
DUMP_AFTER
=
$3
DUMP_AFTER
=
$3
PORT
=
6123
PORT
=
6123
echo
"Using slapos
$(
which slapos
)
:
$(
slapos
--version
)
"
echo
"Using slapos
$(
which slapos
)
:
$(
slapos
--version
2>&1
)
"
TMPD
=
$(
mktemp
-d
)
TMPD
=
$(
mktemp
-d
)
if
[
!
-e
$TMPD
]
;
then
if
[
!
-e
$TMPD
]
;
then
...
@@ -42,9 +43,9 @@ sqlite3 ${TMPD}/proxy.db < $DUMP_BEFORE
...
@@ -42,9 +43,9 @@ sqlite3 ${TMPD}/proxy.db < $DUMP_BEFORE
slapos proxy start
--cfg
${
TMPD
}
/slapos.cfg &
slapos proxy start
--cfg
${
TMPD
}
/slapos.cfg &
SLAPOS_PROXY_PID
=
$!
SLAPOS_PROXY_PID
=
$!
curl
--silent
--retry-connrefuse
--retry
3 http://127.0.0.1:
${
PORT
}
/getComputerInformation?computer_id
=
$COMPUTER_ID
curl
--silent
--retry-connrefuse
d
--retry
3 http://127.0.0.1:
${
PORT
}
/getComputerInformation?computer_id
=
$COMPUTER_ID
echo
".dump"
| sqlite3
${
TMPD
}
/proxy.db
>
$DUMP_AFTER
sqlite3
${
TMPD
}
/proxy.db .dump
>
$DUMP_AFTER
kill
$SLAPOS_PROXY_PID
kill
$SLAPOS_PROXY_PID
wait
wait
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment