From 05ae461817bc981b4c09a010eecd48e8b3010a20 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Tue, 10 Feb 2026 14:21:04 +0100 Subject: [PATCH] fix: fix lintings --- .../postgresflex_acc_test.go | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go b/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go index 2978b6d5..afafbb89 100644 --- a/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go +++ b/stackit/internal/services/postgresflexalpha/postgresflex_acc_test.go @@ -76,12 +76,12 @@ func TestMain(m *testing.M) { os.Exit(code) } -var ( - validFlavor = "2.4" - kekKeyRingId = "" - kekKeyVersion = "" - kekKeySA = "" -) +//var ( +// validFlavor = "2.4" +// kekKeyRingId = "" +// kekKeyVersion = "" +// kekKeySA = "" +//) func testAccPreCheck(t *testing.T) { // TODO: if needed ... @@ -202,63 +202,63 @@ resource "stackitprivatepreview_postgresflexalpha_instance" "test" { ) } -func testAccResourceEncryptionExampleConfig(data resData) string { - return fmt.Sprintf(` +//func testAccResourceEncryptionExampleConfig(data resData) string { +// return fmt.Sprintf(` +// +//%[1]s +// +//resource "stackitprivatepreview_postgresflexalpha_instance" "test" { +// project_id = %[2]q +// name = %[3]q +// backup_schedule = "0 0 * * *" +// retention_days = 45 +// flavor_id = "2.1" +// replicas = 1 +// storage = { +// performance_class = "premium-perf2-stackit" +// size = 10 +// } +// encryption = { +// kek_key_id = "key01" +// kek_key_ring_id = "key_ring_01" +// kek_key_version = 1 +// service_account = "service@account.email" +// } +// network = { +// acl = ["0.0.0.0/0"] +// access_scope = "PUBLIC" +// } +// version = 14 +//} +// +//`, +// testutil.PostgresFlexProviderConfig(data.ServiceAccountFilePath), +// data.ProjectID, +// data.Name, +// ) +//} -%[1]s - -resource "stackitprivatepreview_postgresflexalpha_instance" "test" { - project_id = %[2]q - name = %[3]q - backup_schedule = "0 0 * * *" - retention_days = 45 - flavor_id = "2.1" - replicas = 1 - storage = { - performance_class = "premium-perf2-stackit" - size = 10 - } - encryption = { - kek_key_id = "key01" - kek_key_ring_id = "key_ring_01" - kek_key_version = 1 - service_account = "service@account.email" - } - network = { - acl = ["0.0.0.0/0"] - access_scope = "PUBLIC" - } - version = 14 -} - -`, - testutil.PostgresFlexProviderConfig(data.ServiceAccountFilePath), - data.ProjectID, - data.Name, - ) -} - -func testCheckResourceExists(resourceName string) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[resourceName] - if !ok { - return fmt.Errorf("resource not found: %s", resourceName) - } - - if rs.Primary.ID == "" { - return fmt.Errorf("resource ID not set") - } - - // Verify resource exists in the API - //client := testAccProvider.Meta().(*APIClient) - //_, err := client.GetResource(rs.Primary.ID) - //if err != nil { - // return fmt.Errorf("error fetching resource: %w", err) - //} - - return nil - } -} +//func testCheckResourceExists(resourceName string) resource.TestCheckFunc { +// return func(s *terraform.State) error { +// rs, ok := s.RootModule().Resources[resourceName] +// if !ok { +// return fmt.Errorf("resource not found: %s", resourceName) +// } +// +// if rs.Primary.ID == "" { +// return fmt.Errorf("resource ID not set") +// } +// +// // Verify resource exists in the API +// //client := testAccProvider.Meta().(*APIClient) +// //_, err := client.GetResource(rs.Primary.ID) +// //if err != nil { +// // return fmt.Errorf("error fetching resource: %w", err) +// //} +// +// return nil +// } +//} func setupMockServer() *httptest.Server { mux := http.NewServeMux()