TestUpdateAgentProtectionWrongOwner: a config write keyed to a non-owner is a no-op that errors (tenant isolation at the store layer).
(t *testing.T)
| 161 | // TestUpdateAgentProtectionWrongOwner: a config write keyed to a non-owner is a |
| 162 | // no-op that errors (tenant isolation at the store layer). |
| 163 | func TestUpdateAgentProtectionWrongOwner(t *testing.T) { |
| 164 | store, ctx, agentID, _ := newProtectionAgent(t, "prot-owner") |
| 165 | cfg := identity.ProtectionConfig{ |
| 166 | InboundGatePolicy: "open", InboundGateAction: "flag", InboundScanSensitivity: "off", |
| 167 | OutboundGatePolicy: "open", OutboundGateAction: "flag", OutboundScanSensitivity: "off", |
| 168 | HITLTTLSeconds: 604800, HITLExpirationAction: "reject", |
| 169 | } |
| 170 | if err := store.UpdateAgentProtection(ctx, agentID, "someone-else", cfg); err == nil { |
| 171 | t.Fatal("expected error updating protection for non-owner, got nil") |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // TestProtectionSensitivityBackfill guards the migration-045 backfill: a pre-045 |
| 176 | // agent with scan='on' whose new sensitivity column defaulted to 'off' must be |
nothing calls this directly
no test coverage detected