generated from pulumi/pulumi-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
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 mv command #93
Merged
Merged
Add mv command #93
Conversation
This file contains 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
…corresponding Go file.
A new method 'arg' has been added to the builder struct. This method appends a given string value to the 'args' slice of the builder instance.
The error messages in the Create, Update, and Delete methods of the rm command were previously prefixed with "wget". This has been corrected to prefix them with "rm" instead.
The binPath function now includes a case for the 'mv' command. This allows the system to return "mv" when this particular binary is requested, expanding the range of commands supported by our provisioner service.
A new file, mv.go, has been added to the cmd package. This file includes the implementation of a 'mv' command with various options such as backup, destination, directory, force and more. The MvArgs struct is defined to hold these options. Two methods Cmd() and ExpectedFiles() are implemented on this struct. The Mv type is also introduced with Create(), Update(), and Delete() methods implementing respective interfaces from infer package. Finally, the newly created 'mv' command is registered in provider.go by adding it to the list of inferred resources.
A new GomegaMatcher, 'havePropertyValue', has been added to the testing suite. This matcher checks if a given property has a specific value. Currently, it only supports string values. The implementation includes methods for matching, failure messages and negated failure messages.
A new test case has been added to the service tests. This test checks the functionality of moving a file from one location to another. It creates a temporary directory and a file within it, moves the file to a new location within the same directory, and then verifies that the move was successful by checking various conditions such as exit code, stdout content, created files list, moved files map and existence of old/new files. The temporary directory is cleaned up after each test run.
The service creation function now tracks not only the files it creates, but also those it moves. This is done by creating a map of source and destination paths for moved files. The existence of these paths is checked and logged before they are added to the map. The response from the create function now includes this map of moved files along with previously returned created files list.
Enhanced the 'arg' function within the builder struct to only append non-empty strings to the 'args' slice. This prevents unnecessary empty string entries, improving efficiency and cleanliness of code.
The hooks within the lifecycle tests have been restructured for better readability and maintainability. The changes include: - Moved some hook functions to more appropriate locations within the code. - Added new checks in certain hook functions to validate output properties and file contents. - Removed redundant hook functions that were performing similar checks.
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.
No description provided.