in e2etest/GuestProxyAgentTest/Utilities/RunCommandSettingBuilder.cs [111:138]
public RunCommandSetting Build()
{
if(this.runCommandSetting.runCommandScriptSAS == null && this.scriptFullPath == null)
{
throw new Exception("neither specifying the run command script from runCommandScriptSAS nor scriptFullPath");
}
if(this.runCommandSetting.runCommandName == null)
{
throw new Exception("runCommandName was not specified.");
}
if(this.runCommandSetting.runCommandScriptSAS == null)
{
this.runCommandSetting.runCommandScriptSAS = StorageHelper.Instance.Upload2SharedBlob(Constants.SHARED_SCRIPTS_CONTAINER_NAME, this.scriptFullPath);
}
runCommandSetting.testCaseSetting = _testCaseSetting;
this.runCommandSetting.outputBlobSAS = StorageHelper.Instance.CreateAppendBlob(Constants.SHARED_E2E_TEST_OUTPUT_CONTAINER_NAME, Constants.RUNCOMMAND_OUTPUT_FILE_NAME, this._testCaseSetting.TestScenarioStorageFolderPrefix + "/" + this.runCommandSetting.runCommandName);
this.runCommandSetting.errorBlobSAS= StorageHelper.Instance.CreateAppendBlob(Constants.SHARED_E2E_TEST_OUTPUT_CONTAINER_NAME, Constants.RUNCOMMAND_ERROR_OUTPUT_FILE_NAME, this._testCaseSetting.TestScenarioStorageFolderPrefix + "/" + this.runCommandSetting.runCommandName);
if(this.runCommandSetting.customOutputSAS != null && this.runCommandSetting.customOutputSAS.Count() > 0)
{
this.runCommandSetting.runCommandParameters.Add(Constants.RUNCOMMAND_CUSTOM_OUTPUT_SAS_PARAMETER_NAME, System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(this.runCommandSetting.customOutputSAS)));
}
return this.runCommandSetting;
}