Allow deleting settled autoscaling policies

This commit is contained in:
2026-10-06 23:41:37 -04:00
parent 285279ee6d
commit 34648b34e0
7 changed files with 131 additions and 5 deletions
+2
View File
@@ -89,6 +89,8 @@ it('revokes a delivered removal on policy pause without claiming it was undone',
expect(s.db().prepare('SELECT owns_map FROM autoscaling_policies').get()).toEqual({ owns_map: 1 });
expect(s.db().prepare('SELECT state FROM server_deployments WHERE id=?').get(s.operationId)).toEqual({ state: 'running' });
expect(s.scaling.scalingReport().policies[0]).toMatchObject({ ownsMap: true, unsettled: [{ id: s.operationId, state: 'running' }] });
expect(() => s.scaling.deleteScaling(s.policy.id, s.scaling.getScalingPolicy(s.policy.id)!.revision)).toThrow('outstanding Provisioning');
expect(s.db().prepare('SELECT COUNT(*) AS n FROM autoscaling_authorizations WHERE policy_id=?').get(s.policy.id)).toEqual({ n: 1 });
});
it('withdraws undelivered commands and reconciles invalidation without a retry or failure pause', async () => {