Ask the packet filter's holder allowed at every compose of the filter
The node-engine stays the one renderer of the filter file: at each compose of a converged node's filter it asks the holder of node-packet-filter its verb allowed within the setting compose-ask-bound (10 s) and renders the answer. When allowed does not answer, or answers what is not its answer, no filter file is composed: the one loaded is kept as it runs, the holder's module is not held (an old holder must stay replaceable), and the part withheld is said once in the journal until an answer comes between. The node hears allowances-changed on its own node's subject and composes again. The manifest invokes seat:node-packet-filter.allowed and consumes node-packet-filter.allowances-changed. Builds: design 08 control-verbs §1, §3, §4, §5, §7, §8; ADR 0683; H-A-305, H-A-307 (1), (2), H-A-314 (3), (5), (7), H-A-315 (2), (6), H-A-321
This commit is contained in:
@@ -95,11 +95,16 @@ func TestTheManifestConsumesTheBackupEvent(t *testing.T) {
|
||||
if !strings.Contains(string(raw), `"content": "${config:resolve-again-minutes}\n"`) || m.Config["resolve-again-minutes"].Default != float64(1) {
|
||||
t.Errorf("module.json declares no file with the content ${config:resolve-again-minutes} or its default is not 1 (design 47 H, H-A-146)")
|
||||
}
|
||||
// Design 08 control-verbs §1, H-A-314 (3), (5): the compose-ask bound, ten seconds by default, fed into its file; allowed invoked.
|
||||
if !strings.Contains(string(raw), `"content": "${config:compose-ask-bound}\n"`) || m.Config["compose-ask-bound"].Default != float64(10) ||
|
||||
!strings.Contains(string(raw), `"seat:node-packet-filter.allowed"`) {
|
||||
t.Errorf("module.json declares no file with the content ${config:compose-ask-bound}, its default is not 10, or it invokes no seat:node-packet-filter.allowed")
|
||||
}
|
||||
if m.Config["recovery-wait-minutes"].Default != float64(90) {
|
||||
t.Errorf("config recovery-wait-minutes is %+v, want default 90", m.Config["recovery-wait-minutes"])
|
||||
}
|
||||
// The backup event, the status view's settled, and the two events of the seat that serves the seat list (ADR 0636 §4), the keeper's ask (design 47 G §387), the seat's running (§199) and the builder's build ends (A-293).
|
||||
if want := []string{"mesh-catalog.catalog-revision", "mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed", "mesh-conditions.findings-asked", "mesh-delivery-builder.build.ended.**", "mesh-delivery-view.settled", "mesh-recovery.ended", "mesh-recovery.restored", "node-engine.running", "restic.backed-up"}; !slices.Equal(m.Consumes, want) {
|
||||
if want := []string{"mesh-catalog.catalog-revision", "mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed", "mesh-conditions.findings-asked", "mesh-delivery-builder.build.ended.**", "mesh-delivery-view.settled", "mesh-recovery.ended", "mesh-recovery.restored", "node-engine.running", "node-packet-filter.allowances-changed", "restic.backed-up"}; !slices.Equal(m.Consumes, want) {
|
||||
t.Fatalf("consumes %v, want %v", m.Consumes, want)
|
||||
}
|
||||
// 774: the acts bucket mesh-host_acts is not declared as state for now: a declared state of a module with no account
|
||||
|
||||
Reference in New Issue
Block a user