From 394a973bbb02d435259b9fc71e81f8cd53c491a3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 16 Jan 2023 21:14:46 +0100 Subject: [PATCH] Revert "Attempt to use and setup a proxy for CI" This reverts commit 48ae248d2d670377b6cbaa86123741ff2400b5d8. --- .github/workflows/ci.yml | 2 -- tests/exchange/test_ccxt_compat.py | 38 ++++++++---------------------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63a0b7468..608565fdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index 2f8c92c49..0ce6a286d 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -12,7 +12,6 @@ from typing import Tuple 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 @@ -32,17 +31,16 @@ EXCHANGES = { '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', @@ -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) @@ -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'