Repository navigation
chore: drop dscheck maas - #6638
Conversation
|
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging blackboxsw, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag blackboxsw to reopen it.) |
| SHELL_MOCK_TMPL = """\ | ||
| %(name)s() { | ||
| local out='%(out)s' err='%(err)s' r='%(ret)s' RET='%(RET)s' | ||
| %(DI_VARS)s |
There was a problem hiding this comment.
This might work, but it lays a trap for future developers.
This injects a global variable into the script by way of a mocked function.
What happens if no mock is provided?
There was a problem hiding this comment.
Perhaps we can make use of the file sourced in get_environment instead?
There was a problem hiding this comment.
Per your suggestion, kooks like we can write into ds-identify-env file directly. I provided a mechanism to set that to /ds_identify-env and write it with files to allow sourcing env vars we want to leverage during main() invocation.
5f0ebe1 to
5a29b59
Compare
holmanb
left a comment
There was a problem hiding this comment.
I wouldn't put an internal jira ticket in the commit history - it isn't generally useful. Linking to it from the PR description is fine. I would also modify the commit message to indicate that the current code is broken - as it is this reads as if ds-identify is loosing MAAS support, which it isn't.
Once the commit message is updated this looks good to me!
| "DEBUG_LEVEL=2", | ||
| "DI_LOG=stderr", | ||
| "PATH_ROOT='%s'" % rootd, | ||
| "PATH_DI_ENV='%s/ds-identify-env'" % rootd, |
Add test_ds_identify functionality to provide environment variables to tests using PATH_DI_ENV.
tests/unittests/cloudinit/example.pyshould be tested bytests/unittests/test_example.pytox -e py3Proposed Commit Messages
Additional Context
Test Steps
Merge type