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

Add Cookbook Uploads #253

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

wheatevo
Copy link

Here is my first pass at adding cookbook uploads to go-chef/chef.

Changes:

  • Add support for cookbook uploads (V0 and V2)
  • Add support for chefignore files
  • Improve metadata.rb parsing to conform with Chef API
  • Add ServerApiVersion customization to http
  • Minor linting changes for newer golang versions
  • Updated integration test golang to 1.21

Resolves #250

Both unit and integration tests have been added for the new features. Please take a look and let me know what you think.

* Add support for cookbook uploads (V0 and V2).
* Add support for chefignore files
* Improve metadata.rb parsing to conform with Chef API
* Add ServerApiVersion customization to http
* Minor linting changes for newer golang versions

Resolves go-chef#250
@wheatevo wheatevo mentioned this pull request Jan 24, 2024
@wheatevo
Copy link
Author

wheatevo commented Jan 24, 2024

At this point all integration tests pass with the exception of the following unrelated tests:

  Command: `/go/src/testapi/bin/policy`
     [PASS]  stderr is expected not to match /error|no such file|cannot find|not used|undefined/
     [PASS]  stderr is expected to match /Issue getting nothere.*404/
     [FAIL]  stdout is expected to match /List policies map\[testsamp:\{Uri/
     expected "List policies map[]\nGet  map[]\nGet  revision {RevisionID: Name: RunList:[] NamedRunList:map[] Incl...lutionDependencies:{PolicyFile:[] Dependencies:<nil>}}\nGet nothere map[]\nDelete testsamp2 map[]\n" to match /List policies map\[testsamp:\{Uri/
     [FAIL]  stdout is expected to match /Get testsamp.* map\[revisions:map/
     expected "List policies map[]\nGet  map[]\nGet  revision {RevisionID: Name: RunList:[] NamedRunList:map[] Incl...lutionDependencies:{PolicyFile:[] Dependencies:<nil>}}\nGet nothere map[]\nDelete testsamp2 map[]\n" to match /Get testsamp.* map\[revisions:map/
     [FAIL]  stdout is expected to match /Get testsamp.* revision \{RevisionID/
     expected "List policies map[]\nGet  map[]\nGet  revision {RevisionID: Name: RunList:[] NamedRunList:map[] Incl...lutionDependencies:{PolicyFile:[] Dependencies:<nil>}}\nGet nothere map[]\nDelete testsamp2 map[]\n" to match /Get testsamp.* revision \{RevisionID/
     [FAIL]  stdout is expected to match /Delete revision .*from testsamp.*\{RevisionID/
     expected "List policies map[]\nGet  map[]\nGet  revision {RevisionID: Name: RunList:[] NamedRunList:map[] Incl...lutionDependencies:{PolicyFile:[] Dependencies:<nil>}}\nGet nothere map[]\nDelete testsamp2 map[]\n" to match /Delete revision .*from testsamp.*\{RevisionID/
  Command: `/go/src/testapi/bin/policygroup`
     [PASS]  stderr is expected not to match /error|no such file|cannot find|not used|undefined/
     [FAIL]  stdout is expected to match /List policy_groups map.*testgroup:\{Uri/
     expected "List policy_groups map[]\nGet testgroup {Uri: Policies:map[]}\nGet testgroup::testsamp {RevisionID: ... SolutionDependencies:{PolicyFile:[] Dependencies:<nil>}}\nDelete testgroup {Uri: Policies:map[]}\n" to match /List policy_groups map.*testgroup:\{Uri/

Taking a closer look at master branch test results to ensure this isn't a regression.

EDIT: Confirmed that this is present in master as well.

@MarkGibbons
Copy link
Member

That's not likely to be something you caused.

@wheatevo wheatevo marked this pull request as ready for review January 24, 2024 18:34
@MarkGibbons
Copy link
Member

I was stuck for a while on #249. I'll get to this PR within the next couple weeks.

@MarkGibbons
Copy link
Member

Working on this one now.

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

Successfully merging this pull request may close these issues.

Support Cookbook Uploads
2 participants