Skip to content

Commit

Permalink
Remove docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamon committed Mar 20, 2024
1 parent 3c24904 commit b9517f2
Show file tree
Hide file tree
Showing 20 changed files with 332 additions and 60 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/testing-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ jobs:
uses: ./.github/actions/setup-poetry
- name: 'Run integration tests (proxy config)'
run: |
make prepare-proxy-config
set -x
DOCKER_GID=$(python -c "import os; print(os.getgid())") DOCKER_UID=$(python -c "import os; print(os.getuid())") docker-compose up -d
docker-compose ps
ls ${{ github.workspace }}/.mitm/proxy1
poetry run pytest tests/integration/proxy_config -s -v
env:
PINECONE_API_KEY: '${{ secrets.PINECONE_API_KEY }}'
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,3 @@ dmypy.json
*.hdf5
*~

# MITM proxy config test, generated configs
.mitm
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,3 @@ set-production:

set-development:
echo "" > pinecone/__environment__

prepare-proxy-config:
mkdir -p .mitm/proxy1
mkdir -p .mitm/proxy2

proxy-up: prepare-proxy-config
DOCKER_GID=$$(python -c "import os; print(os.getgid())") DOCKER_UID=$$(python -c "import os; print(os.getuid())") docker-compose up -d --remove-orphans

proxy-stop:
DOCKER_GID=$$(python -c "import os; print(os.getgid())") DOCKER_UID=$$(python -c "import os; print(os.getuid())") docker-compose stop
20 changes: 0 additions & 20 deletions compose.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions tests/integration/proxy_config/.mitm/proxy1/mitmproxy-ca-cert.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDNTCCAh2gAwIBAgIUG5Ji5NxWD3Q7h8remh7vYloa1UMwDQYJKoZIhvcNAQEL
BQAwKDESMBAGA1UEAwwJbWl0bX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integration/proxy_config/.mitm/proxy1/mitmproxy-ca-cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDNTCCAh2gAwIBAgIUG5Ji5NxWD3Q7h8remh7vYloa1UMwDQYJKoZIhvcNAQEL
BQAwKDESMBAGA1UEAwwJbWl0bXByb3h5MRIwEAYDVQQKDAltaXRtcHJveHkwHhcN
MjQwMzE3MDQwNjA2WhcNMzQwMzE3MDQwNjA2WjAoMRIwEAYDVQQDDAltaXRtcHJv
eHkxEjAQBgNVBAoMCW1pdG1wcm94eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAI96RxFM2U3cXyhJre0DbJvZDvrr5IEFJhEO9+7vRFM73cTax2jhUDQx
ZLx5LgWWQmqTfNop5ON1XKqYMxpjTJrHEbIcnybLRmLL+SXVsj547vRH1rps+G4m
3iJWorGju3PieJYj8ppro0mhlynZRHOM8EzkX9TgxdtFpz3hejy9btOwEkRGrjM1
5prsDubYn0JwGz6N2N/yAf9mviWKnP1xc1CD2xIJwJKX1Tyqi9B93w1YL5JFV7yg
rdlRw4X0a3wav7GiJJkylv8cZrtZ4Kt4TwNMLpqh21LRqJkwyFE8NLXMD/aS4q2U
3K5ml6H9MthNkrheH0RlsiOe5RQJMAcCAwEAAaNXMFUwDwYDVR0TAQH/BAUwAwEB
/zATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FM83YTNU3L2z9vvQvHrGX0U/XAf2MA0GCSqGSIb3DQEBCwUAA4IBAQARURZnD7Nm
d/kN1gIpl+x9aAaMLlvS3hgn6quuVVJzyiHYZKmBq/76VPIyn4dSFQakvS5nob3R
FNzlq3QR6o4jAR6BIEzuKDKExFdYz7hfBA6JgGUxTsofJPBmqC2BvRZlkt/Qb3ea
HDCJUYOXfppABimlVi5gOVf6r80wcuqTK6sIp+V+HVhAf2RbpAFnLWOSzkZ7Qaa9
jZJ5Jd2nYTx+eOjkNZL2kiV6R9tvuJK0C9nQeJJDTwkmksLJEg+5CS6D51zdRgdc
dCvvesmF6dWQmOxZdm3pqusTkIWNq2RBb2kEqZA84cfVLX4+OOhbieC9XKQjsOcE
h+rsI/lmeuR9
-----END CERTIFICATE-----
Binary file not shown.
47 changes: 47 additions & 0 deletions tests/integration/proxy_config/.mitm/proxy1/mitmproxy-ca.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAj3pHEUzZTdxfKEmt7QNsm9kO+uvkgQUmEQ737u9EUzvdxNrH
aOFQNDFkvHkuBZZCapN82ink43VcqpgzGmNMmscRshyfJstGYsv5JdWyPnju9EfW
umz4bibeIlaisaO7c+J4liPymmujSaGXKdlEc4zwTORf1ODF20WnPeF6PL1u07AS
REauMzXmmuwO5tifQnAbPo3Y3/IB/2a+JYqc/XFzUIPbEgnAkpfVPKqL0H3fDVgv
kkVXvKCt2VHDhfRrfBq/saIkmTKW/xxmu1ngq3hPA0wumqHbUtGomTDIUTw0tcwP
9pLirZTcrmaXof0y2E2SuF4fRGWyI57lFAkwBwIDAQABAoIBABaZiSY1d6knBCoh
aO8DchEeYJivnX+hIvze4bjWIWoG7Qi7+VsQ2oROH3L8l34zy+RjtO/cV3xomR8Z
+Dq413Et2CC5F2yR6lVXkbge8AOdIu6BflZBIeSf5K99/ASFKNq5GotzwBwIxmCr
vlbOLVUSJyvFcT7j5OaEEzLRGGMGq01Wvn6p4D3W3Fo7Upoj6gG8C+ndISHfCPWZ
pzJYW2iqnlvz3SAWKIhBYYq9OJrdFfi9ZNbKGYMUi2csMjVmDrAyRUi5qqVxM40x
Jumj4+0T8la8j9fms/9lkBzDh05pWGuuRfFj2ztTkIXUA23shNkpRwnuzu9kn786
NqulHdkCgYEAxcLDgXGTc5n47f/jRf7qV4iau0FjdhRElgB6ld18tVIGbj4dbQjS
NOTVbMgRp4ng+V9M8Na9UyTzrnTTkfvGG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TCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAI96RxFM2U3cXyhJre0DbJvZDvrr5IEFJhEO9+7vRFM73cTax2jhUDQx
ZLx5LgWWQmqTfNop5ON1XKqYMxpjTJrHEbIcnybLRmLL+SXVsj547vRH1rps+G4m
3iJWorGju3PieJYj8ppro0mhlynZRHOM8EzkX9TgxdtFpz3hejy9btOwEkRGrjM1
5prsDubYn0JwGz6N2N/yAf9mviWKnP1xc1CD2xIJwJKX1Tyqi9B93w1YL5JFV7yg
rdlRw4X0a3wav7GiJJkylv8cZrtZ4Kt4TwNMLpqh21LRqJkwyFE8NLXMD/aS4q2U
3K5ml6H9MthNkrheH0RlsiOe5RQJMAcCAwEAAaNXMFUwDwYDVR0TAQH/BAUwAwEB
/zATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FM83YTNU3L2z9vvQvHrGX0U/XAf2MA0GCSqGSIb3DQEBCwUAA4IBAQARURZnD7Nm
d/kN1gIpl+x9aAaMLlvS3hgn6quuVVJzyiHYZKmBq/76VPIyn4dSFQakvS5nob3R
FNzlq3QR6o4jAR6BIEzuKDKExFdYz7hfBA6JgGUxTsofJPBmqC2BvRZlkt/Qb3ea
HDCJUYOXfppABimlVi5gOVf6r80wcuqTK6sIp+V+HVhAf2RbpAFnLWOSzkZ7Qaa9
jZJ5Jd2nYTx+eOjkNZL2kiV6R9tvuJK0C9nQeJJDTwkmksLJEg+5CS6D51zdRgdc
dCvvesmF6dWQmOxZdm3pqusTkIWNq2RBb2kEqZA84cfVLX4+OOhbieC9XKQjsOcE
h+rsI/lmeuR9
-----END CERTIFICATE-----
14 changes: 14 additions & 0 deletions tests/integration/proxy_config/.mitm/proxy1/mitmproxy-dhparam.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

-----BEGIN DH PARAMETERS-----
MIICCAKCAgEAyT6LzpwVFS3gryIo29J5icvgxCnCebcdSe/NHMkD8dKJf8suFCg3
O2+dguLakSVif/t6dhImxInJk230HmfC8q93hdcg/j8rLGJYDKu3ik6H//BAHKIv
j5O9yjU3rXCfmVJQic2Nne39sg3CreAepEts2TvYHhVv3TEAzEqCtOuTjgDv0ntJ
Gwpj+BJBRQGG9NvprX1YGJ7WOFBP/hWU7d6tgvE6Xa7T/u9QIKpYHMIkcN/l3ZFB
chZEqVlyrcngtSXCROTPcDOQ6Q8QzhaBJS+Z6rcsd7X+haiQqvoFcmaJ08Ks6LQC
ZIL2EtYJw8V8z7C0igVEBIADZBI6OTbuuhDwRw//zU1uq52Oc48CIZlGxTYG/Evq
o9EWAXUYVzWkDSTeBH1r4z/qLPE2cnhtMxbFxuvK53jGB0emy2y1Ei6IhKshJ5qX
IB/aE7SSHyQ3MDHHkCmQJCsOd4Mo26YX61NZ+n501XjqpCBQ2+DfZCBh8Va2wDyv
A2Ryg9SUz8j0AXViRNMJgJrr446yro/FuJZwnQcO3WQnXeqSBnURqKjmqkeFP+d8
6mk2tqJaY507lRNqtGlLnj7f5RNoBFJDCLBNurVgfvq9TCVWKDIFD4vZRjCrnl6I
rD693XKIHUCWOjMh1if6omGXKHH40QuME2gNa50+YPn1iYDl88uDbbMCAQI=
-----END DH PARAMETERS-----
20 changes: 20 additions & 0 deletions tests/integration/proxy_config/.mitm/proxy2/mitmproxy-ca-cert.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDNTCCAh2gAwIBAgIUUo4sMqY4s3aM0RqjLhD1ZzGOhnowDQYJKoZIhvcNAQEL
BQAwKDESMBAGA1UEAwwJbWl0bXByb3h5MRIwEAYDVQQKDAltaXRtcHJveHkwHhcN
MjQwMzE3MDQwNjA2WhcNMzQwMzE3MDQwNjA2WjAoMRIwEAYDVQQDDAltaXRtcHJv
eHkxEjAQBgNVBAoMCW1pdG1wcm94eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAJ/BEbexCoDvIEB2zF8R13tNVqc5eW5kS4Rp0IqKSfWmmrghA0bc6X22
p6juusl1KSpoWcR1L0iD1Wa2Tlaip0c/DJUwJHwJ70UZyWjwAJPbF282dYqqwygC
hWP1EFKVlctHE6MEMc+o1W7hLC690n0EKtatT5lCHSuUwK69RoNijfPqJrqstQKN
hJZ9bDIHVwi86jUbUcfjb9Uo/AiMjAonuy82wiarHdNmRIIcRcBvXkhx7on/5X5z
/Vq4+lgR91lP+6qYotHI988e4plF0KuzjrTPyki7+OiyJkMxJwJW/E1DU6bvTchN
H9wB27kJ6GtFW21n1YqRWpCR7JyQ4D8CAwEAAaNXMFUwDwYDVR0TAQH/BAUwAwEB
/zATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FBNhRsjEjijaA8rS3XezhrtEpVvRMA0GCSqGSIb3DQEBCwUAA4IBAQAc8wSUSk7y
Sz4pQmi6EciZmU9jEnBHld9uYJ4mqRR2oPm+eRPq0yW1VifNEgMLSqNcv8/EH93o
C16jHHQ5TrV0C+wMnnUN3BxliDsi6FdbMa92Df09K9C/LP/v68H4rtMaMskvOrHw
k/r/NsKCxZ1GywLA7s/yVKgtr7ARARf6hHJS6/bxqohdaCFZtxmQIH26sOkTV2Ds
pf1ey+d3xitOl/roLXV91KjGfML4PRCzIPOw0+odSw62e2kikI77OQxOEn4zjyg+
a0B344gMV7LaNTyqLTx41wU0hk62CeHHS4Gc0XLMfw9NYPTrjyQYK1+lEWDSEHCn
TiBThXoIGeAU
-----END CERTIFICATE-----
Binary file not shown.
20 changes: 20 additions & 0 deletions tests/integration/proxy_config/.mitm/proxy2/mitmproxy-ca-cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDNTCCAh2gAwIBAgIUUo4sMqY4s3aM0RqjLhD1ZzGOhnowDQYJKoZIhvcNAQEL
BQAwKDESMBAGA1UEAwwJbWl0bXByb3h5MRIwEAYDVQQKDAltaXRtcHJveHkwHhcN
MjQwMzE3MDQwNjA2WhcNMzQwMzE3MDQwNjA2WjAoMRIwEAYDVQQDDAltaXRtcHJv
eHkxEjAQBgNVBAoMCW1pdG1wcm94eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAJ/BEbexCoDvIEB2zF8R13tNVqc5eW5kS4Rp0IqKSfWmmrghA0bc6X22
p6juusl1KSpoWcR1L0iD1Wa2Tlaip0c/DJUwJHwJ70UZyWjwAJPbF282dYqqwygC
hWP1EFKVlctHE6MEMc+o1W7hLC690n0EKtatT5lCHSuUwK69RoNijfPqJrqstQKN
hJZ9bDIHVwi86jUbUcfjb9Uo/AiMjAonuy82wiarHdNmRIIcRcBvXkhx7on/5X5z
/Vq4+lgR91lP+6qYotHI988e4plF0KuzjrTPyki7+OiyJkMxJwJW/E1DU6bvTchN
H9wB27kJ6GtFW21n1YqRWpCR7JyQ4D8CAwEAAaNXMFUwDwYDVR0TAQH/BAUwAwEB
/zATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FBNhRsjEjijaA8rS3XezhrtEpVvRMA0GCSqGSIb3DQEBCwUAA4IBAQAc8wSUSk7y
Sz4pQmi6EciZmU9jEnBHld9uYJ4mqRR2oPm+eRPq0yW1VifNEgMLSqNcv8/EH93o
C16jHHQ5TrV0C+wMnnUN3BxliDsi6FdbMa92Df09K9C/LP/v68H4rtMaMskvOrHw
k/r/NsKCxZ1GywLA7s/yVKgtr7ARARf6hHJS6/bxqohdaCFZtxmQIH26sOkTV2Ds
pf1ey+d3xitOl/roLXV91KjGfML4PRCzIPOw0+odSw62e2kikI77OQxOEn4zjyg+
a0B344gMV7LaNTyqLTx41wU0hk62CeHHS4Gc0XLMfw9NYPTrjyQYK1+lEWDSEHCn
TiBThXoIGeAU
-----END CERTIFICATE-----
Binary file not shown.
47 changes: 47 additions & 0 deletions tests/integration/proxy_config/.mitm/proxy2/mitmproxy-ca.pem
Original file line number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EKtatT5lCHSuUwK69RoNijfPqJrqstQKN
hJZ9bDIHVwi86jUbUcfjb9Uo/AiMjAonuy82wiarHdNmRIIcRcBvXkhx7on/5X5z
/Vq4+lgR91lP+6qYotHI988e4plF0KuzjrTPyki7+OiyJkMxJwJW/E1DU6bvTchN
H9wB27kJ6GtFW21n1YqRWpCR7JyQ4D8CAwEAAaNXMFUwDwYDVR0TAQH/BAUwAwEB
/zATBgNVHSUEDDAKBggrBgEFBQcDATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
FBNhRsjEjijaA8rS3XezhrtEpVvRMA0GCSqGSIb3DQEBCwUAA4IBAQAc8wSUSk7y
Sz4pQmi6EciZmU9jEnBHld9uYJ4mqRR2oPm+eRPq0yW1VifNEgMLSqNcv8/EH93o
C16jHHQ5TrV0C+wMnnUN3BxliDsi6FdbMa92Df09K9C/LP/v68H4rtMaMskvOrHw
k/r/NsKCxZ1GywLA7s/yVKgtr7ARARf6hHJS6/bxqohdaCFZtxmQIH26sOkTV2Ds
pf1ey+d3xitOl/roLXV91KjGfML4PRCzIPOw0+odSw62e2kikI77OQxOEn4zjyg+
a0B344gMV7LaNTyqLTx41wU0hk62CeHHS4Gc0XLMfw9NYPTrjyQYK1+lEWDSEHCn
TiBThXoIGeAU
-----END CERTIFICATE-----
14 changes: 14 additions & 0 deletions tests/integration/proxy_config/.mitm/proxy2/mitmproxy-dhparam.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

-----BEGIN DH PARAMETERS-----
MIICCAKCAgEAyT6LzpwVFS3gryIo29J5icvgxCnCebcdSe/NHMkD8dKJf8suFCg3
O2+dguLakSVif/t6dhImxInJk230HmfC8q93hdcg/j8rLGJYDKu3ik6H//BAHKIv
j5O9yjU3rXCfmVJQic2Nne39sg3CreAepEts2TvYHhVv3TEAzEqCtOuTjgDv0ntJ
Gwpj+BJBRQGG9NvprX1YGJ7WOFBP/hWU7d6tgvE6Xa7T/u9QIKpYHMIkcN/l3ZFB
chZEqVlyrcngtSXCROTPcDOQ6Q8QzhaBJS+Z6rcsd7X+haiQqvoFcmaJ08Ks6LQC
ZIL2EtYJw8V8z7C0igVEBIADZBI6OTbuuhDwRw//zU1uq52Oc48CIZlGxTYG/Evq
o9EWAXUYVzWkDSTeBH1r4z/qLPE2cnhtMxbFxuvK53jGB0emy2y1Ei6IhKshJ5qX
IB/aE7SSHyQ3MDHHkCmQJCsOd4Mo26YX61NZ+n501XjqpCBQ2+DfZCBh8Va2wDyv
A2Ryg9SUz8j0AXViRNMJgJrr446yro/FuJZwnQcO3WQnXeqSBnURqKjmqkeFP+d8
6mk2tqJaY507lRNqtGlLnj7f5RNoBFJDCLBNurVgfvq9TCVWKDIFD4vZRjCrnl6I
rD693XKIHUCWOjMh1if6omGXKHH40QuME2gNa50+YPn1iYDl88uDbbMCAQI=
-----END DH PARAMETERS-----
52 changes: 52 additions & 0 deletions tests/integration/proxy_config/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,58 @@
import time
import os
import pytest
import subprocess
from ..helpers import get_environment_var

PROXIES = {
'proxy1': {
'name': 'proxy1',
'port': 8080,
'ssl_ca_certs': os.path.abspath('./tests/integration/proxy_config/.mitm/proxy1'),
'auth': None
},
'proxy2': {
'name': 'proxy2',
'port': 8081,
'ssl_ca_certs': os.path.abspath('./tests/integration/proxy_config/.mitm/proxy2'),
'auth': ('testuser', 'testpassword')
}
}

def docker_command(proxy):
cmd = [
"docker", "run", "-d", # detach to run in background
"--rm", # remove container when stopped
"--name", proxy['name'], # name the container
"-p", f"{proxy['port']}:8080", # map the port
"-v", f"{proxy['ssl_ca_certs']}:/home/mitmproxy/.mitmproxy", # mount config as volume
"mitmproxy/mitmproxy", # docker image name
"mitmdump" # command to run
]
if proxy['auth']:
cmd.append(f"--set proxyauth={proxy['auth'][0]}:{proxy['auth'][1]}")
print(" ".join(cmd))
return " ".join(cmd)

@pytest.fixture(scope='session', autouse=True)
def start_docker():
with open("/tmp/proxyconfig-docker-start.log", "a") as output:
subprocess.call(docker_command(PROXIES['proxy1']), shell=True, stdout=output, stderr=output)
subprocess.call(docker_command(PROXIES['proxy2']), shell=True, stdout=output, stderr=output)
time.sleep(2)
yield
with open("/tmp/proxyconfig-docker-stop.log", "a") as output:
subprocess.call("docker stop proxy1", shell=True, stdout=output, stderr=output)
subprocess.call("docker stop proxy2", shell=True, stdout=output, stderr=output)

@pytest.fixture()
def proxy1():
return PROXIES['proxy1']

@pytest.fixture()
def proxy2():
return PROXIES['proxy2']

@pytest.fixture()
def api_key():
return get_environment_var('PINECONE_API_KEY')
Expand Down
Loading

0 comments on commit b9517f2

Please sign in to comment.