File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
src/CLU/Commands.Common.ScenarioTest Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -173,13 +173,16 @@ private void SetEnvironmentVariables(ProcessStartInfo startInfo)
173
173
174
174
private void ProcessError ( object sender , DataReceivedEventArgs e )
175
175
{
176
- Logger . Instance . WriteError ( e . Data ) ;
176
+ if ( e . Data != null )
177
+ {
178
+ Logger . Instance . WriteError ( e . Data ) ;
179
+ }
177
180
}
178
181
179
182
private void ProcessOutput ( object sender , DataReceivedEventArgs e )
180
183
{
181
- Logger . Instance . WriteMessage ( e . Data ) ;
182
184
_processOutput . Append ( e . Data ) ;
185
+ Logger . Instance . WriteMessage ( e . Data ) ;
183
186
}
184
187
185
188
private void EndProcess ( )
Original file line number Diff line number Diff line change 16
16
using Microsoft . Azure . Commands . Common . Authentication . Models ;
17
17
using Microsoft . Azure . Commands . Common . ScenarioTest ;
18
18
using Microsoft . Azure . Commands . Models ;
19
- using Moq . Protected ;
20
19
using Newtonsoft . Json ;
21
20
22
21
namespace Microsoft . Azure . Commands . Common . ScenarioTest
@@ -34,6 +33,10 @@ public ScenarioTestFixture()
34
33
var helper = GetRunner ( "lib" ) ;
35
34
var profileText = helper . RunScript ( credentials . LoginScriptName ) ;
36
35
var profile = JsonConvert . DeserializeObject < PSAzureProfile > ( profileText ) ;
36
+ if ( profile == null )
37
+ {
38
+ throw new ArgumentOutOfRangeException ( nameof ( profile ) , $ "Deserialized profile is null: `{ profileText } `") ;
39
+ }
37
40
AzureContext = ( AzureContext ) ( profile . Context ) ;
38
41
}
39
42
Original file line number Diff line number Diff line change 20
20
"Commands.Common" : " " ,
21
21
"Commands.Common.Authentication" : " " ,
22
22
"Commands.ResourceManager.Common" : " " ,
23
- "Commands.ScenarioTests.ResourceManager.Common" : " " ,
24
23
"Microsoft.Azure.Commands.Profile" : " " ,
25
24
"Microsoft.Azure.Management.Resources" : " 3.3.0-preview" ,
26
25
"Microsoft.Extensions.Logging.Console" : " 1.0.0-rc1-final" ,
You can’t perform that action at this time.
0 commit comments