Skip to content

NewBoot should find boot.yaml in default project dir when called via Go Unit Test #135

Open
@feidhlimx

Description

When rkBoot setup is required to run a unit test in go, the NewBoot() function should find boot.yaml by default.
Providing a different Path for every Test depending on the Test location is sub-optimal.
Also, when the boot.yaml has entries which are relative to boot.yaml, they should be also be found in a Unit Test without extra path requirements.

Describe the solution you'd like
NewBoot() function should find boot,yaml by default in the project dir .

Describe alternatives you've considered
I have used TestMain to call one Setup() function which starts rkBoot, but this must also look for the path to boot,yaml relative to the Setup function location (which cannot exist in main package as it causes cricular dependancies)

Additional context
Add any other context or screenshots about the feature request here.

https://stackoverflow.com/questions/23729790/how-can-i-do-test-setup-using-the-testing-package-in-go

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions