Skip to content

Commit

Permalink
Revert "Attempt to use and setup a proxy for CI"
Browse files Browse the repository at this point in the history
This reverts commit 48ae248.
  • Loading branch information
xmatthias committed Jan 16, 2023
1 parent 48ae248 commit 394a973
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@ jobs:
pip install -e .
- name: Tests incl. ccxt compatibility tests
env:
CI_WEB_PROXY: http://152.67.78.211:13128
run: |
pytest --random-order --cov=freqtrade --cov-config=.coveragerc --longrun
Expand Down
38 changes: 10 additions & 28 deletions tests/exchange/test_ccxt_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import pytest

from freqtrade.constants import Config
from freqtrade.enums import CandleType
from freqtrade.exchange import timeframe_to_minutes, timeframe_to_prev_date
from freqtrade.exchange.exchange import Exchange, timeframe_to_msecs
Expand All @@ -32,17 +31,16 @@
'leverage_tiers_public': False,
'leverage_in_spot_market': False,
},
'binance': {
'pair': 'BTC/USDT',
'stake_currency': 'USDT',
'use_ci_proxy': True,
'hasQuoteVolume': True,
'timeframe': '5m',
'futures': True,
'futures_pair': 'BTC/USDT:USDT',
'leverage_tiers_public': False,
'leverage_in_spot_market': False,
},
# 'binance': {
# 'pair': 'BTC/USDT',
# 'stake_currency': 'USDT',
# 'hasQuoteVolume': True,
# 'timeframe': '5m',
# 'futures': True,
# 'futures_pair': 'BTC/USDT:USDT',
# 'leverage_tiers_public': False,
# 'leverage_in_spot_market': False,
# },
'kraken': {
'pair': 'BTC/USDT',
'stake_currency': 'USDT',
Expand Down Expand Up @@ -109,23 +107,8 @@ def exchange_conf():
return config


def set_test_proxy(config: Config, use_proxy: bool) -> Config:
# Set proxy to test in CI.
import os
if use_proxy and (proxy := os.environ.get('CI_WEB_PROXY')):
config['exchange']['ccxt_config'] = {
'proxies': {
'https': proxy,
'http': proxy,
}
}

return config


@pytest.fixture(params=EXCHANGES, scope="class")
def exchange(request, exchange_conf):
set_test_proxy(exchange_conf, EXCHANGES[request.param].get('use_ci_proxy', False))
exchange_conf['exchange']['name'] = request.param
exchange_conf['stake_currency'] = EXCHANGES[request.param]['stake_currency']
exchange = ExchangeResolver.load_exchange(request.param, exchange_conf, validate=True)
Expand All @@ -138,7 +121,6 @@ def exchange_futures(request, exchange_conf, class_mocker):
if not EXCHANGES[request.param].get('futures') is True:
yield None, request.param
else:
set_test_proxy(exchange_conf, EXCHANGES[request.param].get('use_ci_proxy', False))
exchange_conf = deepcopy(exchange_conf)
exchange_conf['exchange']['name'] = request.param
exchange_conf['trading_mode'] = 'futures'
Expand Down

0 comments on commit 394a973

Please sign in to comment.