Skip to content

Commit b9348ea

Browse files
committed
fix: address CI failures
- Fix gofmt alignment in internal/storage/memory/store.go - Add missing includeDeleted arg to GetSchemaByFingerprint call in integration test - Add #nosec G304 comment for trusted config file read in jwt.go
1 parent 6ae9eb6 commit b9348ea

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

internal/auth/jwt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func NewJWTProvider(cfg config.JWTConfig) (*JWTProvider, error) {
6868

6969
// loadPublicKey loads a public key from a PEM file.
7070
func (p *JWTProvider) loadPublicKey(keyFile, algorithm string) error {
71-
keyData, err := os.ReadFile(keyFile)
71+
keyData, err := os.ReadFile(keyFile) // #nosec G304 -- keyFile is from trusted server configuration
7272
if err != nil {
7373
return fmt.Errorf("failed to read key file: %w", err)
7474
}

internal/storage/memory/store.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ type Store struct {
7575
// NewStore creates a new in-memory store.
7676
func NewStore() *Store {
7777
return &Store{
78-
schemas: make(map[int64]*storage.SchemaRecord),
79-
subjectVersions: make(map[string]map[int]*subjectVersionInfo),
80-
nextSubjectVersion: make(map[string]int),
81-
globalFingerprints: make(map[string]int64),
78+
schemas: make(map[int64]*storage.SchemaRecord),
79+
subjectVersions: make(map[string]map[int]*subjectVersionInfo),
80+
nextSubjectVersion: make(map[string]int),
81+
globalFingerprints: make(map[string]int64),
8282
idToSubjectVersions: make(map[int64][]storage.SubjectVersion),
8383
configs: make(map[string]*storage.ConfigRecord),
8484
modes: make(map[string]*storage.ModeRecord),

tests/integration/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ func TestDatabaseValidation_SchemaByFingerprint(t *testing.T) {
11061106
}
11071107

11081108
// Validate: Query by fingerprint
1109-
schemaByFP, err := testStore.GetSchemaByFingerprint(ctx, subject, dbSchema.Fingerprint)
1109+
schemaByFP, err := testStore.GetSchemaByFingerprint(ctx, subject, dbSchema.Fingerprint, false)
11101110
if err != nil {
11111111
t.Fatalf("Database query failed - GetSchemaByFingerprint: %v", err)
11121112
}

0 commit comments

Comments
 (0)