File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 3838- Optional default value for environment variable in configuration
3939- Warn the user for an action process returning a non-zero exit code
4040- Support for process path relative to homedir ~
41+ - Indicate path in validation when path is not found nor executable [ #159 ] [ 159 ]
4142
4243### Changed
4344
4445- Changed the method's one-step minimum requirement.
4546 An experiment with an empty method (without any activities) is now valid.
4647
48+ [ 159 ] : https://github.com/chaostoolkit/chaostoolkit-lib/issues/159
49+
4750## [ 1.7.1] [ ] - 2019-09-27
4851
4952[ 1.7.1 ] : https://github.com/chaostoolkit/chaostoolkit-lib/compare/1.7.0...1.7.1
Original file line number Diff line number Diff line change @@ -94,17 +94,17 @@ def validate_process_activity(activity: Activity):
9494 name = activity ["name" ]
9595 provider = activity ["provider" ]
9696
97- path = provider .get ("path" )
97+ path = raw_path = provider .get ("path" )
9898 if not path :
9999 raise InvalidActivity ("a process activity must have a path" )
100100
101101 path = shutil .which (path )
102102 if not path :
103103 raise InvalidActivity (
104104 "path '{path}' cannot be found, in activity '{name}'" .format (
105- path = path , name = name ))
105+ path = raw_path , name = name ))
106106
107107 if not os .access (path , os .X_OK ):
108108 raise InvalidActivity (
109109 "no access permission to '{path}', in activity '{name}'" .format (
110- path = path , name = name ))
110+ path = raw_path , name = name ))
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def test_process_probe_have_a_path():
7878def test_process_probe_path_must_exist ():
7979 with pytest .raises (InvalidActivity ) as exc :
8080 ensure_activity_is_valid (probes .ProcessPathDoesNotExistProbe )
81- assert "path 'None ' cannot be found, in activity" in str (exc .value )
81+ assert "path 'somewhere/not/here ' cannot be found, in activity" in str (exc .value )
8282
8383
8484def test_http_probe_must_have_a_url ():
You can’t perform that action at this time.
0 commit comments