Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Add --require-name to create and run commands #560

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

darkowlzz
Copy link
Contributor

Adds --require-name flag to create and run commands to fail when a VM
name is not passed. This can be used along with config file to avoid
generating different resource from the same config file due to generated
name and UID.

Adds tests to verify the change.

Follow up of #525

@darkowlzz darkowlzz requested a review from twelho as a code owner March 14, 2020 12:05
Adds --require-name flag to create and run commands to fail when a VM
name is not passed. This can be used along with config file to avoid
generating different resource from the same config file due to generated
name and UID.

Adds tests for the change.
Adds require-name check in VM config file.
Adds test TestNewCreateOptions to test the failure cases when
--require-name is set and no name is provided only.
RequireName: true,
},
err: true,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These cases cover only the failure cases of NewCreateOptions. Success case would lead to actual image imports and would require setting up a back-end storage as well. These tests are enough for checking the --require-name flag.

@darkowlzz
Copy link
Contributor Author

Added require-name check for VM config file as well.

@stealthybox stealthybox merged commit 2197e52 into weaveworks:master Mar 23, 2020
@luxas luxas added this to the v0.7.0 milestone Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants