testacc: disable kafka service specific checks
Kafka service has no service username and password properties in API response unlike all other Aiven services
@@ -82,10 +82,17 @@ func testAccCheckAivenServiceCommonAttributes(n string) resource.TestCheckFunc {
return fmt.Errorf("expected to get a service.maintenance_window_dow from Aiven")
}
+ // Kafka service has no username and password
+ if a["service_type"] != "kafka" {
if a["service_password"] == "" {
return fmt.Errorf("expected to get a service_password from Aiven")
}
+ if a["service_username"] == "" {
+ return fmt.Errorf("expected to get a service_username from Aiven")
+ }
+ }
+
if a["service_port"] == "" {
return fmt.Errorf("expected to get a service_port from Aiven")
}
@@ -106,10 +113,6 @@ func testAccCheckAivenServiceCommonAttributes(n string) resource.TestCheckFunc {
return fmt.Errorf("expected to get a correct state from Aiven")
}
- if a["service_username"] == "" {
- return fmt.Errorf("expected to get a service_username from Aiven")
- }
-
if a["maintenance_window_time"] != "10:00:00" {
return fmt.Errorf("expected to get a service.maintenance_window_time from Aiven")
}
