mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-21 21:41:46 -07:00
Embed pymysql
within the collection and use default test container
This change eliminates the need to install the connector on each controlled node, as `pymysql` version 1.1.1 is now included. As a result, we can safely assume its availability, thus simplifying the testing process. Also, I managed to remove the need for pre-built test containers. We now use the default test containers from ansible-test.
This commit is contained in:
parent
16d530348d
commit
04af62c400
49 changed files with 4392 additions and 979 deletions
|
@ -49,14 +49,6 @@ def is_exclude(exclude_list, test_suite):
|
|||
if excl.get('python') == test_suite.get('python'):
|
||||
match += 1
|
||||
|
||||
if 'connector_name' in excl:
|
||||
if excl.get('connector_name') == test_suite.get('connector_name'):
|
||||
match += 1
|
||||
|
||||
if 'connector_version' in excl:
|
||||
if excl.get('connector_version') == test_suite.get('connector_version'):
|
||||
match += 1
|
||||
|
||||
if match > 1:
|
||||
test_is_excluded = True
|
||||
return test_is_excluded
|
||||
|
@ -74,37 +66,29 @@ def main():
|
|||
for db_engine_name in tests_matrix_yaml.get('db_engine_name'):
|
||||
for db_engine_version in tests_matrix_yaml.get('db_engine_version'):
|
||||
for python in tests_matrix_yaml.get('python'):
|
||||
for connector_name in tests_matrix_yaml.get('connector_name'):
|
||||
for connector_version in tests_matrix_yaml.get('connector_version'):
|
||||
test_suite = {
|
||||
'ansible': ansible,
|
||||
'db_engine_name': db_engine_name,
|
||||
'db_engine_version': db_engine_version,
|
||||
'python': python,
|
||||
'connector_name': connector_name,
|
||||
'connector_version': connector_version
|
||||
}
|
||||
if not is_exclude(exclude_list, test_suite):
|
||||
matrix.append(test_suite)
|
||||
test_suite = {
|
||||
'ansible': ansible,
|
||||
'db_engine_name': db_engine_name,
|
||||
'db_engine_version': db_engine_version,
|
||||
'python': python,
|
||||
}
|
||||
if not is_exclude(exclude_list, test_suite):
|
||||
matrix.append(test_suite)
|
||||
|
||||
for tests in matrix:
|
||||
a = tests.get('ansible')
|
||||
dn = tests.get('db_engine_name')
|
||||
dv = tests.get('db_engine_version')
|
||||
p = tests.get('python')
|
||||
cn = tests.get('connector_name')
|
||||
cv = tests.get('connector_version')
|
||||
make_cmd = (
|
||||
f'make '
|
||||
f'ansible="{a}" '
|
||||
f'db_engine_name="{dn}" '
|
||||
f'db_engine_version="{dv}" '
|
||||
f'python="{p}" '
|
||||
f'connector_name="{cn}" '
|
||||
f'connector_version="{cv}" '
|
||||
f'test-integration'
|
||||
)
|
||||
print(f'Run tests for: Ansible: {a}, DB: {dn} {dv}, Python: {p}, Connector: {cn} {cv}')
|
||||
print(f'Run tests for: Ansible: {a}, DB: {dn} {dv}, Python: {p}')
|
||||
os.system(make_cmd)
|
||||
# TODO, allow for CTRL+C to break the loop more easily
|
||||
# TODO, store the failures from this iteration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue