(self)
| 143 | {'PARAM_ID': '918273', 'PARAM_VERBOSE': 'true', 'EXECUTION_ID': '123'}) |
| 144 | |
| 145 | def test_pass_as(self): |
| 146 | config = create_config_model( |
| 147 | 'config_x', |
| 148 | script_command='bash -c \'sleep 0.1 && echo ">$0< >$1< >$PARAM_P1< >$PARAM_P2< >$PARAM_P3<"\'', |
| 149 | parameters=[ |
| 150 | create_script_param_config('p1', pass_as='argument'), |
| 151 | create_script_param_config('p2', pass_as='env_variable'), |
| 152 | create_script_param_config('p3', pass_as='stdin'), |
| 153 | ], |
| 154 | parameter_values={'p1': 'abc', 'p2': 'def', 'p3': 'xyz'}) |
| 155 | |
| 156 | executor._process_creator = create_process_wrapper |
| 157 | self.create_executor(config) |
| 158 | self.executor.start(123) |
| 159 | |
| 160 | data = read_until_closed(self.executor.get_raw_output_stream(), 200) |
| 161 | output = ''.join(data) |
| 162 | |
| 163 | self.assertEqual('xyz\n>abc< >< >< >def< ><\n', output) |
| 164 | |
| 165 | def test_pass_as_stdin(self): |
| 166 | file_path = test_utils.create_file('my_script.sh', text=''' |
nothing calls this directly
no test coverage detected