Unverified Commit c846bbe2 authored by kladko's avatar kladko

SKALE-2167 Fixed container

parent f511798c
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
......@@ -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
......@@ -136,7 +136,7 @@ TEST_CASE("BLS key encrypt/decrypt", "[bls-key-encrypt-decrypt]") {
DEBUG_PRINT = 1;
is_sgx_https = 0;
init_all(false, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false, init_SEK);
init_all(false, true, 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, false);
// init_all(false, true);
//
//
//
......@@ -1321,7 +1321,7 @@ TEST_CASE("AES encrypt/decrypt", "[AES-encrypt-decrypt]") {
//
// reset_db();
//
// init_all(false, false);
// init_all(false, true);
//
//
// auto result = importBLSKeyShareImpl( TEST_BLS_KEY_SHARE, TEST_BLS_KEY_NAME, 2, 2, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment