Skip to content

Commit

Permalink
--wip-- [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad committed Sep 18, 2024
1 parent 6c0fe1c commit 1aee441
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Digdir.Domain.Dialogporten.Application.Common.Extensions.FluentValidation;
using Digdir.Domain.Dialogporten.Application.Common.Pagination;
using Digdir.Domain.Dialogporten.Application.Features.V1.Common.Localizations;
using Digdir.Domain.Dialogporten.Domain.Common;
using Digdir.Domain.Dialogporten.Domain.Localizations;
using Digdir.Domain.Dialogporten.Domain.Parties;
using Digdir.Domain.Dialogporten.Domain.Parties.Abstractions;
Expand Down Expand Up @@ -53,8 +54,8 @@ public SearchDialogQueryValidator()
RuleForEach(x => x.Status).IsInEnum();

RuleFor(x => x.Process)
.Must(x => Uri.IsWellFormedUriString(x, UriKind.Absolute))
.WithMessage("{PropertyName} must be a valid URI")
.IsValidUri()
.MaximumLength(Constants.DefaultMaxUriLength)
.When(x => x.Process is not null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
}
},
"LocalDevelopment": {
"UseLocalDevelopmentUser": true,
"UseLocalDevelopmentResourceRegister": true,
"UseLocalDevelopmentOrganizationRegister": true,
"UseLocalDevelopmentNameRegister": true,
"UseLocalDevelopmentAltinnAuthorization": true,
"UseLocalDevelopmentUser": false,
"UseLocalDevelopmentResourceRegister": false,
"UseLocalDevelopmentOrganizationRegister": false,
"UseLocalDevelopmentNameRegister": false,
"UseLocalDevelopmentAltinnAuthorization": false,
"UseLocalDevelopmentCloudEventBus": true,
"UseLocalDevelopmentCompactJwsGenerator": true,
"DisableShortCircuitOutboxDispatcher": true,
"DisableCache": true,
"DisableAuth": true
"DisableCache": false,
"DisableAuth": false
}
}
2 changes: 1 addition & 1 deletion tests/k6/tests/enduser/dialogSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default function () {
});

describe('List with invalid process filter', () => {
let r = getEU('dialogs/' + defaultFilter + '&process=??');
let r = getEU('dialogs/' + defaultFilter + '&process=inval|d');
expectStatusFor(r).to.equal(400);
expect(r, 'response').to.have.validJsonBody();
expect(r.json(), 'response json').to.have.property("errors");
Expand Down
2 changes: 1 addition & 1 deletion tests/k6/tests/serviceowner/dialogSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default function () {
});

describe('List with invalid process', () => {
let r = getSO('dialogs/?CreatedAfter=' + createdAfter + '&process=??');
let r = getSO('dialogs/?CreatedAfter=' + createdAfter + '&process=inval|d');
expectStatusFor(r).to.equal(400);
expect(r, 'response').to.have.validJsonBody();
expect(r.json(), 'response json').to.have.property("errors");
Expand Down

0 comments on commit 1aee441

Please sign in to comment.