Skip to content

Commit

Permalink
BKTCLT-19 [squash] rename test var to avoid conflicts, remove unneces…
Browse files Browse the repository at this point in the history
…sary Ordered test attribute
  • Loading branch information
jonathan-gramain committed Sep 25, 2024
1 parent cbfe74f commit 6e0cc88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go/admin_getbucketsessionid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/jarcoal/httpmock"
)

var _ = Describe("AdminGetBucketSessionId()", Ordered, func() {
var _ = Describe("AdminGetBucketSessionId()", func() {
It("return the raft session ID hosting a bucket", func(ctx SpecContext) {
httpmock.RegisterResponder(
"GET", "http://localhost:9000/_/buckets/my-bucket/id",
Expand Down
10 changes: 5 additions & 5 deletions go/admin_getsessioninfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/scality/bucketclient/go"
)

var bucketdResponse = `[
var testAdminGetAllSessionsInfoBucketdResponse = `[
{
"id": 1,
"raftMembers": [
Expand Down Expand Up @@ -43,12 +43,12 @@ var bucketdResponse = `[
]
`

var _ = Describe("AdminGetSessionInfo()/AdminGetAllSessionsInfo()", Ordered, func() {
var _ = Describe("AdminGetSessionInfo()/AdminGetAllSessionsInfo()", func() {
Describe("AdminGetAllSessionsInfo()", func() {
It("return info about all raft sessions", func(ctx SpecContext) {
httpmock.RegisterResponder(
"GET", "http://localhost:9000/_/raft_sessions",
httpmock.NewStringResponder(200, bucketdResponse),
httpmock.NewStringResponder(200, testAdminGetAllSessionsInfoBucketdResponse),
)
Expect(client.AdminGetAllSessionsInfo(ctx)).To(Equal([]bucketclient.SessionInfo{
{
Expand Down Expand Up @@ -89,7 +89,7 @@ var _ = Describe("AdminGetSessionInfo()/AdminGetAllSessionsInfo()", Ordered, fun
It("return info about a particular raft session", func(ctx SpecContext) {
httpmock.RegisterResponder(
"GET", "http://localhost:9000/_/raft_sessions",
httpmock.NewStringResponder(200, bucketdResponse),
httpmock.NewStringResponder(200, testAdminGetAllSessionsInfoBucketdResponse),
)
Expect(client.AdminGetSessionInfo(ctx, 2)).To(Equal(&bucketclient.SessionInfo{
ID: 2,
Expand All @@ -110,7 +110,7 @@ var _ = Describe("AdminGetSessionInfo()/AdminGetAllSessionsInfo()", Ordered, fun
It("return an error if the session doesn't exist", func(ctx SpecContext) {
httpmock.RegisterResponder(
"GET", "http://localhost:9000/_/raft_sessions",
httpmock.NewStringResponder(200, bucketdResponse),
httpmock.NewStringResponder(200, testAdminGetAllSessionsInfoBucketdResponse),
)
_, err := client.AdminGetSessionInfo(ctx, 3)
bcErr, ok := err.(*bucketclient.BucketClientError)
Expand Down

0 comments on commit 6e0cc88

Please sign in to comment.