< Summary

Class:Microsoft.Azure.Management.Search.Tests.SearchServiceTests
Assembly:Search.Management.Tests
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Management.Search\tests\Tests\SearchServiceTests.cs
Covered lines:0
Uncovered lines:410
Coverable lines:410
Total lines:574
Line coverage:0% (0 of 410)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
CanListServices()-0%100%
CanListServicesBySubscription()-0%100%
CanCreateAndDeleteService()-0%100%
CanCreateAndGetService()-0%100%
DeleteServiceIsIdempotent()-0%100%
CheckNameAvailabilitySucceedsOnNewName()-0%100%
CheckNameAvailabilityFailsOnUsedName()-0%100%
CheckNameAvailabilityFailsOnInvalidName()-0%100%
CanCreateBasicService()-0%100%
CanCreateStandardService()-0%100%
CanCreateStandard2Service()-0%100%
CanCreateStandard3Service()-0%100%
CanCreateStandard3HighDensityService()-0%100%
CanCreateStorageOptimizedL1Service()-0%100%
CanCreateStorageOptimizedL2Service()-0%100%
CanScaleServiceUpAndDown()-0%100%
CreateStandardServicePollsAutomatically()-0%100%
CanUpdateTags()-0%100%
UpdatingImmutablePropertiesThrowsCloudException()-0%100%
CreateServiceWithInvalidNameGivesUsefulMessage()-0%100%
UpdateServiceWithInvalidNameGivesNotFound()-0%100%
CanCreateServiceWithIdentity()-0%100%
CanAddAndRemoveServiceIdentity()-0%100%
CannotCreateOrUpdateFreeServiceWithIdentity()-0%100%
CanCreateServiceInPrivateMode()-0%100%
AssertServicesEqual(...)-0%100%
DefineServiceWithSku(...)-0%100%
DefineServiceWithSkuInPrivateMode(...)-0%100%
CreateServiceForSku(...)-0%100%
CreateServiceForSkuWithDefinitionTemplate(...)-0%100%
CreateFreeService(...)-0%100%
TestCreateService(...)-0%100%
WaitForProvisioningToComplete(...)-0%0%
TestCreateServiceForSku(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Management.Search\tests\Tests\SearchServiceTests.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for
 3// license information.
 4
 5namespace Microsoft.Azure.Management.Search.Tests
 6{
 7    using System;
 8    using System.Collections.Generic;
 9    using System.Linq;
 10    using System.Net;
 11    using Microsoft.Azure.Management.Search.Models;
 12    using Microsoft.Azure.Search.Tests.Utilities;
 13    using Rest.Azure;
 14    using Xunit;
 15
 16    public sealed class SearchServiceTests : SearchTestBase<ResourceGroupFixture>
 17    {
 18        private const string InvalidServiceName = "----badname";
 19
 20        [Fact]
 21        public void CanListServices()
 22        {
 023            Run(() =>
 024            {
 025                SearchManagementClient searchMgmt = GetSearchManagementClient();
 026
 027                SearchService service1 = CreateFreeService(searchMgmt);
 028                SearchService service2 = CreateFreeService(searchMgmt);
 029
 030                var services = searchMgmt.Services.ListByResourceGroup(Data.ResourceGroupName);
 031                Assert.NotNull(services);
 032                Assert.Equal(2, services.Count());
 033                Assert.Contains(service1.Name, services.Select(s => s.Name));
 034                Assert.Contains(service2.Name, services.Select(s => s.Name));
 035            });
 036        }
 37
 38        [Fact]
 39        public void CanListServicesBySubscription()
 40        {
 041            Run(() =>
 042            {
 043                SearchManagementClient searchMgmt = GetSearchManagementClient();
 044                SearchService service1 = CreateFreeService(searchMgmt);
 045                SearchService service2 = CreateFreeService(searchMgmt);
 046
 047                var services = searchMgmt.Services.ListBySubscription();
 048                Assert.NotNull(services);
 049                Assert.Equal(2, services.Count());
 050                Assert.Contains(service1.Name, services.Select(s => s.Name));
 051                Assert.Contains(service2.Name, services.Select(s => s.Name));
 052            });
 053        }
 54
 55        [Fact]
 56        public void CanCreateAndDeleteService()
 57        {
 058            Run(() =>
 059            {
 060                SearchManagementClient searchMgmt = GetSearchManagementClient();
 061                SearchService service = CreateFreeService(searchMgmt);
 062
 063                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 064
 065                Assert.Empty(searchMgmt.Services.ListByResourceGroup(Data.ResourceGroupName));
 066            });
 067        }
 68
 69        [Fact]
 70        public void CanCreateAndGetService()
 71        {
 072            Run(() =>
 073            {
 074                SearchManagementClient searchMgmt = GetSearchManagementClient();
 075                SearchService originalService = CreateFreeService(searchMgmt);
 076
 077                SearchService service = searchMgmt.Services.Get(Data.ResourceGroupName, originalService.Name);
 078
 079                AssertServicesEqual(originalService, service);
 080            });
 081        }
 82
 83        [Fact]
 84        public void DeleteServiceIsIdempotent()
 85        {
 086            Run(() =>
 087            {
 088                SearchManagementClient searchMgmt = GetSearchManagementClient();
 089                SearchService service = CreateFreeService(searchMgmt);
 090
 091                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 092                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 093            });
 094        }
 95
 96        [Fact]
 97        public void CheckNameAvailabilitySucceedsOnNewName()
 98        {
 099            Run(() =>
 0100            {
 0101                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0102
 0103                CheckNameAvailabilityOutput result = searchMgmt.Services.CheckNameAvailability("newservice");
 0104
 0105                Assert.Null(result.Message);
 0106                Assert.Null(result.Reason);
 0107                Assert.True(result.IsNameAvailable);
 0108            });
 0109        }
 110
 111        [Fact]
 112        public void CheckNameAvailabilityFailsOnUsedName()
 113        {
 0114            Run(() =>
 0115            {
 0116                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0117                SearchService service = CreateFreeService(searchMgmt);
 0118
 0119                CheckNameAvailabilityOutput result = searchMgmt.Services.CheckNameAvailability(service.Name);
 0120
 0121                Assert.Null(result.Message);
 0122                Assert.Equal(UnavailableNameReason.AlreadyExists, result.Reason);
 0123                Assert.False(result.IsNameAvailable);
 0124            });
 0125        }
 126
 127        [Fact]
 128        public void CheckNameAvailabilityFailsOnInvalidName()
 129        {
 0130            Run(() =>
 0131            {
 0132                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0133
 0134                CheckNameAvailabilityOutput result =
 0135                    searchMgmt.Services.CheckNameAvailability(InvalidServiceName);
 0136
 0137                Assert.False(string.IsNullOrEmpty(result.Message));
 0138                Assert.Equal(UnavailableNameReason.Invalid, result.Reason);
 0139                Assert.False(result.IsNameAvailable);
 0140            });
 0141        }
 142
 143        [Fact]
 144        public void CanCreateBasicService()
 145        {
 0146            Run(() => TestCreateServiceForSku(SkuName.Basic));
 0147        }
 148
 149        [Fact]
 150        public void CanCreateStandardService()
 151        {
 0152            Run(() => TestCreateServiceForSku(SkuName.Standard));
 0153        }
 154
 155        [Fact]
 156        public void CanCreateStandard2Service()
 157        {
 0158            Run(() => TestCreateServiceForSku(SkuName.Standard2));
 0159        }
 160
 161        [Fact]
 162        public void CanCreateStandard3Service()
 163        {
 0164            Run(() =>
 0165            {
 0166                SearchService service = DefineServiceWithSku(SkuName.Standard3);
 0167                service.HostingMode = HostingMode.Default;
 0168
 0169                TestCreateService(service);
 0170            });
 0171        }
 172
 173        [Fact]
 174        public void CanCreateStandard3HighDensityService()
 175        {
 0176            Run(() =>
 0177            {
 0178                SearchService service = DefineServiceWithSku(SkuName.Standard3);
 0179                service.HostingMode = HostingMode.HighDensity;
 0180
 0181                TestCreateService(service);
 0182            });
 0183        }
 184
 185        [Fact]
 186        public void CanCreateStorageOptimizedL1Service()
 187        {
 0188            Run(() => TestCreateServiceForSku(SkuName.StorageOptimizedL1));
 0189        }
 190
 191        [Fact]
 192        public void CanCreateStorageOptimizedL2Service()
 193        {
 0194            Run(() => TestCreateServiceForSku(SkuName.StorageOptimizedL2));
 0195        }
 196
 197        [Fact]
 198        public void CanScaleServiceUpAndDown()
 199        {
 0200            Run(() =>
 0201            {
 0202                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0203                SearchService service = CreateServiceForSku(searchMgmt, SkuName.Standard);
 0204
 0205                WaitForProvisioningToComplete(searchMgmt, service);
 0206
 0207                // Scale up to 2 replicas x 2 partitions.
 0208                service =
 0209                    searchMgmt.Services.Update(
 0210                        Data.ResourceGroupName,
 0211                        service.Name,
 0212                        new SearchService() { ReplicaCount = 2, PartitionCount = 2 });
 0213
 0214                service = WaitForProvisioningToComplete(searchMgmt, service);
 0215                Assert.Equal(2, service.ReplicaCount);
 0216                Assert.Equal(2, service.PartitionCount);
 0217
 0218                // Scale back down to 1 replica x 1 partition.
 0219                service =
 0220                    searchMgmt.Services.Update(
 0221                        Data.ResourceGroupName,
 0222                        service.Name,
 0223                        new SearchService() { ReplicaCount = 1, PartitionCount = 1 });
 0224
 0225                service = WaitForProvisioningToComplete(searchMgmt, service);
 0226                Assert.Equal(1, service.ReplicaCount);
 0227                Assert.Equal(1, service.PartitionCount);
 0228
 0229                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 0230            });
 0231        }
 232
 233        [Fact]
 234        public void CreateStandardServicePollsAutomatically()
 235        {
 0236            Run(() =>
 0237            {
 0238                // Create an S1 with multiple replicas so that the operation will take some time.
 0239                SearchService service = DefineServiceWithSku(SkuName.Standard);
 0240                service.ReplicaCount = 2;
 0241
 0242                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0243                string serviceName = SearchTestUtilities.GenerateServiceName();
 0244
 0245                service = searchMgmt.Services.CreateOrUpdate(Data.ResourceGroupName, serviceName, service);
 0246
 0247                // Unlike BeginCreateOrUpdate, CreateOrUpdate should have already polled until
 0248                // provisioning is complete.
 0249                Assert.Equal(Models.ProvisioningState.Succeeded, service.ProvisioningState);
 0250                Assert.Equal(SearchServiceStatus.Running, service.Status);
 0251
 0252                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 0253            });
 0254        }
 255
 256        [Fact]
 257        public void CanUpdateTags()
 258        {
 0259            Run(() =>
 0260            {
 0261                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0262                SearchService service = CreateFreeService(searchMgmt);
 0263
 0264                var testTags =
 0265                    new Dictionary<string, string>()
 0266                    {
 0267                        ["testTag"] = "testValue",
 0268                        ["anotherTag"] = "anotherValue"
 0269                    };
 0270
 0271                // Add some tags.
 0272                service =
 0273                    searchMgmt.Services.Update(
 0274                        Data.ResourceGroupName,
 0275                        service.Name,
 0276                        new SearchService() { Tags = testTags });
 0277
 0278                Assert.Equal(testTags, service.Tags);
 0279
 0280                // Modify a tag.
 0281                testTags["anotherTag"] = "differentValue";
 0282
 0283                service =
 0284                    searchMgmt.Services.Update(
 0285                        Data.ResourceGroupName,
 0286                        service.Name,
 0287                        new SearchService() { Tags = testTags });
 0288
 0289                Assert.Equal(testTags, service.Tags);
 0290
 0291                // Remove the second tag.
 0292                testTags.Remove("anotherTag");
 0293
 0294                service =
 0295                    searchMgmt.Services.Update(
 0296                        Data.ResourceGroupName,
 0297                        service.Name,
 0298                        new SearchService() { Tags = testTags });
 0299
 0300                Assert.Equal(testTags, service.Tags);
 0301            });
 0302        }
 303
 304        [Fact]
 305        public void UpdatingImmutablePropertiesThrowsCloudException()
 306        {
 0307            Run(() =>
 0308            {
 0309                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0310                SearchService service = CreateFreeService(searchMgmt);
 0311
 0312                CloudException e =
 0313                    Assert.Throws<CloudException>(() =>
 0314                        searchMgmt.Services.Update(
 0315                            Data.ResourceGroupName,
 0316                            service.Name,
 0317                            new SearchService() { HostingMode = HostingMode.HighDensity }));
 0318
 0319                Assert.Equal("Updating HostingMode of an existing search service is not allowed.", e.Message);
 0320
 0321                // There is currently a validation bug in the Azure Search management API, so we can't
 0322                // test for an exception yet. Instead, just make sure the location doesn't actually change.
 0323                SearchService updatedService =
 0324                    searchMgmt.Services.Update(
 0325                        Data.ResourceGroupName,
 0326                        service.Name,
 0327                        new SearchService() { Location = "East US" });  // We run live tests in West US.
 0328
 0329                Assert.Equal(service.Location, updatedService.Location);
 0330
 0331                /*e =
 0332                    Assert.Throws<CloudException>(() =>
 0333                        searchMgmt.Services.Update(
 0334                            Data.ResourceGroupName,
 0335                            service.Name,
 0336                            new SearchService() { Location = "East US" }));  // We run live tests in West US.
 0337
 0338                    Assert.Equal("Updating Location of an existing search service is not allowed.", e.Message);*/
 0339
 0340                e =
 0341                    Assert.Throws<CloudException>(() =>
 0342                        searchMgmt.Services.Update(
 0343                            Data.ResourceGroupName,
 0344                            service.Name,
 0345                            new SearchService() { Sku = new Sku(SkuName.Basic) }));
 0346
 0347                Assert.Equal("Updating Sku of an existing search service is not allowed.", e.Message);
 0348            });
 0349        }
 350
 351        [Fact]
 352        public void CreateServiceWithInvalidNameGivesUsefulMessage()
 353        {
 0354            Run(() =>
 0355            {
 0356                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0357                SearchService service = DefineServiceWithSku(SkuName.Free);
 0358
 0359                CloudException e =
 0360                    Assert.Throws<CloudException>(() =>
 0361                        searchMgmt.Services.CreateOrUpdate(Data.ResourceGroupName, InvalidServiceName, service));
 0362
 0363                string expectedMessage =
 0364                    $"Service name '{InvalidServiceName}' is invalid: Service name must only contain " +
 0365                    "lowercase letters, digits or dashes, cannot start or end with or contain consecutive " +
 0366                    "dashes and is limited to 60 characters.";
 0367
 0368                Assert.Equal(expectedMessage, e.Message);
 0369            });
 0370        }
 371
 372        [Fact]
 373        public void UpdateServiceWithInvalidNameGivesNotFound()
 374        {
 0375            Run(() =>
 0376            {
 0377                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0378
 0379                CloudException e =
 0380                    Assert.Throws<CloudException>(() =>
 0381                        searchMgmt.Services.Update(Data.ResourceGroupName, "missing", new SearchService()));
 0382
 0383                Assert.Equal(HttpStatusCode.NotFound, e.Response.StatusCode);
 0384            });
 0385        }
 386
 387        [Fact]
 388        public void CanCreateServiceWithIdentity()
 389        {
 0390            Run(() =>
 0391            {
 0392                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0393                string serviceName = SearchTestUtilities.GenerateServiceName();
 0394                SearchService service = DefineServiceWithSku(SkuName.Basic);
 0395                service.Identity = new Identity(IdentityType.SystemAssigned);
 0396                service = searchMgmt.Services.CreateOrUpdate(Data.ResourceGroupName, serviceName, service);
 0397                Assert.NotNull(service);
 0398                Assert.NotNull(service.Identity);
 0399                Assert.Equal(IdentityType.SystemAssigned, service.Identity.Type);
 0400
 0401                string principalId = string.IsNullOrWhiteSpace(service.Identity.PrincipalId) ? null : service.Identity.P
 0402                Assert.NotNull(principalId);
 0403
 0404                string tenantId = string.IsNullOrWhiteSpace(service.Identity.TenantId) ? null : service.Identity.TenantI
 0405                Assert.NotNull(tenantId);
 0406
 0407                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 0408            });
 0409        }
 410
 411        [Fact]
 412        public void CanAddAndRemoveServiceIdentity()
 413        {
 0414            Run(() =>
 0415            {
 0416                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0417                string serviceName = SearchTestUtilities.GenerateServiceName();
 0418                SearchService service = DefineServiceWithSku(SkuName.Basic);
 0419                service.Identity = null;
 0420                service = searchMgmt.Services.CreateOrUpdate(Data.ResourceGroupName, serviceName, service);
 0421                Assert.NotNull(service);
 0422                Assert.Equal(IdentityType.None, service.Identity?.Type ?? IdentityType.None);
 0423
 0424                // assign an identity of type 'SystemAssigned'
 0425                service.Identity = new Identity(IdentityType.SystemAssigned);
 0426                service = searchMgmt.Services.Update(Data.ResourceGroupName, service.Name, service);
 0427                Assert.NotNull(service);
 0428                Assert.NotNull(service.Identity);
 0429                Assert.Equal(IdentityType.SystemAssigned, service.Identity.Type);
 0430
 0431                string principalId = string.IsNullOrWhiteSpace(service.Identity.PrincipalId) ? null : service.Identity.P
 0432                Assert.NotNull(principalId);
 0433
 0434                string tenantId = string.IsNullOrWhiteSpace(service.Identity.TenantId) ? null : service.Identity.TenantI
 0435                Assert.NotNull(tenantId);
 0436
 0437                // remove the identity by setting it's type to 'None'
 0438                service.Identity.Type = IdentityType.None;
 0439                service = searchMgmt.Services.Update(Data.ResourceGroupName, service.Name, service);
 0440                Assert.NotNull(service);
 0441                Assert.Equal(IdentityType.None, service.Identity?.Type ?? IdentityType.None);
 0442
 0443                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 0444            });
 0445        }
 446
 447        [Fact]
 448        public void CannotCreateOrUpdateFreeServiceWithIdentity()
 449        {
 0450            Run(() =>
 0451            {
 0452                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0453
 0454                string serviceName = SearchTestUtilities.GenerateServiceName();
 0455                SearchService service = DefineServiceWithSku(SkuName.Free);
 0456                service.Identity = new Identity(IdentityType.SystemAssigned);
 0457
 0458                CloudException e = Assert.Throws<CloudException>(() =>
 0459                    searchMgmt.Services.CreateOrUpdate(Data.ResourceGroupName, serviceName, service));
 0460
 0461                Assert.Equal("Resource identity is not supported for the selected SKU", e.Message);
 0462
 0463                // retry create without identity
 0464                service.Identity = null;
 0465                service = searchMgmt.Services.CreateOrUpdate(Data.ResourceGroupName, serviceName, service);
 0466                Assert.NotNull(service);
 0467                Assert.Null(service.Identity);
 0468
 0469                // try update the created service by defining an identity
 0470                service.Identity = new Identity();
 0471                e = Assert.Throws<CloudException>(() =>
 0472                    searchMgmt.Services.Update(Data.ResourceGroupName, service.Name, service));
 0473
 0474                Assert.Equal("Resource identity is not supported for the selected SKU", e.Message);
 0475                searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 0476            });
 0477        }
 478
 479        [Fact]
 480        public void CanCreateServiceInPrivateMode()
 481        {
 0482            Run(() =>
 0483            {
 0484                SearchManagementClient searchMgmt = GetSearchManagementClient();
 0485                CreateServiceForSkuWithDefinitionTemplate(searchMgmt, SkuName.Basic, DefineServiceWithSkuInPrivateMode);
 0486            });
 0487        }
 488
 489        private static void AssertServicesEqual(SearchService a, SearchService b) =>
 0490            Assert.Equal(a, b, new ModelComparer<SearchService>());
 491
 492        private SearchService DefineServiceWithSku(SkuName sku)
 493        {
 0494            return new SearchService()
 0495            {
 0496                Location = "EastUS",
 0497                Sku = new Sku() { Name = sku },
 0498                ReplicaCount = 1,
 0499                PartitionCount = 1
 0500            };
 501        }
 502
 503        private SearchService DefineServiceWithSkuInPrivateMode(SkuName sku)
 504        {
 0505            return new SearchService()
 0506            {
 0507                Location = "EastUS",
 0508                Sku = new Sku() { Name = sku },
 0509                ReplicaCount = 1,
 0510                PartitionCount = 1,
 0511                PublicNetworkAccess = PublicNetworkAccess.Disabled
 0512            };
 513        }
 514
 515        private SearchService CreateServiceForSku(SearchManagementClient searchMgmt, SkuName sku)
 516        {
 0517            string serviceName = SearchTestUtilities.GenerateServiceName();
 518
 0519            SearchService service = DefineServiceWithSku(sku);
 520
 0521            service = searchMgmt.Services.BeginCreateOrUpdate(Data.ResourceGroupName, serviceName, service);
 0522            Assert.NotNull(service);
 523
 0524            return service;
 525        }
 526
 527        private delegate SearchService SearchServiceDefinition(SkuName sku);
 528
 529        private SearchService CreateServiceForSkuWithDefinitionTemplate(SearchManagementClient searchMgmt, SkuName sku, 
 530        {
 0531            string serviceName = SearchTestUtilities.GenerateServiceName();
 532
 0533            SearchService service = searchServiceDefinition(sku);
 534
 0535            service = searchMgmt.Services.BeginCreateOrUpdate(Data.ResourceGroupName, serviceName, service);
 0536            Assert.NotNull(service);
 537
 0538            return service;
 539        }
 540
 541        private SearchService CreateFreeService(SearchManagementClient searchMgmt) =>
 0542            CreateServiceForSku(searchMgmt, SkuName.Free);
 543
 544        private void TestCreateService(SearchService service)
 545        {
 0546            SearchManagementClient searchMgmt = GetSearchManagementClient();
 0547            string serviceName = SearchTestUtilities.GenerateServiceName();
 548
 0549            service = searchMgmt.Services.BeginCreateOrUpdate(Data.ResourceGroupName, serviceName, service);
 0550            service = WaitForProvisioningToComplete(searchMgmt, service);
 551
 0552            searchMgmt.Services.Delete(Data.ResourceGroupName, service.Name);
 0553        }
 554
 555        private SearchService WaitForProvisioningToComplete(
 556            SearchManagementClient searchMgmt,
 557            SearchService service)
 558        {
 0559            while (service.ProvisioningState == Models.ProvisioningState.Provisioning)
 560            {
 0561                Assert.Equal(SearchServiceStatus.Provisioning, service.Status);
 562
 0563                SearchTestUtilities.WaitForServiceProvisioning();
 0564                service = searchMgmt.Services.Get(Data.ResourceGroupName, service.Name);
 565            }
 566
 0567            Assert.Equal(Models.ProvisioningState.Succeeded, service.ProvisioningState);
 0568            Assert.Equal(SearchServiceStatus.Running, service.Status);
 0569            return service;
 570        }
 571
 0572        private void TestCreateServiceForSku(SkuName sku) => TestCreateService(DefineServiceWithSku(sku));
 573    }
 574}