Skip to content

Commit db85700

Browse files
committed
Fix lint
Signed-off-by: Pavol Loffay <[email protected]>
1 parent bea8e30 commit db85700

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

cmd/mdatagen/internal/samplereceiver/generated_component_test.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/samplereceiver/generated_package_test.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/schemagen/generator_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func TestSetSchemaType(t *testing.T) {
149149
func TestSchemaValidation(t *testing.T) {
150150
// Load the YAML schema
151151
schemaPath := filepath.Join("testdata", "config_schema.yaml")
152-
schemaData, err := os.ReadFile(schemaPath)
152+
schemaData, err := os.ReadFile(schemaPath) //#nosec G304 -- test file path
153153
require.NoError(t, err, "failed to read schema file")
154154

155155
// Parse the schema YAML and convert to JSON-compatible format
@@ -192,7 +192,7 @@ func TestSchemaValidation(t *testing.T) {
192192
t.Run(tc.name, func(t *testing.T) {
193193
// Load the YAML config
194194
configPath := filepath.Join("testdata", tc.configFile)
195-
configData, err := os.ReadFile(configPath)
195+
configData, err := os.ReadFile(configPath) //#nosec G304 -- test file path
196196
require.NoError(t, err, "failed to read config file")
197197

198198
// Parse YAML to interface{}
@@ -210,9 +210,9 @@ func TestSchemaValidation(t *testing.T) {
210210
validationErr := schema.Validate(config)
211211

212212
if tc.expectValid {
213-
assert.NoError(t, validationErr, "expected config to be valid")
213+
require.NoError(t, validationErr, "expected config to be valid")
214214
} else {
215-
assert.Error(t, validationErr, "expected config to be invalid")
215+
require.Error(t, validationErr, "expected config to be invalid")
216216
t.Logf("Validation errors (expected): %v", validationErr)
217217
}
218218
})

0 commit comments

Comments
 (0)