Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Test Kitchen Setup for go-chef project #15

Open
mudash opened this issue Apr 2, 2020 · 3 comments
Open

Update Test Kitchen Setup for go-chef project #15

mudash opened this issue Apr 2, 2020 · 3 comments
Labels
Aspect: Integration Works correctly with other projects or systems. Aspect: Testing Does the project have good coverage, and is CI working? Triage: Confirmed Indicates and issue has been confirmed as described. Type: Chore non-critical maintenance of a project.

Comments

@mudash
Copy link

mudash commented Apr 2, 2020

Background: Test Kitchen cases was found when we refreshed go-chef from upstream. Need to make them work for us smoothly.

@MarkGibbons
Copy link

MarkGibbons commented Apr 7, 2020

Upstream maintainer here. I had planned to eventually move the go code in the cmd directory, examples of using the go-chef api, to its own package. Since the code is all main functions at the moment it was going to take some refactoring. It looks like you want the code packaged this way:

go-chef/chef
        files *.go -> go modules in the go-chef/chef package
        test_chef_server - cookbook to spin up the server and run tests
              inspec tests
              test fixtures
              recipes to install the go code
        examples
            files *.go -> current cmd code turned into a separate package
            bin directory -> shell scripts to run the examples, called by the inspec tests

I do some weird things with the chefapi_test cookbook, mostly to be able to run the tests while developing and updating the api documentation.

Could I get some input on where you think the structure should go? I'd like to bring in your work, but the changes in structure make that difficult.

thanks,
Mark

@MarkGibbons
Copy link

I'm working on this refactoring in go-chef/chef.

@MarkGibbons
Copy link

I merged https://github.com/go-chef/chef/tree/test_refactor in the go-chef/chef repository. I think it does most of what you wanted out of a test kitchen refactor.

@tyler-ball tyler-ball added Aspect: Integration Works correctly with other projects or systems. Aspect: Testing Does the project have good coverage, and is CI working? Triage: Confirmed Indicates and issue has been confirmed as described. Type: Chore non-critical maintenance of a project. labels Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aspect: Integration Works correctly with other projects or systems. Aspect: Testing Does the project have good coverage, and is CI working? Triage: Confirmed Indicates and issue has been confirmed as described. Type: Chore non-critical maintenance of a project.
Projects
None yet
Development

No branches or pull requests

3 participants