Adds unit tests for all services

This commit is contained in:
2026-01-14 16:54:06 -05:00
parent d8930a6a30
commit a3317dd46f
59 changed files with 12592 additions and 8683 deletions

View File

@@ -9,27 +9,24 @@ import { RequestContext } from '../_context/request.context';
type QueryParams = {
AttributeName: string;
AttributeValue: string;
TopicArn: string;
}
SubscriptionArn: string;
};
@Injectable()
export class SetSubscriptionAttributesHandler extends AbstractActionHandler<QueryParams> {
constructor(
private readonly attributeService: AttributesService,
) {
constructor(private readonly attributeService: AttributesService) {
super();
}
format = Format.Xml;
action = Action.SnsSetSubscriptionAttributes;
validator = Joi.object<QueryParams, true>({
validator = Joi.object<QueryParams, true>({
AttributeName: Joi.string().required(),
AttributeValue: Joi.string().required(),
TopicArn: Joi.string().required(),
SubscriptionArn: Joi.string().required(),
});
protected async handle({ AttributeName, AttributeValue, TopicArn }: QueryParams, { awsProperties} : RequestContext) {
await this.attributeService.create({ name: AttributeName, value: AttributeValue, arn: TopicArn });
protected async handle({ AttributeName, AttributeValue, SubscriptionArn }: QueryParams, { awsProperties }: RequestContext) {
await this.attributeService.create({ name: AttributeName, value: AttributeValue, arn: SubscriptionArn });
}
}