diff --git a/proxy/docker-compose-test.yml b/proxy/docker-compose-test.yml index e28734cb8..b341077bf 100644 --- a/proxy/docker-compose-test.yml +++ b/proxy/docker-compose-test.yml @@ -87,15 +87,15 @@ services: image: neonlabsorg/proxy:${REVISION} environment: FAUCET_RPC_PORT: 3333 - FAUCET_RPC_ALLOWED_ORIGINS: http://airdropper + FAUCET_RPC_ALLOWED_ORIGINS: '["http://airdropper"]' FAUCET_WEB3_ENABLE: 'false' - WEB3_RPC_URL: http://proxy:9090/solana + WEB3_RPC_URL: 'http://proxy:9090/solana' WEB3_PRIVATE_KEY: '' NEON_ERC20_TOKENS: NEON_ERC20_MAX_AMOUNT: 1000 FAUCET_SOLANA_ENABLE: 'true' - SOLANA_URL: http://solana:8899 - NEON_OPERATOR_KEYFILE: /root/.config/solana/id.json + SOLANA_URL: 'http://solana:8899' + NEON_OPERATOR_KEYFILE: '/root/.config/solana/id.json' NEON_ETH_MAX_AMOUNT: 10 TEST_FAUCET_INIT_NEON_BALANCE: 10000 hostname: faucet diff --git a/proxy/testing/test_neon_faucet.py b/proxy/testing/test_neon_faucet.py index 5e20629db..6ae216dfd 100644 --- a/proxy/testing/test_neon_faucet.py +++ b/proxy/testing/test_neon_faucet.py @@ -162,12 +162,13 @@ def deploy_erc20_token(self, name): return tx_deploy_receipt.contractAddress def start_faucet(self): + os.environ['FAUCET_RPC_BIND'] = '0.0.0.0' os.environ['FAUCET_RPC_PORT'] = '3333' - os.environ['FAUCET_RPC_ALLOWED_ORIGINS'] = 'http://localhost' + os.environ['FAUCET_RPC_ALLOWED_ORIGINS'] = '["http://localhost"]' os.environ['FAUCET_WEB3_ENABLE'] = 'true' os.environ['WEB3_RPC_URL'] = proxy_url os.environ['WEB3_PRIVATE_KEY'] = admin.key.hex() - os.environ['NEON_ERC20_TOKENS'] = self.token_a + ',' + self.token_b + os.environ['NEON_ERC20_TOKENS'] = '["' + self.token_a + '", "' + self.token_b + '"]' os.environ['NEON_ERC20_MAX_AMOUNT'] = '1000' os.environ['FAUCET_SOLANA_ENABLE'] = 'true' os.environ['SOLANA_URL'] = os.environ.get('SOLANA_URL', 'http://solana:8899') @@ -203,9 +204,9 @@ def test_neon_faucet_01_neon_in_galans(self): self.assertEqual(balance_after - balance_before, 99999000000000) # @unittest.skip("a.i.") - def test_neon_faucet_02_eth_token(self): + def test_neon_faucet_02_neon(self): print() - url = 'http://localhost:{}/request_eth_token'.format(os.environ['FAUCET_RPC_PORT']) + url = 'http://localhost:{}/request_neon'.format(os.environ['FAUCET_RPC_PORT']) # First request - trigger creation of the account without real transfer data = '{"wallet": "' + user.address + '", "amount": 0}' r = requests.post(url, data=data) @@ -229,7 +230,7 @@ def test_neon_faucet_02_eth_token(self): # @unittest.skip("a.i.") def test_neon_faucet_03_erc20_tokens(self): print() - url = 'http://localhost:{}/request_erc20_tokens'.format(os.environ['FAUCET_RPC_PORT']) + url = 'http://localhost:{}/request_erc20'.format(os.environ['FAUCET_RPC_PORT']) a_before = self.get_token_balance(self.token_a, user.address) b_before = self.get_token_balance(self.token_b, user.address) print('token A balance before:', a_before)