Skip to content

Commit

Permalink
chore: replace deprecated server type with cx22 (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Jun 11, 2024
1 parent 48976b6 commit 8c7f5b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hcloud/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions hcloud/server_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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)
}
Expand All @@ -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)
}
Expand All @@ -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{
Expand All @@ -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)
}
Expand Down

0 comments on commit 8c7f5b3

Please sign in to comment.