From 8c7f5b3adcc01f99582d092de34c9db07e804a77 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Tue, 11 Jun 2024 15:34:02 +0200 Subject: [PATCH] chore: replace deprecated server type with cx22 (#457) Learn more: https://docs.hetzner.cloud/changelog#2024-06-06-old-server-types-with-shared-intel-vcpus-are-deprecated --- hcloud/schema_test.go | 2 +- hcloud/server_type_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hcloud/schema_test.go b/hcloud/schema_test.go index c28938e8..3ee2779e 100644 --- a/hcloud/schema_test.go +++ b/hcloud/schema_test.go @@ -600,7 +600,7 @@ func TestServerPrivateNetSchema(t *testing.T) { func TestServerTypeSchema(t *testing.T) { data := []byte(`{ "id": 1, - "name": "cx10", + "name": "cx22", "description": "description", "cores": 4, "memory": 1.0, diff --git a/hcloud/server_type_test.go b/hcloud/server_type_test.go index af60a0f9..06d327f9 100644 --- a/hcloud/server_type_test.go +++ b/hcloud/server_type_test.go @@ -77,7 +77,7 @@ func TestServerTypeClient(t *testing.T) { defer env.Teardown() env.Mux.HandleFunc("/server_types", func(w http.ResponseWriter, r *http.Request) { - if r.URL.RawQuery != "name=cx10" { + if r.URL.RawQuery != "name=cx22" { t.Fatal("missing name query") } json.NewEncoder(w).Encode(schema.ServerTypeListResponse{ @@ -90,7 +90,7 @@ func TestServerTypeClient(t *testing.T) { }) ctx := context.Background() - serverType, _, err := env.Client.ServerType.GetByName(ctx, "cx10") + serverType, _, err := env.Client.ServerType.GetByName(ctx, "cx22") if err != nil { t.Fatal(err) } @@ -102,7 +102,7 @@ func TestServerTypeClient(t *testing.T) { } t.Run("via Get", func(t *testing.T) { - serverType, _, err := env.Client.ServerType.Get(ctx, "cx10") + serverType, _, err := env.Client.ServerType.Get(ctx, "cx22") if err != nil { t.Fatal(err) } @@ -120,7 +120,7 @@ func TestServerTypeClient(t *testing.T) { defer env.Teardown() env.Mux.HandleFunc("/server_types", func(w http.ResponseWriter, r *http.Request) { - if r.URL.RawQuery != "name=cx10" { + if r.URL.RawQuery != "name=cx22" { t.Fatal("missing name query") } json.NewEncoder(w).Encode(schema.ServerTypeListResponse{ @@ -129,7 +129,7 @@ func TestServerTypeClient(t *testing.T) { }) ctx := context.Background() - serverType, _, err := env.Client.ServerType.GetByName(ctx, "cx10") + serverType, _, err := env.Client.ServerType.GetByName(ctx, "cx22") if err != nil { t.Fatal(err) }