Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
c846bbe2
Unverified
Commit
c846bbe2
authored
Feb 17, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2167 Fixed container
parent
f511798c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
25 deletions
+22
-25
docker-compose.yml
run_sgx/docker-compose.yml
+2
-2
docker_test.py
scripts/docker_test.py
+7
-10
testw.cpp
testw.cpp
+13
-13
No files found.
run_sgx/docker-compose.yml
View file @
c846bbe2
version
:
'
3'
services
:
sgxwallet
:
image
:
skalenetwork/sgxwallet:latest
image
:
skalenetwork/sgxwallet:latest
_commit
ports
:
-
"
1026:1026"
-
"
1027:1027"
...
...
@@ -17,6 +17,6 @@ services:
max-size
:
"
10m"
max-file
:
"
4"
restart
:
unless-stopped
command
:
-
s
command
:
-
t
scripts/docker_test.py
View file @
c846bbe2
...
...
@@ -31,10 +31,8 @@ assert subprocess.call(["docker", "image", "inspect", FULL_IMAGE_NAME]) == 0;
#assert subprocess.call(["docker", "run", "-v", topDir + "/sgx_data:/usr/src/sdk/sgx_data",
# "-d", "--network=host", "skalenetwork/" + IMAGE_NAME +":" + TAG_POSTFIX]) == 0
obj
=
subprocess
.
Popen
([
"docker"
,
"run"
,
"-v"
,
topDir
+
"/sgx_data:/usr/src/sdk/sgx_data"
,
"-d"
,
"--network=host"
,
"skalenetwork/"
+
IMAGE_NAME
+
":"
+
TAG_POSTFIX
,
"-y"
],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
)
obj
.
communicate
(
input
=
b
"i confirm"
,
timeout
=
5
)
obj
.
terminate
()
obj
.
wait
()
assert
subprocess
.
call
([
"docker"
,
"run"
,
"-v"
,
topDir
+
"/sgx_data:/usr/src/sdk/sgx_data"
,
"-d"
,
"--network=host"
,
"skalenetwork/"
+
IMAGE_NAME
+
":"
+
TAG_POSTFIX
,
"-y"
])
==
0
time
.
sleep
(
5
);
...
...
@@ -58,9 +56,8 @@ s3.connect((address, 1028))
s1
.
close
()
s2
.
close
()
s3
.
close
()
assert
subprocess
.
call
([
"docker"
,
"stop"
,
"sgxwallet"
])
==
0
assert
subprocess
.
call
([
"docker"
,
"rm"
,
"sgxwallet"
])
==
0
assert
subprocess
.
call
([
"rm"
,
"-rf"
,
topDir
+
"/sgx_data"
])
==
0
assert
subprocess
.
call
([
"docker"
,
"run"
,
"-v"
,
topDir
+
"/sgx_data:/usr/src/sdk/sgx_data"
,
"-ti"
,
"--name"
,
"sgxwallet"
,
"--network=host"
,
"skalenetwork/"
+
IMAGE_NAME
+
":"
+
TAG_POSTFIX
,
"-t"
])
==
0
\ No newline at end of file
testw.cpp
View file @
c846bbe2
...
...
@@ -136,7 +136,7 @@ TEST_CASE("BLS key encrypt/decrypt", "[bls-key-encrypt-decrypt]") {
DEBUG_PRINT
=
1
;
is_sgx_https
=
0
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
//init_enclave();
...
...
@@ -549,7 +549,7 @@ TEST_CASE("BLS_DKG test", "[bls_dkg]") {
is_sgx_https
=
0
;
DEBUG_PRINT
=
1
;
cerr
<<
"test started"
<<
endl
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
cerr
<<
"Server inited"
<<
endl
;
HttpClient
client
(
"http://localhost:1029"
);
StubClient
c
(
client
,
JSONRPC_CLIENT_V2
);
...
...
@@ -682,7 +682,7 @@ TEST_CASE("API test", "[api_test]") {
is_sgx_https
=
0
;
//cerr << __GNUC__ << endl;
cerr
<<
"API test started"
<<
endl
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
//HttpServer httpserver(1025);
//SGXWalletServer s(httpserver,
// JSONRPC_SERVER_V2); // hybrid server (json-rpc 1.0 & 2.0)
...
...
@@ -785,7 +785,7 @@ TEST_CASE("API test", "[api_test]") {
TEST_CASE
(
"getServerStatus test"
,
"[getServerStatus_test]"
)
{
is_sgx_https
=
0
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
HttpClient
client
(
"http://localhost:1029"
);
StubClient
c
(
client
,
JSONRPC_CLIENT_V2
);
REQUIRE
(
c
.
getServerStatus
()[
"status"
]
==
0
);
...
...
@@ -909,7 +909,7 @@ TEST_CASE("ManySimultaneousThreads", "[many_threads_test]") {
DEBUG_PRINT
=
1
;
is_aes
=
1
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
vector
<
thread
>
threads
;
int
num_threads
=
4
;
...
...
@@ -930,7 +930,7 @@ TEST_CASE("ecdsa API test", "[ecdsa_api_test]") {
is_aes
=
1
;
cerr
<<
"ecdsa_api_test started"
<<
endl
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
cerr
<<
"Server inited"
<<
endl
;
HttpClient
client
(
"http://localhost:1029"
);
...
...
@@ -980,7 +980,7 @@ TEST_CASE("dkg API test", "[dkg_api_test]") {
is_sgx_https
=
0
;
cerr
<<
"dkg_api_test started"
<<
endl
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
cerr
<<
"Server inited"
<<
endl
;
HttpClient
client
(
"http://localhost:1029"
);
...
...
@@ -1057,7 +1057,7 @@ TEST_CASE("isPolyExists test", "[is_poly_test]") {
is_sgx_https
=
0
;
cerr
<<
"is_poly_test started"
<<
endl
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
cerr
<<
"Server inited"
<<
endl
;
HttpClient
client
(
"http://localhost:1029"
);
...
...
@@ -1089,7 +1089,7 @@ TEST_CASE("AES_DKG test", "[aes_dkg]") {
reset_db
();
cerr
<<
"test started"
<<
endl
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
cerr
<<
"Server inited"
<<
endl
;
HttpClient
client
(
"http://localhost:1029"
);
StubClient
c
(
client
,
JSONRPC_CLIENT_V2
);
...
...
@@ -1219,7 +1219,7 @@ TEST_CASE("bls_sign_api test", "[bls_sign]") {
is_aes
=
1
;
cerr
<<
"test started"
<<
endl
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
cerr
<<
"Server inited"
<<
endl
;
HttpClient
client
(
"http://localhost:1029"
);
StubClient
c
(
client
,
JSONRPC_CLIENT_V2
);
...
...
@@ -1252,7 +1252,7 @@ TEST_CASE("AES encrypt/decrypt", "[AES-encrypt-decrypt]") {
DEBUG_PRINT
=
1
;
is_sgx_https
=
0
;
init_all
(
false
,
fals
e
,
init_SEK
);
init_all
(
false
,
tru
e
,
init_SEK
);
//init_enclave();
int
errStatus
=
-
1
;
...
...
@@ -1281,7 +1281,7 @@ TEST_CASE("AES encrypt/decrypt", "[AES-encrypt-decrypt]") {
//TEST_CASE("BLS key import", "[bls-key-import]") {
// reset_db();
// init_all(false,
fals
e);
// init_all(false,
tru
e);
//
//
//
...
...
@@ -1321,7 +1321,7 @@ TEST_CASE("AES encrypt/decrypt", "[AES-encrypt-decrypt]") {
//
// reset_db();
//
// init_all(false,
fals
e);
// init_all(false,
tru
e);
//
//
// auto result = importBLSKeyShareImpl( TEST_BLS_KEY_SHARE, TEST_BLS_KEY_NAME, 2, 2, 1);
...
...
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