Merge the set-aside field's three tests into one, so the judge work adds no test to the budget
Issue 1585: mesh-sdk and mesh-delivery are both over 500 unit tests; ADR 0578's tests replace, never add. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
@@ -302,6 +302,8 @@ func TestADefaultFillsAContributionAndAServedFactButNotALiteral(t *testing.T) {
|
||||
// aside and named, and its module is composed, never left out (novox/hq ADR 0578 §6, which changes ADR 0262); the judge
|
||||
// refuses it. One case per block whose decoder wraps the decoder's words in its own.
|
||||
func TestAStoredManifestWithAnUnknownKeyIsSetAsideAndTheJudgeRefusesIt(t *testing.T) {
|
||||
t.Run("it still provides what it provides", aModuleWithAFieldSetAsideStillProvidesWhatItProvides)
|
||||
t.Run("it is composed whole", aModuleWithAFieldSetAsideIsComposedWhole)
|
||||
for where, raw := range map[string]string{
|
||||
"the top": `{"module": "later", "version": "2", "a-field-from-later": {"x": 1}}`,
|
||||
"a state": `{"module": "later", "version": "2", "state": [{"name": "s", "a-field-from-later": 1}]}`,
|
||||
@@ -345,7 +347,7 @@ func TestAStoredManifestWithAnUnknownKeyIsSetAsideAndTheJudgeRefusesIt(t *testin
|
||||
// A module left out for a key this controller does not know, inside an entry, is read past that key
|
||||
// alone: it still provides what it provides, its other entries are whole, and a key of the same name
|
||||
// that another entry knows is kept (novox/hq ADR 0262).
|
||||
func TestALeftOutModuleStillProvidesWhatItProvides(t *testing.T) {
|
||||
func aModuleWithAFieldSetAsideStillProvidesWhatItProvides(t *testing.T) {
|
||||
var m Manifest
|
||||
raw := `{"module": "later", "version": "2",
|
||||
"provides": [{"name": "db", "scope": "mesh"}, {"name": "cache", "a-field-from-later": 1}],
|
||||
@@ -376,7 +378,7 @@ func TestALeftOutModuleStillProvidesWhatItProvides(t *testing.T) {
|
||||
|
||||
// A module with a field set aside is composed whole: its files are declared and its data backed up (novox/hq ADR 0578
|
||||
// §6; before, ADR 0262 left it out and backed up its data alone).
|
||||
func TestAModuleWithAFieldSetAsideIsComposedWhole(t *testing.T) {
|
||||
func aModuleWithAFieldSetAsideIsComposedWhole(t *testing.T) {
|
||||
var later Manifest
|
||||
if err := json.Unmarshal([]byte(`{"module": "later", "version": "2", "a-field-from-later": 1,
|
||||
"resources": [{"id": "d", "type": "directory", "mode": "0700"}, {"id": "rc", "type": "file", "path": "/etc/later.conf", "content": "x\n"}],
|
||||
|
||||
Reference in New Issue
Block a user