N3 (mesh-enrolment): the enrolment names no bucket of its own
Its state enrolments is the runtime's bucket of the credential's module; the constant `mesh-enrolment_enrolments` was read by its tests alone, which now name the bed's bucket themselves. Builds: design 47 G A-296 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -223,7 +223,7 @@ func TestMeshEnrolmentWholeOnARealBus(t *testing.T) {
|
||||
}
|
||||
return kv
|
||||
}
|
||||
enrolments := mk(enrolmentsBucket, true)
|
||||
enrolments := mk(Module+"_"+enrolmentsState, true) // the runtime's bucket of the bed's credential's module
|
||||
// No controller lease bucket at all: the controller ended by its unassignment (issue 1126).
|
||||
logins, assignments := mk(nodeLoginsBucket, false), mk("mesh-delivery-assigner_assignments", false)
|
||||
have := mk("node-engine_have", false)
|
||||
|
||||
@@ -9,9 +9,9 @@ const (
|
||||
vaultModule = "mesh-vault"
|
||||
assignerModule = "mesh-delivery-assigner"
|
||||
|
||||
// enrolmentsState is the holder's state of open enrolments, enrolmentsBucket its bucket.
|
||||
enrolmentsState = meshnodeenroller.StateEnrolments
|
||||
enrolmentsBucket = Module + "_" + enrolmentsState
|
||||
// enrolmentsState is the holder's state of open enrolments; its bucket is the runtime's, of the credential's module
|
||||
// (design 47 G A-296), never named here.
|
||||
enrolmentsState = meshnodeenroller.StateEnrolments
|
||||
// signersRead is the vault's state signers as the enrolment's manifest reads it, signersKey the key holding its signing key.
|
||||
signersRead = vaultModule + ".signers"
|
||||
signersKey = "key"
|
||||
|
||||
@@ -119,8 +119,8 @@ func theManifestSaysWhatTheCodeDoes(t *testing.T) {
|
||||
!slices.Contains(m.Invokes, vaultToken) || !slices.Contains(m.Invokes, vaultAccount) {
|
||||
t.Errorf("reads %v, invokes %v: want %s, %s, %s, %s and %s", m.Reads, m.Invokes, signersRead, assignmentsAdd, vaultSign, vaultToken, vaultAccount)
|
||||
}
|
||||
if enrolmentsBucket != m.Module+"_"+State || !strings.HasPrefix(AssignmentsTool, assignerModule+".") {
|
||||
t.Errorf("the names %s, %s are not the manifest's module %s and the assigner %s", enrolmentsBucket, AssignmentsTool, m.Module, assignerModule)
|
||||
if enrolmentsState != State || !strings.HasPrefix(AssignmentsTool, assignerModule+".") {
|
||||
t.Errorf("the names %s, %s are not the manifest's state %s and the assigner %s", enrolmentsState, AssignmentsTool, State, assignerModule)
|
||||
}
|
||||
var heard []string
|
||||
for _, e := range EndEvents {
|
||||
|
||||
Reference in New Issue
Block a user