@@ -110,14 +110,14 @@ func setupTest(t *testing.T) test.Setup {
110110 // NOTE: For new tests, please try to use a more minimal setup that focuses on the specific needs of the test.
111111 // This test setup is designed to be backwards-compatible with the old start-data.sql fixture.
112112
113- srvInfoShared := test .DefaultLiquidServiceInfo ()
113+ srvInfoShared := test .DefaultLiquidServiceInfo ("Shared" )
114114 srvInfoShared .Rates = map [liquid.RateName ]liquid.RateInfo {
115115 "service/shared/objects:create" : {Topology : liquid .FlatTopology , HasUsage : true },
116116 "service/shared/objects:delete" : {Unit : liquid .UnitMebibytes , Topology : liquid .FlatTopology , HasUsage : true },
117117 "service/shared/objects:update" : {Topology : liquid .FlatTopology , HasUsage : true },
118118 "service/shared/objects:unlimited" : {Unit : liquid .UnitKibibytes , Topology : liquid .FlatTopology , HasUsage : true },
119119 }
120- srvInfoUnshared := test .DefaultLiquidServiceInfo ()
120+ srvInfoUnshared := test .DefaultLiquidServiceInfo ("Unshared" )
121121 srvInfoUnshared .Rates = map [liquid.RateName ]liquid.RateInfo {
122122 "service/unshared/instances:create" : {Topology : liquid .FlatTopology , HasUsage : true },
123123 "service/unshared/instances:delete" : {Topology : liquid .FlatTopology , HasUsage : true },
@@ -329,8 +329,8 @@ func Test_ScrapeErrorOperations(t *testing.T) {
329329 "unshared": {"area": "unshared"}
330330 }
331331 }` ),
332- test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ()),
333- test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ()),
332+ test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ("Shared" )),
333+ test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ("Unshared" )),
334334 test .WithInitialDiscovery ,
335335 test .WithEmptyRecordsAsNeeded ,
336336 )
@@ -917,7 +917,7 @@ func Test_EmptyProjectList(t *testing.T) {
917917 "first": {"area": "first"}
918918 }
919919 }` ),
920- test .WithPersistedServiceInfo ("first" , test .DefaultLiquidServiceInfo ()),
920+ test .WithPersistedServiceInfo ("first" , test .DefaultLiquidServiceInfo ("First" )),
921921 test .WithInitialDiscovery ,
922922 test .WithEmptyRecordsAsNeeded ,
923923 )
@@ -973,8 +973,8 @@ func Test_LargeProjectList(t *testing.T) {
973973
974974 s := test .NewSetup (t ,
975975 test .WithConfig (configStr ),
976- test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ()),
977- test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ()),
976+ test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ("Shared" )),
977+ test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ("Unshared" )),
978978 test .WithInitialDiscovery ,
979979 test .WithEmptyRecordsAsNeeded ,
980980 )
@@ -1098,7 +1098,7 @@ func Test_PutMaxQuotaOnProject(t *testing.T) {
10981098 "shared": {"area": "shared"}
10991099 }
11001100 }` ),
1101- test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ()),
1101+ test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ("Shared" )),
11021102 test .WithInitialDiscovery ,
11031103 test .WithEmptyRecordsAsNeeded ,
11041104 )
@@ -1230,8 +1230,8 @@ func Test_PutQuotaAutogrowth(t *testing.T) {
12301230 "unshared": {"area": "unshared"}
12311231 }
12321232 }` ),
1233- test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ()),
1234- test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ()),
1233+ test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ("Shared" )),
1234+ test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ("Unshared" )),
12351235 test .WithInitialDiscovery ,
12361236 test .WithEmptyRecordsAsNeeded ,
12371237 )
@@ -1406,8 +1406,8 @@ func TestResourceRenaming(t *testing.T) {
14061406 }
14071407 }
14081408 }` ),
1409- test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ()),
1410- test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ()),
1409+ test .WithPersistedServiceInfo ("shared" , test .DefaultLiquidServiceInfo ("Shared" )),
1410+ test .WithPersistedServiceInfo ("unshared" , test .DefaultLiquidServiceInfo ("Unshared" )),
14111411 test .WithInitialDiscovery ,
14121412 test .WithEmptyRecordsAsNeeded ,
14131413 )
@@ -1654,12 +1654,20 @@ const testAZSeparatedConfigJSON = `{
16541654
16551655func Test_SeparatedTopologyOperations (t * testing.T ) {
16561656 srvInfo := liquid.ServiceInfo {
1657- Version : 1 ,
1657+ Version : 1 ,
1658+ DisplayName : "Shared" ,
1659+ Categories : map [liquid.CategoryName ]liquid.CategoryInfo {
1660+ "foo_category" : {
1661+ DisplayName : "Foo Category" ,
1662+ },
1663+ },
16581664 Resources : map [liquid.ResourceName ]liquid.ResourceInfo {
16591665 "capacity_az_separated" : {
1660- Unit : liquid .UnitBytes ,
1661- Topology : liquid .AZSeparatedTopology ,
1662- HasQuota : true ,
1666+ DisplayName : "Capacity AZ Separated" ,
1667+ Category : Some (liquid .CategoryName ("foo_category" )),
1668+ Unit : liquid .UnitBytes ,
1669+ Topology : liquid .AZSeparatedTopology ,
1670+ HasQuota : true ,
16631671 },
16641672 },
16651673 }
0 commit comments