Skip to content

Commit ae833b6

Browse files
authored
test: use stdlib context in preference to golang.org/x/net/context (#1349)
golang.org/x/net/context has been deprecated in golang.org/x/net@0.47.0, so we should fix the code before updating to golang.org/x/net@0.47.0 to avoid deprecation warnings
1 parent ea3575d commit ae833b6

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

brokerapi/broker/deprovision_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package broker_test
22

33
import (
4+
"context"
45
"errors"
56
"fmt"
67

@@ -16,7 +17,6 @@ import (
1617
"github.com/cloudfoundry/cloud-service-broker/v2/utils"
1718
. "github.com/onsi/ginkgo/v2"
1819
. "github.com/onsi/gomega"
19-
"golang.org/x/net/context"
2020
)
2121

2222
var _ = Describe("Deprovision", func() {

brokerapi/broker/get_instance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package broker_test
22

33
import (
4+
"context"
45
"errors"
56
"fmt"
67
"net/http"
@@ -10,7 +11,6 @@ import (
1011
"code.cloudfoundry.org/lager/v3"
1112
. "github.com/onsi/ginkgo/v2"
1213
. "github.com/onsi/gomega"
13-
"golang.org/x/net/context"
1414

1515
"github.com/cloudfoundry/cloud-service-broker/v2/brokerapi/broker/brokerfakes"
1616
"github.com/cloudfoundry/cloud-service-broker/v2/dbservice/models"

brokerapi/broker/last_binding_operation_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package broker_test
22

33
import (
4+
"context"
5+
46
"code.cloudfoundry.org/brokerapi/v13/domain"
57
. "github.com/onsi/ginkgo/v2"
68
. "github.com/onsi/gomega"
7-
"golang.org/x/net/context"
89

910
"github.com/cloudfoundry/cloud-service-broker/v2/brokerapi/broker/brokerfakes"
1011
"github.com/cloudfoundry/cloud-service-broker/v2/utils"

brokerapi/broker/last_instance_operation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package broker_test
22

33
import (
4+
"context"
45
"errors"
56

67
"code.cloudfoundry.org/brokerapi/v13/domain"
@@ -16,7 +17,6 @@ import (
1617
"github.com/cloudfoundry/cloud-service-broker/v2/utils"
1718
. "github.com/onsi/ginkgo/v2"
1819
. "github.com/onsi/gomega"
19-
"golang.org/x/net/context"
2020
)
2121

2222
var _ = Describe("LastInstanceOperation", func() {

brokerapi/broker/services_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package broker_test
22

33
import (
4+
"context"
5+
46
"code.cloudfoundry.org/brokerapi/v13/domain"
57
. "github.com/onsi/ginkgo/v2"
68
. "github.com/onsi/gomega"
7-
"golang.org/x/net/context"
89

910
"github.com/cloudfoundry/cloud-service-broker/v2/brokerapi/broker"
1011
"github.com/cloudfoundry/cloud-service-broker/v2/brokerapi/broker/brokerfakes"

brokerapi/broker/update_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package broker_test
22

33
import (
4+
"context"
45
"encoding/json"
56
"errors"
67
"fmt"
@@ -13,7 +14,6 @@ import (
1314
. "github.com/onsi/ginkgo/v2"
1415
. "github.com/onsi/gomega"
1516
"github.com/spf13/viper"
16-
"golang.org/x/net/context"
1717

1818
"github.com/cloudfoundry/cloud-service-broker/v2/brokerapi/broker"
1919
"github.com/cloudfoundry/cloud-service-broker/v2/brokerapi/broker/brokerfakes"

0 commit comments

Comments
 (0)