mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
misc lint
This commit is contained in:
parent
cece88b6a0
commit
6bbb783af8
@ -380,7 +380,7 @@ type stubRoleAssignmentsAPI struct {
|
||||
}
|
||||
|
||||
func (a *stubRoleAssignmentsAPI) Create(ctx context.Context, scope string, roleAssignmentName string, parameters authorization.RoleAssignmentCreateParameters) (authorization.RoleAssignment, error) {
|
||||
a.createCounter += 1
|
||||
a.createCounter++
|
||||
if len(a.createErrors) == 0 {
|
||||
return authorization.RoleAssignment{}, nil
|
||||
}
|
||||
|
@ -40,8 +40,7 @@ func (m *fakeAWSClient) GenerateDataKey(ctx context.Context, params *kms.Generat
|
||||
}
|
||||
|
||||
kekID := *params.KeyId
|
||||
_, ok := m.kekPool[kekID]
|
||||
if !ok {
|
||||
if _, ok := m.kekPool[kekID]; !ok {
|
||||
return nil, kmsInterface.ErrKEKUnknown
|
||||
}
|
||||
|
||||
@ -100,7 +99,7 @@ func (m *fakeAWSClient) DescribeKey(ctx context.Context, params *kms.DescribeKey
|
||||
|
||||
// CreateKey stores a key in fakeKMSStore.
|
||||
func (m *fakeAWSClient) CreateKey(ctx context.Context, params *kms.CreateKeyInput, optFns ...func(*kms.Options)) (*kms.CreateKeyOutput, error) {
|
||||
m.keyIDCount += 1
|
||||
m.keyIDCount++
|
||||
kekID := strconv.Itoa(m.keyIDCount)
|
||||
|
||||
if _, ok := m.kekPool[kekID]; ok {
|
||||
|
@ -46,7 +46,7 @@ func NewHSM(ctx context.Context, vaultName string, store kms.Storage, opts *Opts
|
||||
return nil, fmt.Errorf("creating HSM client: %w", err)
|
||||
}
|
||||
|
||||
// `azkeys.NewClient()` does not error if the vault is non existant
|
||||
// `azkeys.NewClient()` does not error if the vault is non existent
|
||||
// Test here if we can reach the vault, and error otherwise
|
||||
pager := client.ListKeys(&azkeys.ListKeysOptions{MaxResults: to.Int32Ptr(2)})
|
||||
pager.NextPage(ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user