(t *testing.T)
| 140 | } |
| 141 | |
| 142 | func TestModifyMessageLabels_WrongAgent(t *testing.T) { |
| 143 | pool := testutil.TestDB(t) |
| 144 | store := identity.NewStore(pool) |
| 145 | ctx := context.Background() |
| 146 | |
| 147 | msgID, _ := labelsTestSetup(t, store, "labels-wrong-a") |
| 148 | _, otherAgentID := labelsTestSetup(t, store, "labels-wrong-b") |
| 149 | |
| 150 | // agent B's id must NOT be able to mutate agent A's message. |
| 151 | _, err := store.ModifyMessageLabels(ctx, msgID, otherAgentID, []string{"x"}, nil) |
| 152 | if !errors.Is(err, identity.ErrMessageNotFound) { |
| 153 | t.Errorf("err = %v, want ErrMessageNotFound (cross-agent must look like not-found)", err) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func TestGetMessagesByAgent_LabelsFilterANDMatch(t *testing.T) { |
| 158 | pool := testutil.TestDB(t) |
nothing calls this directly
no test coverage detected