Skip to content

[Bug]: Fix config test assertion for missing file scenario #32

Description

@mrhillsman

Description

The test "should return error for missing file" at config_test.go:152 has an incorrect assertion. It expects cmd.Flags().Set() to fail when given a non-existent path, but Set() only stores string values in memory — it does not validate paths.

Steps to reproduce

go test -v ./internal/config/... -run "missing file"

Expected: Test passes
Actual: Test fails with Expected an error to have occurred. Got: <nil>

Fix

Change Expect(err1).To(HaveOccurred()) to Expect(err1).NotTo(HaveOccurred())

Affected file

internal/config/config_test.go:152

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions