Skip to content

Commit

Permalink
Compute: support get gallery image version with replication status (#…
Browse files Browse the repository at this point in the history
…1000)

* Compute: support get gallery image version with replication status

* Compute: update type of exception thrown when validation fails
  • Loading branch information
xseeseesee authored Mar 12, 2020
1 parent 7b29849 commit bc4c347
Show file tree
Hide file tree
Showing 5 changed files with 2,252 additions and 1,779 deletions.
13 changes: 12 additions & 1 deletion Tests/Fluent.Tests/Compute/SharedGalleryImageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void CanCreateUpdateGetDeleteGalleryImage()
}
}

[Fact(Skip = "Service consistently fail with error 'Replication job not completed at region:XXXXX', reported to service team")]
[Fact]
public void CanCreateUpdateGetDeleteGalleryImageVersion()
{
using (var context = FluentMockContext.Start(GetType().FullName))
Expand Down Expand Up @@ -236,6 +236,16 @@ public void CanCreateUpdateGetDeleteGalleryImageVersion()
Assert.Equal(2, imageVersion.PublishingProfile.TargetRegions.Count);
Assert.False(imageVersion.IsExcludedFromLatest);

imageVersion = azure.GalleryImageVersions.GetByGalleryImage(rgName, gallery.Name, galleryImage.Name, imageVersion.Name);
Assert.NotNull(imageVersion);
Assert.Null(imageVersion.ReplicationStatus);

imageVersion = azure.GalleryImageVersions.GetByGalleryImageWithReplicationStatus(rgName, gallery.Name, galleryImage.Name, imageVersion.Name);
Assert.NotNull(imageVersion);
Assert.NotNull(imageVersion.ReplicationStatus);
Assert.NotNull(imageVersion.ReplicationStatus.AggregatedState);

/* Skip update now until service update the swagger definition for GalleryArtifactVersionSource
//
// Update image version
//
Expand All @@ -246,6 +256,7 @@ public void CanCreateUpdateGetDeleteGalleryImageVersion()
Assert.NotNull(imageVersion.PublishingProfile.TargetRegions);
Assert.Equal(1, imageVersion.PublishingProfile.TargetRegions.Count);
Assert.False(imageVersion.IsExcludedFromLatest);
*/

//
// List image versions
Expand Down
Loading

0 comments on commit bc4c347

Please sign in to comment.