From 0736cae28c5dbf1ee13be9fd018e20079138b345 Mon Sep 17 00:00:00 2001 From: anastasia prasolova Date: Thu, 8 Jul 2021 12:49:46 +0300 Subject: [PATCH] move to python3.8 Signed-off-by: anastasia prasolova --- README.md | 6 +++--- robot/resources/lib/payment_neogo.py | 28 ---------------------------- robot/variables/common.py | 4 ++-- 3 files changed, 5 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index e16c33da..be9406cf 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - `cd neofs-node` - `make` - `sudo cp bin/neofs-cli /usr/local/bin/neofs-cli`, add alias path to - bin/neofs-cli or run `export NEOFS_CLI_EXEC=` + bin/neofs-cli or run `export NEOFS_EXECUTABLE=` or download binary from releases: https://github.com/nspcc-dev/neofs-node/releases @@ -24,7 +24,7 @@ - `git checkout v0.92.0` (or the current version in the neofs-dev-env) - `make` - `sudo cp bin/neo-go /usr/local/bin/neo-go`, add alias path to bin/neo-go - or run `export NEOGO_CLI_EXEC=` + or run `export NEOGO_EXECUTABLE=` or download binary from releases: https://github.com/nspcc-dev/neo-go/releases @@ -38,7 +38,7 @@ Test cases are designed to run on Python 3.7+ ### Run -0. Add keywords repo to PYTHONPATH `export PYTHONPATH=${PYTHONPATH}:~/neofs-keywords` +0. Add keywords repo to PYTHONPATH `export PYTHONPATH=${PYTHONPATH}:~/neofs-keywords/lib::~/neofs-keywords/robot` 1. Execute the command `make run` diff --git a/robot/resources/lib/payment_neogo.py b/robot/resources/lib/payment_neogo.py index ece8395b..96571964 100644 --- a/robot/resources/lib/payment_neogo.py +++ b/robot/resources/lib/payment_neogo.py @@ -4,16 +4,9 @@ import subprocess import pexpect import re import uuid -import logging import requests import json import os -import tarfile -import sys - -sys.path.insert(0,'../neofs-keywords') -import converters -import wallet from robot.api.deco import keyword from robot.api import logger @@ -26,7 +19,6 @@ ROBOT_AUTO_KEYWORDS = False # path to neofs-cli executable NEOFS_CLI_EXEC = os.getenv('NEOFS_CLI_EXEC', 'neofs-cli') -NEOGO_CLI_EXEC = os.getenv('NEOGO_CLI_EXEC', 'neo-go') @keyword('Withdraw Mainnet Gas') @@ -74,26 +66,6 @@ def transaction_accepted_in_block(tx_id): logger.info("Transaction has been found in the block %s." % response.text ) return response.text -@keyword('Get Transaction') -def get_transaction(tx_id: str): - """ - This function return information about TX. - Parameters: - :param tx_id: transaction id - """ - - headers = {'Content-type': 'application/json'} - data = { "jsonrpc": "2.0", "id": 5, "method": "getapplicationlog", "params": [ tx_id ] } - response = requests.post(NEO_MAINNET_ENDPOINT, json=data, headers=headers, verify=False) - - if not response.ok: - raise Exception(f"""Failed: - request: {data}, - response: {response.text}, - status code: {response.status_code} {response.reason}""") - else: - logger.info(response.text) - @keyword('Get NeoFS Balance') def get_balance(privkey: str): diff --git a/robot/variables/common.py b/robot/variables/common.py index c3bc452e..230a4708 100644 --- a/robot/variables/common.py +++ b/robot/variables/common.py @@ -4,7 +4,7 @@ ROOT='../..' RESOURCES="%s/resources/lib" % ROOT CERT="%s/../../ca" % ROOT -KEYWORDS="%s/../../../neofs-keywords/" % ROOT +KEYWORDS="%s/../../../neofs-keywords/robot/" % ROOT # path from repo root is required for object put and get # in case when test is run from root in docker @@ -29,7 +29,7 @@ NEOFS_SN_WIF = os.getenv("NEOFS_SN_WIF", "Kwk6k2eC3L3QuPvD8aiaNyoSXgQ2YL1bwS5CP1 MAINNET_WALLET_WIF = os.getenv("MAINNET_WALLET_WIF", "KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr") NEOFS_ENDPOINT = os.getenv("NEOFS_ENDPOINT", "s01.neofs.devenv:8080") -NEOGO_CLI_EXEC = os.getenv("NEOGO_CLI_EXEC", "neo-go") +NEOGO_CLI_EXEC = os.getenv("NEOGO_EXECUTABLE", "neo-go") NEO_MAINNET_ENDPOINT = os.getenv("NEO_MAINNET_ENDPOINT", 'http://main_chain.neofs.devenv:30333') NEOFS_NEO_API_ENDPOINT = os.getenv("NEOFS_NEO_API_ENDPOINT", 'http://morph_chain.neofs.devenv:30333')