mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-19 13:29:09 +00:00
testing python script issues
This commit is contained in:
parent
6c8ae7a33f
commit
b24d48a042
2 changed files with 21 additions and 7 deletions
26
.github/workflows/tests.yml
vendored
26
.github/workflows/tests.yml
vendored
|
@ -24,10 +24,24 @@ jobs:
|
|||
env:
|
||||
DOTENV: ${{ secrets.DOTENV }}
|
||||
run: echo "$DOTENV" > .env
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Create virtual environment
|
||||
run: python -m venv venv
|
||||
|
||||
- name: Activate virtual environment and install dependencies
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Build project
|
||||
run: cargo build --release
|
||||
|
||||
- name: Run tests
|
||||
run: >-
|
||||
pwd;
|
||||
ls -la;
|
||||
sudo python -m pip install -r tests/requirements.txt;
|
||||
cargo build --release;
|
||||
sudo python tests/tests.py
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
python tests/tests.py
|
||||
|
|
|
@ -40,7 +40,7 @@ class Tun2ProxyTest(unittest.TestCase):
|
|||
ip_noproxy = get_ip(ip_version)
|
||||
additional = ['-6'] if ip_version == 6 else []
|
||||
p = subprocess.Popen(
|
||||
[get_tool_path(), "--proxy", os.getenv(proxy_var), '--setup', '-v', 'trace', '--dns', dns, *additional])
|
||||
['sudo', get_tool_path(), "--proxy", os.getenv(proxy_var), '--setup', '-v', 'trace', '--dns', dns, *additional])
|
||||
try:
|
||||
time.sleep(1)
|
||||
ip_withproxy = get_ip(ip_version)
|
||||
|
|
Loading…
Add table
Reference in a new issue