Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github action for mysql backend #58

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

4e554c4c
Copy link
Contributor

@4e554c4c 4e554c4c commented Nov 29, 2022

Currently the MySQL backend is not tested, as it requires MySQL server
to run. I have added an integration test to the GitHub workflows which
starts MySQL server in a container, which allows the backend to be
tested. This ignores several "issues" that exist with the tests, such as
the fact that the test is non-idempotent, and fails to run twice.

@4e554c4c 4e554c4c force-pushed the mysql-integration branch 2 times, most recently from 377ea18 to 0738f67 Compare November 29, 2022 22:41
@4e554c4c
Copy link
Contributor Author

reasons for the PORT environment variable:
you cannot use port: 3306:3306 because GitHub already runs mysql (v5.7) on github runners. An alternative to this is somehow stopping the host mysql before the container starts?
Really GitHub can assign the port for you, and you can somehow grab the port out of the job dictionary, but I cannot figure out the syntax. See here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idports

reasons for the MYSQL_PWD environment variable:
mysql and mysqladmin will yell at you if you specify the password on the command line and then not work. you can specify it in an option file, but the option file must be created with mysql_config_editor, which also doesn't let you specify the password on the command line. The MySQL docs state

Use of MYSQL_PWD to specify a MySQL password must be considered extremely insecure and should not be used

but at least they let us use it unlike the --password= command line option.

Currently the MySQL backend is not tested, as it requires MySQL server
to run. I have added an integration test to the GitHub workflows which
starts MySQL server in a container, which allows the backend to be
tested. This ignores several "issues" that exist with the tests, such as
the fact that the test is non-idempotent, and fails to run twice.
Copy link
Member

@jessepeterson jessepeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks!

@jessepeterson jessepeterson merged commit 60072b4 into micromdm:main Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants