cc_seed_random: update documentation and fix integration test#771
Merged
Conversation
smoser
approved these changes
Jan 13, 2021
Collaborator
smoser
left a comment
There was a problem hiding this comment.
I'm good with this as it is or with any amount of my feedback taken. (But I do think the paren are not necessary 😉).
| the data to be written. The command should be specified as a list of args in | ||
| the ``command`` key. If a command is specified that cannot be run, no error | ||
| will be reported unless ``command_required`` is set to true. | ||
| A command can be specified (which will run after any data is written). The |
Collaborator
There was a problem hiding this comment.
(the parens are not necessary here). It also wasn't completely clear to me what or where "data was written". That is possibly because I was just reading this as diff output, so maybe I lost context.
Maybe:
If a ``command`` key is present, the command will be executed after ``file`` has been populated.
The command's environment will contain the value of ``file`` specified above in the key
``RANDOM_SEED_FILE``. If a command is specified that cannot be run, no error will
be reported unless ``command_required`` is set to true.
1353df1 to
77366a9
Compare
The documentation did not mention that the given data may not be the exact string written: the cloud's random data may be added to it. Additionally, the documentation of the command key was incorrect. test_seed_random_data was updated to check that the given data is a prefix of the written data, to match cloud-init's expected (and, now, documented) behaviour. LP: #1911227
77366a9 to
0e1b133
Compare
smoser
approved these changes
Jan 13, 2021
This was referenced May 12, 2023
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Commit Message
Test Steps
Run
CLOUD_INIT_PLATFORM=azure pytest tests/integration_tests/modules/test_seed_random_data.pyand observe a pass (vs. a fail previously).Checklist: