@@ -57,6 +57,7 @@ func TestStateToBundleEmptyLocalResources(t *testing.T) {
5757 "resources.postgres_synced_tables.test_postgres_synced_table" : {ID : "synced_tables/main.public.test_synced_table" },
5858 "resources.vector_search_endpoints.test_vector_search_endpoint" : {ID : "vs-endpoint-1" },
5959 "resources.vector_search_indexes.test_vector_search_index" : {ID : "vs-index-1" },
60+ "resources.instance_pools.test_instance_pool" : {ID : "1" },
6061 }
6162 err := StateToBundle (t .Context (), state , & config )
6263 assert .NoError (t , err )
@@ -149,6 +150,9 @@ func TestStateToBundleEmptyLocalResources(t *testing.T) {
149150 assert .Equal (t , "vs-index-1" , config .Resources .VectorSearchIndexes ["test_vector_search_index" ].ID )
150151 assert .Equal (t , resources .ModifiedStatusDeleted , config .Resources .VectorSearchIndexes ["test_vector_search_index" ].ModifiedStatus )
151152
153+ assert .Equal (t , "1" , config .Resources .InstancePools ["test_instance_pool" ].ID )
154+ assert .Equal (t , resources .ModifiedStatusDeleted , config .Resources .InstancePools ["test_instance_pool" ].ModifiedStatus )
155+
152156 AssertFullResourceCoverage (t , & config )
153157}
154158
@@ -378,6 +382,13 @@ func TestStateToBundleEmptyRemoteResources(t *testing.T) {
378382 },
379383 },
380384 },
385+ InstancePools : map [string ]* resources.InstancePool {
386+ "test_instance_pool" : {
387+ CreateInstancePool : compute.CreateInstancePool {
388+ InstancePoolName : "test_instance_pool" ,
389+ },
390+ },
391+ },
381392 },
382393 }
383394
@@ -477,6 +488,9 @@ func TestStateToBundleEmptyRemoteResources(t *testing.T) {
477488 assert .Empty (t , config .Resources .VectorSearchIndexes ["test_vector_search_index" ].ID )
478489 assert .Equal (t , resources .ModifiedStatusCreated , config .Resources .VectorSearchIndexes ["test_vector_search_index" ].ModifiedStatus )
479490
491+ assert .Empty (t , config .Resources .InstancePools ["test_instance_pool" ].ID )
492+ assert .Equal (t , resources .ModifiedStatusCreated , config .Resources .InstancePools ["test_instance_pool" ].ModifiedStatus )
493+
480494 AssertFullResourceCoverage (t , & config )
481495}
482496
@@ -856,6 +870,18 @@ func TestStateToBundleModifiedResources(t *testing.T) {
856870 },
857871 },
858872 },
873+ InstancePools : map [string ]* resources.InstancePool {
874+ "test_instance_pool" : {
875+ CreateInstancePool : compute.CreateInstancePool {
876+ InstancePoolName : "test_instance_pool" ,
877+ },
878+ },
879+ "test_instance_pool_new" : {
880+ CreateInstancePool : compute.CreateInstancePool {
881+ InstancePoolName : "test_instance_pool_new" ,
882+ },
883+ },
884+ },
859885 },
860886 }
861887 state := ExportedResourcesMap {
@@ -913,6 +939,8 @@ func TestStateToBundleModifiedResources(t *testing.T) {
913939 "resources.vector_search_endpoints.test_vector_search_endpoint_old" : {ID : "vs-endpoint-old" },
914940 "resources.vector_search_indexes.test_vector_search_index" : {ID : "vs-index-1" },
915941 "resources.vector_search_indexes.test_vector_search_index_old" : {ID : "vs-index-old" },
942+ "resources.instance_pools.test_instance_pool" : {ID : "1" },
943+ "resources.instance_pools.test_instance_pool_old" : {ID : "2" },
916944 }
917945 err := StateToBundle (t .Context (), state , & config )
918946 assert .NoError (t , err )
@@ -1108,6 +1136,13 @@ func TestStateToBundleModifiedResources(t *testing.T) {
11081136 assert .Empty (t , config .Resources .VectorSearchIndexes ["test_vector_search_index_new" ].ID )
11091137 assert .Equal (t , resources .ModifiedStatusCreated , config .Resources .VectorSearchIndexes ["test_vector_search_index_new" ].ModifiedStatus )
11101138
1139+ assert .Equal (t , "1" , config .Resources .InstancePools ["test_instance_pool" ].ID )
1140+ assert .Empty (t , config .Resources .InstancePools ["test_instance_pool" ].ModifiedStatus )
1141+ assert .Equal (t , "2" , config .Resources .InstancePools ["test_instance_pool_old" ].ID )
1142+ assert .Equal (t , resources .ModifiedStatusDeleted , config .Resources .InstancePools ["test_instance_pool_old" ].ModifiedStatus )
1143+ assert .Empty (t , config .Resources .InstancePools ["test_instance_pool_new" ].ID )
1144+ assert .Equal (t , resources .ModifiedStatusCreated , config .Resources .InstancePools ["test_instance_pool_new" ].ModifiedStatus )
1145+
11111146 AssertFullResourceCoverage (t , & config )
11121147}
11131148
0 commit comments