Closed rafaelgomesxyz closed 2 months ago
This update introduces significant improvements to command execution and testing frameworks. Enhancements include better handling of nil
values in version checks, a refactor of command execution methods for increased clarity, and the restructuring of test cases. These changes lead to more robust workload interactions, streamlined assertions, enhanced logging capabilities, and an overall more efficient and maintainable codebase.
Files | Change Summary |
---|---|
lib/command/run.rb |
Adjusted logic to handle nil in deployed version calculations, defaulting to 0 to prevent errors. |
lib/core/controlplane.rb |
Updated workload_exec method to include -it flags for interactive terminal support. |
lib/cpflow/version.rb |
Changed MIN_CPLN_VERSION from "2.0.1" to "3.1.0" to reflect the new minimum compatibility requirement. |
spec/command/delete_spec.rb , spec/command/setup_app_spec.rb |
Removed cleanup after block, added --yes flag to command executions, and adjusted expectations for user interaction. |
spec/command/deploy_image_spec.rb , spec/command/promote_app_from_upstream_spec.rb , spec/command/run_spec.rb |
Refactored to replace spawn_cpflow_command with run_cpflow_command , updating assertions to match the new result format. |
spec/command/logs_spec.rb |
Renamed workload variable to cmd_args , altered iteration for logging tests, and refactored create_run_workload method for clarity. |
spec/support/command_helpers.rb |
Added logging statement in spawn_cpflow_command to enhance log clarity. |
spec/support/spawned_command.rb |
Removed read_full_output method and updated logging in wait_for method to improve output handling. |
sequenceDiagram
participant User
participant CommandHandler as CH
participant LogSystem as LS
User->>CH: Execute Command
CH->>LS: Log Command Details
CH->>CH: Process Command
CH->>User: Return Results
π° "In the burrow, a command takes flight,
We hop through the code, all day and night.
With logs that are clear and tests that donβt fuss,
Our fluffy little changes are just a plus!
So let's celebrate with a joyful cheer,
For a codebase that's bright, and full of good cheer!" π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
cpln
version to3.1.0
cpln workload exec
calls accordinglyNote: Ran all specs locally and they all passed.
Summary by CodeRabbit
New Features
Cpflow
module compatibility to version 3.1.0.Bug Fixes
Tests
Chores
cpln
package version and related fixes.