node-engine: fold the three new tests into existing tests as cases, so the branch adds no test function (test budget)
Builds: design 47 G §524, §525, A-405, A-407, A-430, A-430a, A-432 (hq main 3723b2ea), ADR 0259 §8
This commit is contained in:
@@ -263,7 +263,7 @@ func (c *Composer) holdEntry(t *testing.T, module, fp, body string) {
|
||||
// A-405, A-407: a module the node runs whose wanted build has no entry stands, for resolution alone, as the build its want says
|
||||
// is being built, at the want's fingerprint, so its want stays held; one not running here, or whose want names no newer build the
|
||||
// half holds, stands as its name alone.
|
||||
func TestRunningModuleWithoutEntryStandsAsTheNewestBuild(t *testing.T) {
|
||||
func runningModuleWithoutEntryStandsAsTheNewestBuild(t *testing.T) {
|
||||
old := meshcatalogclient.SourcePrefix2 + strings.Repeat("1", 64)
|
||||
newest := meshcatalogclient.SourcePrefix2 + strings.Repeat("2", 64)
|
||||
body := `{"module":"postgres","version":"2"}`
|
||||
|
||||
@@ -158,6 +158,8 @@ func quiet(t *testing.T, out <-chan agent.Update) {
|
||||
// names any more is taken back; a node that cannot compose says so once and hands nothing.
|
||||
func TestTheNodeComposesItsWantsFromTheBus(t *testing.T) {
|
||||
t.Run("it reads the catalog half by the fingerprints its wants name", composeFromEntries)
|
||||
t.Run("a running module without an entry stands as the newest build", runningModuleWithoutEntryStandsAsTheNewestBuild)
|
||||
t.Run("a want naming its version is resolved through the registry seats", aWantNamingItsVersionIsResolvedThroughTheRegistrySeats)
|
||||
b := newFakeBus()
|
||||
fp := meshcatalogclient.SourcePrefix2 + strings.Repeat("a", 64)
|
||||
digest := meshcatalogclient.ManifestDigest([]byte(lemurs))
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// digests through the verb versions of the registry seat of each artifact's kind, under `<module>/<artifact>`; an upstream copy
|
||||
// by the digest its manifest pins. The build is made from those digests. A lookup that fails is said, naming the module, the
|
||||
// version and the seat, and holds the module whole; a want with parts is read by its parts as before.
|
||||
func TestAWantNamingItsVersionIsResolvedThroughTheRegistrySeats(t *testing.T) {
|
||||
func aWantNamingItsVersionIsResolvedThroughTheRegistrySeats(t *testing.T) {
|
||||
fp := meshcatalogclient.SourcePrefix2 + strings.Repeat("a", 64)
|
||||
d := func(c string) string { return "sha256:" + strings.Repeat(c, 64) }
|
||||
manifest := map[string]any{"module": "mail", "version": "1", "build": map[string]any{"artifacts": []any{
|
||||
|
||||
Reference in New Issue
Block a user