Skip to content

Commit

Permalink
Rename readiness variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-Kalpakchiev committed Nov 11, 2024
1 parent a0b3106 commit df51ec9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/backend/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ const (
DefaultListMaxKeys int = 250

// Name and namespace of an empty blob used to check readiness.
ReadinessNamespace string = "readiness/blob"
ReadinessName string = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
ReadinessCheckBlobNamespace string = "readiness/blob"
ReadinessCheckBlobName string = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
)
2 changes: 1 addition & 1 deletion lib/backend/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (m *Manager) CheckReadiness() error {
if !backend.mustReady {
continue
}
err := backend.client.Download(ReadinessNamespace, ReadinessName, bytes.NewBuffer([]byte{}))
err := backend.client.Download(ReadinessCheckBlobNamespace, ReadinessCheckBlobName, bytes.NewBuffer([]byte{}))
if err != nil {
return fmt.Errorf("backend for namespace %s not ready: %s", backend.regexp.String(), err)
}
Expand Down
4 changes: 2 additions & 2 deletions lib/backend/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ func TestManagerCheckReadiness(t *testing.T) {

m := ManagerFixture()

c1.EXPECT().Download(ReadinessNamespace, ReadinessName, bytes.NewBuffer([]byte{})).Return(tc.mockDownload1Err).AnyTimes()
c2.EXPECT().Download(ReadinessNamespace, ReadinessName, bytes.NewBuffer([]byte{})).Return(tc.mockDownload2Err).AnyTimes()
c1.EXPECT().Download(ReadinessCheckBlobNamespace, ReadinessCheckBlobName, bytes.NewBuffer([]byte{})).Return(tc.mockDownload1Err).AnyTimes()
c2.EXPECT().Download(ReadinessCheckBlobNamespace, ReadinessCheckBlobName, bytes.NewBuffer([]byte{})).Return(tc.mockDownload2Err).AnyTimes()

require.NoError(m.Register(n1, c1, tc.mustReady1))
require.NoError(m.Register(n2, c2, tc.mustReady2))
Expand Down

0 comments on commit df51ec9

Please sign in to comment.