Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
bonzofenix committed Dec 13, 2024
1 parent 39d1f3e commit 9180950
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/autoscaler/api/cmd/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
"code.cloudfoundry.org/app-autoscaler/src/autoscaler/db"
"code.cloudfoundry.org/app-autoscaler/src/autoscaler/testhelpers"

. "code.cloudfoundry.org/app-autoscaler/src/autoscaler/testhelpers"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

Expand Down Expand Up @@ -47,9 +45,9 @@ var _ = Describe("Api", func() {

vcapPort = 8080 + GinkgoParallelProcess()

brokerHttpClient = NewServiceBrokerClient()
brokerHttpClient = testhelpers.NewServiceBrokerClient()
healthHttpClient = &http.Client{}
apiHttpClient = NewPublicApiClient()
apiHttpClient = testhelpers.NewPublicApiClient()
cfServerHttpClient = &http.Client{}

serverURL, err = url.Parse(fmt.Sprintf("https://127.0.0.1:%d", cfg.Server.Port))
Expand Down Expand Up @@ -169,7 +167,7 @@ var _ = Describe("Api", func() {

bodyBytes, err := io.ReadAll(rsp.Body)

FailOnError("Read failed", err)
testhelpers.FailOnError("Read failed", err)
if len(bodyBytes) == 0 {
Fail("body empty")
}
Expand Down
7 changes: 3 additions & 4 deletions src/autoscaler/api/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"crypto/rand"
"crypto/rsa"
"fmt"
"io/ioutil"
"os"
"time"

Expand Down Expand Up @@ -67,13 +66,13 @@ var _ = Describe("Config", func() {
})

It("sets EventGenerator TlSClientCert", func() {
actualKeyContent, err := ioutil.ReadFile(conf.EventGenerator.TLSClientCerts.KeyFile)
actualKeyContent, err := os.ReadFile(conf.EventGenerator.TLSClientCerts.KeyFile)
Expect(err).NotTo(HaveOccurred())

actualCertContent, err := ioutil.ReadFile(conf.EventGenerator.TLSClientCerts.CertFile)
actualCertContent, err := os.ReadFile(conf.EventGenerator.TLSClientCerts.CertFile)
Expect(err).NotTo(HaveOccurred())

actualCACertContent, err := ioutil.ReadFile(conf.EventGenerator.TLSClientCerts.CACertFile)
actualCACertContent, err := os.ReadFile(conf.EventGenerator.TLSClientCerts.CACertFile)
Expect(err).NotTo(HaveOccurred())

Expect(actualKeyContent).To(Equal(cfInstanceKey))
Expand Down

0 comments on commit 9180950

Please sign in to comment.