mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-12-15 16:09:39 -05:00
deps: update golangci/golangci-lint to v1.53.2 (#1924)
* deps: update golangci/golangci-lint to v1.53.2 * deps: tidy all modules * attestation: silence linter warning --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: edgelessci <edgelessci@users.noreply.github.com> Co-authored-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
parent
ab52e6d4c5
commit
4908b5f63c
3 changed files with 23 additions and 23 deletions
|
|
@ -91,7 +91,7 @@ Y+t5OxL3kL15VzY1Ob0d5cMCAwEAAQ==
|
|||
wantErr bool
|
||||
}{
|
||||
"success": {
|
||||
instanceInfo: mustMarshal(attest.GCEInstanceInfo{}, require.New(t)),
|
||||
instanceInfo: mustMarshal(&attest.GCEInstanceInfo{}, require.New(t)),
|
||||
getClient: prepareFakeClient(&computepb.ShieldedInstanceIdentity{
|
||||
SigningKey: &computepb.ShieldedInstanceIdentityEntry{
|
||||
EkPub: proto.String(testPubK),
|
||||
|
|
@ -109,12 +109,12 @@ Y+t5OxL3kL15VzY1Ob0d5cMCAwEAAQ==
|
|||
wantErr: true,
|
||||
},
|
||||
"empty signing key": {
|
||||
instanceInfo: mustMarshal(attest.GCEInstanceInfo{}, require.New(t)),
|
||||
instanceInfo: mustMarshal(&attest.GCEInstanceInfo{}, require.New(t)),
|
||||
getClient: prepareFakeClient(&computepb.ShieldedInstanceIdentity{}, nil, nil),
|
||||
wantErr: true,
|
||||
},
|
||||
"new client error": {
|
||||
instanceInfo: mustMarshal(attest.GCEInstanceInfo{}, require.New(t)),
|
||||
instanceInfo: mustMarshal(&attest.GCEInstanceInfo{}, require.New(t)),
|
||||
getClient: prepareFakeClient(&computepb.ShieldedInstanceIdentity{
|
||||
SigningKey: &computepb.ShieldedInstanceIdentityEntry{
|
||||
EkPub: proto.String(testPubK),
|
||||
|
|
@ -123,7 +123,7 @@ Y+t5OxL3kL15VzY1Ob0d5cMCAwEAAQ==
|
|||
wantErr: true,
|
||||
},
|
||||
"GetShieldedInstanceIdentity error": {
|
||||
instanceInfo: mustMarshal(attest.GCEInstanceInfo{}, require.New(t)),
|
||||
instanceInfo: mustMarshal(&attest.GCEInstanceInfo{}, require.New(t)),
|
||||
getClient: prepareFakeClient(&computepb.ShieldedInstanceIdentity{
|
||||
SigningKey: &computepb.ShieldedInstanceIdentityEntry{
|
||||
EkPub: proto.String(testPubK),
|
||||
|
|
@ -132,7 +132,7 @@ Y+t5OxL3kL15VzY1Ob0d5cMCAwEAAQ==
|
|||
wantErr: true,
|
||||
},
|
||||
"Decode error": {
|
||||
instanceInfo: mustMarshal(attest.GCEInstanceInfo{}, require.New(t)),
|
||||
instanceInfo: mustMarshal(&attest.GCEInstanceInfo{}, require.New(t)),
|
||||
getClient: prepareFakeClient(&computepb.ShieldedInstanceIdentity{
|
||||
SigningKey: &computepb.ShieldedInstanceIdentityEntry{
|
||||
EkPub: proto.String("Not a public key"),
|
||||
|
|
@ -164,7 +164,7 @@ Y+t5OxL3kL15VzY1Ob0d5cMCAwEAAQ==
|
|||
}
|
||||
}
|
||||
|
||||
func mustMarshal(in any, require *require.Assertions) []byte {
|
||||
func mustMarshal(in *attest.GCEInstanceInfo, require *require.Assertions) []byte {
|
||||
out, err := json.Marshal(in)
|
||||
require.NoError(err)
|
||||
return out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue