mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Fixed a bunch of typos (#7146)
This commit is contained in:

committed by
Jeff Mitchell

parent
a824db9b05
commit
c70d05b026
2
command/agent/cache/handler.go
vendored
2
command/agent/cache/handler.go
vendored
@@ -173,7 +173,7 @@ func processTokenLookupResponse(ctx context.Context, logger hclog.Logger, inmemS
|
|||||||
resp.Response.Body = ioutil.NopCloser(bytes.NewReader(bodyBytes))
|
resp.Response.Body = ioutil.NopCloser(bytes.NewReader(bodyBytes))
|
||||||
resp.Response.ContentLength = int64(len(bodyBytes))
|
resp.Response.ContentLength = int64(len(bodyBytes))
|
||||||
|
|
||||||
// Serialize and re-read the reponse
|
// Serialize and re-read the response
|
||||||
var respBytes bytes.Buffer
|
var respBytes bytes.Buffer
|
||||||
err = resp.Response.Write(&respBytes)
|
err = resp.Response.Write(&respBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
2
command/agent/cache/lease_cache_test.go
vendored
2
command/agent/cache/lease_cache_test.go
vendored
@@ -153,7 +153,7 @@ func TestLeaseCache_SendCacheable(t *testing.T) {
|
|||||||
t.Fatalf("expected getting proxied response: got %v", diff)
|
t.Fatalf("expected getting proxied response: got %v", diff)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the same request again and ensure that the same reponse is returned
|
// Make the same request again and ensure that the same response is returned
|
||||||
// again.
|
// again.
|
||||||
sendReq = &SendRequest{
|
sendReq = &SendRequest{
|
||||||
Token: "autoauthtoken",
|
Token: "autoauthtoken",
|
||||||
|
@@ -33,7 +33,7 @@ type BoltStore struct {
|
|||||||
path string
|
path string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Options contains all the configuraiton used to open the BoltDB
|
// Options contains all the configuration used to open the BoltDB
|
||||||
type Options struct {
|
type Options struct {
|
||||||
// Path is the file path to the BoltDB to use
|
// Path is the file path to the BoltDB to use
|
||||||
Path string
|
Path string
|
||||||
|
@@ -239,7 +239,7 @@ type RaftConfigurationResponse struct {
|
|||||||
Index uint64 `json:"index"`
|
Index uint64 `json:"index"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Peer defines the ID and Adress for a given member of the raft cluster.
|
// Peer defines the ID and Address for a given member of the raft cluster.
|
||||||
type Peer struct {
|
type Peer struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Address string `json:"address"`
|
Address string `json:"address"`
|
||||||
|
@@ -237,7 +237,7 @@ func (s *BoltSnapshotSink) Write(b []byte) (int, error) {
|
|||||||
s.l.Lock()
|
s.l.Lock()
|
||||||
defer s.l.Unlock()
|
defer s.l.Unlock()
|
||||||
|
|
||||||
// If someone is writting to this sink then we need to create a file sink to
|
// If someone is writing to this sink then we need to create a file sink to
|
||||||
// capture the data. This currently only happens when a follower is being
|
// capture the data. This currently only happens when a follower is being
|
||||||
// sent a snapshot.
|
// sent a snapshot.
|
||||||
if s.fileSink == nil {
|
if s.fileSink == nil {
|
||||||
|
@@ -63,7 +63,7 @@ func (b *backendGRPCPluginClient) Initialize(ctx context.Context, _ *logical.Ini
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the plugin doesn't have Initialize implemented we should not fail
|
// If the plugin doesn't have Initialize implemented we should not fail
|
||||||
// the initalize call; otherwise this could halt startup of vault.
|
// the initialize call; otherwise this could halt startup of vault.
|
||||||
grpcStatus, ok := status.FromError(err)
|
grpcStatus, ok := status.FromError(err)
|
||||||
if ok && grpcStatus.Code() == codes.Unimplemented {
|
if ok && grpcStatus.Code() == codes.Unimplemented {
|
||||||
return nil
|
return nil
|
||||||
|
@@ -183,7 +183,7 @@ func TestPriorityQueue_PopByKey(t *testing.T) {
|
|||||||
testValidateInternalData(t, pq, len(tc)-len(popKeys)-1, true)
|
testValidateInternalData(t, pq, len(tc)-len(popKeys)-1, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// testValidateInternalData checks the internal data stucture of the PriorityQueue
|
// testValidateInternalData checks the internal data structure of the PriorityQueue
|
||||||
// and verifies that items are in-sync. Use drain only at the end of a test,
|
// and verifies that items are in-sync. Use drain only at the end of a test,
|
||||||
// because it will mutate the input queue
|
// because it will mutate the input queue
|
||||||
func testValidateInternalData(t *testing.T, pq *PriorityQueue, expectedSize int, drain bool) {
|
func testValidateInternalData(t *testing.T, pq *PriorityQueue, expectedSize int, drain bool) {
|
||||||
|
@@ -79,7 +79,7 @@ func TestIdentityStore_EntityDisabled(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Here, should suceed but we should not see the header since it's
|
// Here, should succeed but we should not see the header since it's
|
||||||
// not in the allowed list
|
// not in the allowed list
|
||||||
req := client.NewRequest("GET", "/v1/auth/headtest/loginnoerror")
|
req := client.NewRequest("GET", "/v1/auth/headtest/loginnoerror")
|
||||||
resp, err := client.RawRequest(req)
|
resp, err := client.RawRequest(req)
|
||||||
|
@@ -1175,7 +1175,7 @@ func (i *IdentityStore) pathOIDCIntrospect(ctx context.Context, req *logical.Req
|
|||||||
}
|
}
|
||||||
|
|
||||||
// namedKey.rotate(overrides) performs a key rotation on a namedKey and returns the
|
// namedKey.rotate(overrides) performs a key rotation on a namedKey and returns the
|
||||||
// verification_ttl that was applied. verification_ttl can be overriden with an
|
// verification_ttl that was applied. verification_ttl can be overridden with an
|
||||||
// overrideVerificationTTL value >= 0
|
// overrideVerificationTTL value >= 0
|
||||||
func (k *namedKey) rotate(ctx context.Context, s logical.Storage, overrideVerificationTTL time.Duration) error {
|
func (k *namedKey) rotate(ctx context.Context, s logical.Storage, overrideVerificationTTL time.Duration) error {
|
||||||
verificationTTL := k.VerificationTTL
|
verificationTTL := k.VerificationTTL
|
||||||
|
@@ -524,7 +524,7 @@ func (ps *PolicyStore) switchedGetPolicy(ctx context.Context, name string, polic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nil-check on the view before proceeding to retrive from storage
|
// Nil-check on the view before proceeding to retrieve from storage
|
||||||
if view == nil {
|
if view == nil {
|
||||||
return nil, fmt.Errorf("unable to get the barrier subview for policy type %q", policyType)
|
return nil, fmt.Errorf("unable to get the barrier subview for policy type %q", policyType)
|
||||||
}
|
}
|
||||||
|
@@ -64,7 +64,7 @@ func (s *forwardedRequestRPCServer) ForwardRequest(ctx context.Context, freq *fo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Performance standby nodes will use this value to do wait for WALs to ship
|
// Performance standby nodes will use this value to do wait for WALs to ship
|
||||||
// in order to do a best-effort read after write gurantee
|
// in order to do a best-effort read after write guarantee
|
||||||
resp.LastRemoteWal = LastWAL(s.core)
|
resp.LastRemoteWal = LastWAL(s.core)
|
||||||
|
|
||||||
return resp, nil
|
return resp, nil
|
||||||
|
@@ -260,7 +260,7 @@ func (m *RollbackManager) Rollback(ctx context.Context, path string) error {
|
|||||||
rs := m.startOrLookupRollback(ctx, fullPath, false)
|
rs := m.startOrLookupRollback(ctx, fullPath, false)
|
||||||
|
|
||||||
// Since we have the statelock held, tell any inflight rollback to give up
|
// Since we have the statelock held, tell any inflight rollback to give up
|
||||||
// trying to aquire it. This will prevent deadlocks in the case where we
|
// trying to acquire it. This will prevent deadlocks in the case where we
|
||||||
// have the write lock. In the case where it was waiting to grab
|
// have the write lock. In the case where it was waiting to grab
|
||||||
// a read lock it will then simply continue with the rollback
|
// a read lock it will then simply continue with the rollback
|
||||||
// operation under the protection of our write lock.
|
// operation under the protection of our write lock.
|
||||||
|
Reference in New Issue
Block a user