forked from puppetlabs/bolt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(puppetlabsGH-2905) Update BoltSpec functions to allow absolute paths
Updates BoltSpec `allow/expect_upload` and `allow/expect_script` functions to accept an absolute path. The path referred to must still exist, but that's relatively easy to mock with temporary files. ---- !bug * **Update BoltSpec functions to allow absolute paths** ([puppetlabs#2905](puppetlabs#2905)) BoltSpec's `allow_upload`, `expect_upload`, `allow_script`, and `expect_script` functions now support passing absolute paths that rather than a module reference. The referenced path must refer to a real file or upload and script functions will still error.
- Loading branch information
1 parent
183cedf
commit 036f192
Showing
5 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
plan plans::script(TargetSpec $nodes) { | ||
run_script('plans/dir/prep', $nodes) | ||
plan plans::script(TargetSpec $nodes, String $source) { | ||
run_script($source, $nodes) | ||
return run_script('plans/script', $nodes, 'arguments' => ['arg']) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
plan plans::upload(TargetSpec $nodes) { | ||
upload_file('plans/dir/prep', '/b', $nodes) | ||
plan plans::upload(TargetSpec $nodes, String $source) { | ||
upload_file($source, '/b', $nodes) | ||
return upload_file('plans/script', '/d', $nodes) | ||
} |