diff --git a/internal/provider/api/client.go b/internal/provider/api/client.go index 453822a..9d7a2e8 100644 --- a/internal/provider/api/client.go +++ b/internal/provider/api/client.go @@ -13,7 +13,7 @@ import ( ) // HostURL - Default Warpstream URL. -const HostURL string = "https://staging-a.us-east-1.warpstream.com/api/v1" // todo simon: temp +const HostURL string = "https://api.prod.us-east-1.warpstream.com/api/v1" // Client. type Client struct { diff --git a/internal/provider/virtual_cluster_data_source_test.go b/internal/provider/virtual_cluster_data_source_test.go index 2c2d5b7..122304f 100644 --- a/internal/provider/virtual_cluster_data_source_test.go +++ b/internal/provider/virtual_cluster_data_source_test.go @@ -45,6 +45,11 @@ func testAccVCDataSourceCheck_byoc(name string) resource.TestCheckFunc { resource.TestCheckResourceAttr( "data.warpstream_virtual_cluster.test", "agent_keys.0.name", "akn_virtual_cluster_default_7695dba1efaa", ), + utils.TestCheckResourceAttrEndsWith( + "data.warpstream_virtual_cluster.test", + "bootstrap_url", + ".kafka.discoveryv2.prod-z.us-east-1.warpstream.com:9092", + ), testAccVCDataSourceCheck(name), ) } diff --git a/internal/provider/virtual_cluster_resource_test.go b/internal/provider/virtual_cluster_resource_test.go index 4d41277..a781194 100644 --- a/internal/provider/virtual_cluster_resource_test.go +++ b/internal/provider/virtual_cluster_resource_test.go @@ -79,8 +79,7 @@ func testAccVirtualClusterResourceCheck_BYOC(acls bool, autoTopic bool, numParts testAccVirtualClusterResourceCheck(acls, autoTopic, numParts, "byoc"), resource.TestCheckResourceAttr("warpstream_virtual_cluster.test", "agent_keys.#", "1"), utils.TestCheckResourceAttrStartsWith("warpstream_virtual_cluster.test", "agent_keys.0.name", "akn_virtual_cluster_test_acc_"), - // todo simon: move back to prod url - utils.TestCheckResourceAttrEndsWith("warpstream_virtual_cluster.test", "bootstrap_url", ".kafka.discoveryv2.staging-a.us-east-1.warpstream.com:9092"), + utils.TestCheckResourceAttrEndsWith("warpstream_virtual_cluster.test", "bootstrap_url", ".kafka.discoveryv2.prod-z.us-east-1.warpstream.com:9092"), ) } diff --git a/internal/provider/virtual_clusters_data_source_test.go b/internal/provider/virtual_clusters_data_source_test.go index 3bec520..e7da141 100644 --- a/internal/provider/virtual_clusters_data_source_test.go +++ b/internal/provider/virtual_clusters_data_source_test.go @@ -101,6 +101,22 @@ func assertBYOCVC(vcs []map[string]string, name string) error { return fmt.Errorf("Expected agent key virtual cluster ID to be 'vci_daf191a9_47fa_4215_aa49_2e74c5ba78d9', got %s", agentKeysVCIDAttr) } + burl, ok := vc["bootstrap_url"] + + if !ok { + return fmt.Errorf("Expected byoc virtual cluster JSON to have a bootstrap URL field") + } + + expectedBurl := "api-18b7339a-6bc0-4397-a066-d3bddb4f8392.kafka.discoveryv2.prod-z.us-east-1.warpstream.com:9092" + + if burl != expectedBurl { + return fmt.Errorf( + "Expected vcn_wtf byoc cluster bootstrap URL to be %s, got %s", + expectedBurl, + vc["bootstrap_url"], + ) + } + return nil } @@ -126,6 +142,10 @@ func assertServerlessVC(vcs []map[string]string, name string) error { ) } + if _, ok := vc["bootstrap_url"]; ok { + return fmt.Errorf("Serverless virtual cluster should not have a bootstrap URL field") + } + return nil }