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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
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
Show 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
# when increasing database version number.
...
...
@@ -6,7 +7,7 @@
# `computer` for slapos/tests/test_slapproxy/database_dump_version_??.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"
exit
1
;
fi
...
...
@@ -16,7 +17,7 @@ DUMP_BEFORE=$2
DUMP_AFTER
=
$3
PORT
=
6123
echo
"Using slapos
$(
which slapos
)
:
$(
slapos
--version
)
"
echo
"Using slapos
$(
which slapos
)
:
$(
slapos
--version
2>&1
)
"
TMPD
=
$(
mktemp
-d
)
if
[
!
-e
$TMPD
]
;
then
...
...
@@ -42,9 +43,9 @@ sqlite3 ${TMPD}/proxy.db < $DUMP_BEFORE
slapos proxy start
--cfg
${
TMPD
}
/slapos.cfg &
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
wait
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