Skip to content

Commit

Permalink
test: fix aiven_service_component race
Browse files Browse the repository at this point in the history
  • Loading branch information
byashimov committed Oct 31, 2024
1 parent 8194371 commit 5c837f7
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ func TestAccAivenServiceComponentDataSource_basic(t *testing.T) {
PreCheck: func() { acc.TestAccPreCheck(t) },
ProtoV6ProviderFactories: acc.TestProtoV6ProviderFactories,
Steps: []resource.TestStep{
//{
// Config: testAccServiceComponentKafkaAuthMethodMissingErrorMessages(rName),
// ExpectError: regexp.MustCompile("please try specifying 'kafka_authentication_method' to filter the results"),
//},
{
Config: testAccServiceComponentKafkaAuthMethodNotMatchErrorMessages(rName),
ExpectError: regexp.MustCompile("cannot find component"),
Expand Down Expand Up @@ -171,25 +167,28 @@ data "aiven_project" "foo" {
project = "%s"
}
resource "aiven_kafka" "kafka" {
project = data.aiven_project.foo.project
service_name = "test-acc-sr-%s"
cloud_name = "google-europe-west3"
plan = "startup-2"
resource "aiven_kafka" "bar" {
project = data.aiven_project.foo.project
cloud_name = "google-europe-west1"
plan = "business-4"
service_name = "test-acc-sr-%s"
maintenance_window_dow = "monday"
maintenance_window_time = "10:00:00"
kafka_user_config {
public_access {
kafka = true
}
}
}
data "aiven_service_component" "kafka" {
project = aiven_kafka.kafka.project
service_name = aiven_kafka.kafka.service_name
project = aiven_kafka.bar.project
service_name = aiven_kafka.bar.service_name
component = "kafka"
route = "dynamic"
kafka_authentication_method = "sasl"
depends_on = [aiven_kafka.kafka]
depends_on = [aiven_kafka.bar]
}`, os.Getenv("AIVEN_PROJECT_NAME"), name)
}

0 comments on commit 5c837f7

Please sign in to comment.