chef

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package chef runs the Chef routes of the assembled server: cached remote cookbook metadata and the generic paths that must not bypass it.

Role

Test support: server-assembly suites for the Chef ecosystem, outside the modules. They drive the production router through HTTP requests. The package is one of its own so that CI selection can run it alone; its owner in tools/citestselection/test_ownership.json is chef.

Inputs

  • The production router from test/server/support/harness, through the harness's item world under the root's name (fixture_test.go, newItemWorld): the users reader, deployer and user, the deploy-libs permission and eight local, remote and virtual repositories, with the request and seed helpers of test/server/support.
  • A remote Chef repository over a stub source (sourceIdentity, sourceBackend).
  • The harness's remote world (harness.NewRemoteWorld), its remote made a Chef remote over a fake Supermarket that serves at most 100 cookbooks a catalog or search page whatever items asks (chef_remote_paging_test.go, cappedSupermarket), and a front for it that records every GET the remote sends (chef_remote_catalog_test.go, countedSupermarket).

Outputs

Assertions only:

  • chef_item_test.go: cached metadata has no generic download bypass and cannot escape by transfer, checksum deploy or restore.
  • chef_remote_paging_test.go: a remote reads the 100-cookbook pages of an upstream catalog that a page of its own covers, and forwards a search to the upstream's search, through the remote and a virtual repository over it; a catalog of at most 100 keeps its answers, and a short first page fails with 502.
  • chef_remote_catalog_test.go: over an upstream of 4,200 cookbooks, Knife's list and search are answered from the upstream pages they cover, items=9999999 clamped to a page of 1,000, a page past 4,096 served, order and user not forwarded, and no cookbook or version record read.

References

Status

Implemented P9c (the plan's P33 group). P9d moved the tests here from the server root (TST-06).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL