diff options
author | tecxx <tecxx@rrs.at> | 2021-12-25 21:53:31 +0300 |
---|---|---|
committer | tecxx <tecxx@rrs.at> | 2021-12-25 21:53:31 +0300 |
commit | f429839a1770c9aea81957e0e6638fb59b750f8c (patch) | |
tree | 4f598b406d5457c6ed1e6e7b22feefb04ae3bb8b | |
parent | 66770e602ac392392d6063028138166817059998 (diff) |
fix test cases caused by new fields
5 files changed, 28 insertions, 5 deletions
diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs index ca2653be..f445fac8 100644 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs +++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs @@ -101,6 +101,10 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv ? connectionCsv[headers.IndexOf("Panel")] : ""; + connectionRecord.Username = headers.Contains("UserViaAPI") + ? connectionCsv[headers.IndexOf("UserViaAPI")] + : ""; + connectionRecord.Username = headers.Contains("Username") ? connectionCsv[headers.IndexOf("Username")] : ""; @@ -650,6 +654,12 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv connectionRecord.Inheritance.RenderingEngine = value; } + if (headers.Contains("InheritUserViaAPI")) + { + if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUserViaAPI")], out bool value)) + connectionRecord.Inheritance.UserViaAPI = value; + } + if (headers.Contains("InheritUsername")) { if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUsername")], out bool value)) diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs index 0a0bb753..5952bc3b 100644 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs +++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs @@ -61,7 +61,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv "CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" +
"PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" +
"VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;" +
- "RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;");
+ "RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;UserViaAPI;EC2InstanceId;EC2Region;");
if (_saveFilter.SaveInheritance)
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" +
@@ -73,7 +73,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv "InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" +
"InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" +
"InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" +
- "InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;" +
+ "InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;InheritUserViaAPI;" +
"InheritRedirectAudioCapture;InheritRdpVersion");
}
@@ -175,7 +175,10 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv .Append(FormatForCsv(con.RedirectAudioCapture))
.Append(FormatForCsv(con.RdpVersion))
.Append(FormatForCsv(con.RDPStartProgram))
- .Append(FormatForCsv(con.RDPStartProgramWorkDir));
+ .Append(FormatForCsv(con.RDPStartProgramWorkDir))
+ .Append(FormatForCsv(con.UserViaAPI))
+ .Append(FormatForCsv(con.EC2InstanceId))
+ .Append(FormatForCsv(con.EC2Region));
if (!_saveFilter.SaveInheritance)
@@ -247,7 +250,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv .Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout))
.Append(FormatForCsv(con.Inheritance.SoundQuality))
.Append(FormatForCsv(con.Inheritance.RedirectAudioCapture))
- .Append(FormatForCsv(con.Inheritance.RdpVersion));
+ .Append(FormatForCsv(con.Inheritance.RdpVersion))
+ .Append(FormatForCsv(con.Inheritance.UserViaAPI));
}
private string FormatForCsv(object value)
diff --git a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd b/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd index 3c580aef..7305756b 100644 --- a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd +++ b/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd @@ -172,5 +172,8 @@ <xs:attribute name="StartProgram" type="xs:string" use="optional" /> <xs:attribute name="StartProgramWorkDir" type="xs:string" use="optional" /> <xs:attribute name="OpeningCommand" type="xs:string" use="optional" /> + <xs:attribute name="UserViaAPI" type="xs:string" use="optional" /> + <xs:attribute name="EC2InstanceId" type="xs:string" use="optional" /> + <xs:attribute name="EC2Region" type="xs:string" use="optional" /> </xs:complexType> </xs:schema>
\ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs index c55f2d26..e3f9aeda 100644 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs +++ b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs @@ -129,7 +129,10 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSAspect, VNCViewOnly = true, RDGatewayUsageMethod = RDGatewayUsageMethod.Detect, - RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard + RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard, + UserViaAPI = "", + EC2InstanceId = "", + EC2Region = "eu-central-1" }; } diff --git a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs index d4ffab64..afcf04fe 100644 --- a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs +++ b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs @@ -75,5 +75,8 @@ public TType RDPStartProgram { get; set; } public TType RDPStartProgramWorkDir { get; set; } public TType OpeningCommand { get; set; } + public TType UserViaAPI { get; set; } + public TType EC2InstanceId { get; set; } + public TType EC2Region { get; set; } } } |