Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK changes for new properties "settings" and "advancedSettings" to gallery application version #28250

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,14 @@ public partial class GalleryApplicationVersionPublishingProfile : GalleryArtifac
EnableHealthCheck = enableHealthCheck;
CustomInit();
}

public GalleryApplicationVersionPublishingProfile(UserArtifactSource source, IList<TargetRegion> targetRegions, int? replicaCount, bool? excludeFromLatest, System.DateTime? publishedDate, System.DateTime? endOfLifeDate, string storageAccountType, string replicationMode, IList<GalleryTargetExtendedLocation> targetExtendedLocations, UserArtifactManage manageActions, bool? enableHealthCheck = default(bool?))
: base(targetRegions, replicaCount, excludeFromLatest, publishedDate, endOfLifeDate, storageAccountType, replicationMode, targetExtendedLocations)
{
Source = source;
ManageActions = manageActions;
EnableHealthCheck = enableHealthCheck;
CustomInit();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,16 @@ private GalleryApplicationVersion GetTestInputGalleryApplicationVersion(string a
Install = "powershell -command \"Expand-Archive -Path test.zip -DestinationPath C:\\package\"",
Remove = "del C:\\package "
},
Settings = new UserArtifactSettings
{
PackageFileName = "test.zip",
ConfigFileName = "config.cfg"
},
AdvancedSettings = new Dictionary<string, string>()
{
{ "cacheLimit", "500" },
{ "user", "root"}
},
ReplicaCount = 1,
StorageAccountType = StorageAccountType.StandardLRS,
TargetRegions = new List<TargetRegion> {
Expand Down Expand Up @@ -832,6 +842,16 @@ private void ValidateGalleryApplicationVersion(GalleryApplicationVersion applica
Assert.NotNull(applicationVersionOut.PublishingProfile.EndOfLifeDate);
Assert.NotNull(applicationVersionOut.PublishingProfile.PublishedDate);
Assert.NotNull(applicationVersionOut.Id);
Assert.Equal(applicationVersionIn.PublishingProfile.Settings.PackageFileName, applicationVersionOut.PublishingProfile.Settings.PackageFileName);
D1v38om83r marked this conversation as resolved.
Show resolved Hide resolved
Assert.Equal(applicationVersionIn.PublishingProfile.Settings.ConfigFileName, applicationVersionOut.PublishingProfile.Settings.ConfigFileName);
IDictionary<string, string> advancedSettingsIn = applicationVersionIn.PublishingProfile.AdvancedSettings;
IDictionary<string, string> advancedSettingsOut = applicationVersionOut.PublishingProfile.AdvancedSettings;
Assert.Equal(advancedSettingsIn.Count, advancedSettingsOut.Count);
foreach (KeyValuePair<string, string> kvp in advancedSettingsIn)
{
Assert.True(advancedSettingsOut.ContainsKey(kvp.Key));
Assert.Equal(kvp.Value, advancedSettingsOut[kvp.Key]);
}
}
}
}
Expand Down
Loading