Skip to content

Commit

Permalink
Merge branch 'main' into doc/update-struct-member-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
momer authored May 16, 2024
2 parents 325a7df + f913474 commit eae962d
Show file tree
Hide file tree
Showing 31 changed files with 329 additions and 1,201 deletions.
5 changes: 5 additions & 0 deletions bonsai/bonsai_impl_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package bonsai

func Pointer[T any](d T) *T {
return &d
}
2 changes: 1 addition & 1 deletion bonsai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
// Client representation configuration.
const (
// Version reflects this API Client's version.
Version = "v2.2.0"
Version = "v2.3.0"
// BaseEndpoint is the target API URL base location.
BaseEndpoint = "https://api.bonsai.io"
// UserAgent is the internally used value for the AccessKey-Agent header
Expand Down
2 changes: 1 addition & 1 deletion bonsai/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (s *ClientVCRTestSuite) SetupSuite() {
bonsai.WithApplication(
bonsai.Application{
Name: "bonsai-api-go",
Version: "v2.2.0",
Version: "v2.3.0",
},
),
bonsai.WithCredentialPair(
Expand Down
4 changes: 2 additions & 2 deletions bonsai/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func (s *ClientVCRTestSuite) TestClusterClient_Create() {
func (s *ClientVCRTestSuite) TestClusterClient_Update() {
ctx := context.Background()

plan, err := s.client.Cluster.Update(ctx, "bonsai-api-go-2471463249", bonsai.ClusterUpdateOpts{
plan, err := s.client.Cluster.Update(ctx, "bonsai-api-go-5431547241", bonsai.ClusterUpdateOpts{
Name: "bonsai-api-go-test-cluster-updated",
Plan: "standard-nano-comped",
})
Expand All @@ -504,7 +504,7 @@ func (s *ClientVCRTestSuite) TestClusterClient_Update() {
func (s *ClientVCRTestSuite) TestClusterClient_Delete() {
ctx := context.Background()

plan, err := s.client.Cluster.Destroy(ctx, "bonsai-api-go-9994392953")
plan, err := s.client.Cluster.Destroy(ctx, "bonsai-api-go-5431547241")
s.NoError(err, "successfully get cluster")
assertGolden(s, plan)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
[
{
"slug": "bonsai-api-go-3216591042",
"name": "bonsai-api-go-test-cluster-updated",
"uri": "https://api.bonsai.io/clusters/bonsai-api-go-3216591042",
"plan": {
"slug": "standard-nano-comped",
"available_releases": [],
"available_spaces": [],
"uri": "https://api.bonsai.io/plans/standard-nano-comped"
},
"release": {
"slug": "opensearch-2.6.0-mt",
"service_type": "opensearch",
"version": "2.6.0",
"uri": "https://api.bonsai.io/releases/opensearch-2.6.0-mt",
"package_name": "2.6.0-mt"
},
"space": {
"path": "omc/bonsai/us-east-1/common",
"region": "aws-us-east-1",
"uri": "https://api.bonsai.io/spaces/omc/bonsai/us-east-1/common"
},
"stats": {},
"access": {
"host": "bonsai-api-go-3216591042.us-east-1.bonsaisearch.net",
"port": 443,
"scheme": "https"
},
"state": "PROVISIONED"
},
{
"slug": "dcek-group-llc-5240651189",
"name": "DCEK Group, LLC search",
Expand All @@ -18,11 +48,6 @@
},
"space": {
"path": "omc/bonsai/us-east-1/common",
"private_network": false,
"cloud": {
"provider": "",
"region": ""
},
"region": "aws-us-east-1",
"uri": "https://api.bonsai.io/spaces/omc/bonsai/us-east-1/common"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"message": "Your cluster is being provisioned.",
"monitor": "https://api.bonsai.io/clusters/bonsai-api-go-2471463249",
"monitor": "https://api.bonsai.io/clusters/bonsai-api-go-5431547241",
"access": {
"host": "bonsai-api-go-2471463249",
"host": "bonsai-api-go-5431547241",
"port": 443,
"scheme": "https",
"user": "REDACTED",
"pass": "REDACTED",
"url": "://REDACTED:REDACTED"
"url": "://REDACTED:REDACTED@"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"message": "Your cluster is being deprovisioned.",
"monitor": "https://api.bonsai.io/clusters/bonsai-api-go-9994392953"
"monitor": "https://api.bonsai.io/clusters/bonsai-api-go-5431547241"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
},
"space": {
"path": "omc/bonsai/us-east-1/common",
"private_network": false,
"cloud": {
"provider": "",
"region": ""
},
"region": "aws-us-east-1",
"uri": "https://api.bonsai.io/spaces/omc/bonsai/us-east-1/common"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"message": "Your cluster is being updated.",
"monitor": "https://api.bonsai.io/clusters/bonsai-api-go-2471463249"
"monitor": "https://api.bonsai.io/clusters/bonsai-api-go-5431547241"
}
Loading

0 comments on commit eae962d

Please sign in to comment.