diff options
author | liamfallon <liam.fallon@est.tech> | 2019-05-22 02:38:32 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-05-22 02:38:32 +0000 |
commit | 3a228ca91c313990741ef6a537d9f9615a0e0215 (patch) | |
tree | 77049c4ea0d2892730656bceb259d7110f8282c7 /models-tosca/src/test/java/org/onap | |
parent | d5ed712cf50bcf270fed8cd597d78ff4ff9370a0 (diff) |
Fix name/version regexp in model keys
The regular expressions for checking names and versions
in policy key names and versions were not expressive enough
to restrict all error names and versions.
Issue-ID: POLICY-1777
Change-Id: I037eca051f6c7a9f1e7182150d40d8b8d906a75c
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-tosca/src/test/java/org/onap')
2 files changed, 4 insertions, 4 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java index 9487ed8aa..be5fa5dc3 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java @@ -311,8 +311,8 @@ public class LegacyProvider4LegacyGuardTest { }).hasMessage("policyVersion is marked @NonNull but is null"); assertThatThrownBy(() -> { - new LegacyProvider().deleteGuardPolicy(pfDao, "IDontExist", ""); - }).hasMessage("no policy found for policy: IDontExist:"); + new LegacyProvider().deleteGuardPolicy(pfDao, "IDontExist", "0"); + }).hasMessage("no policy found for policy: IDontExist:0"); createPolicyTypes(); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java index 17b912826..636063641 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java @@ -250,8 +250,8 @@ public class LegacyProvider4LegacyOperationalTest { }).hasMessage("policyVersion is marked @NonNull but is null"); assertThatThrownBy(() -> { - new LegacyProvider().deleteOperationalPolicy(pfDao, "IDontExist", ""); - }).hasMessage("no policy found for policy: IDontExist:"); + new LegacyProvider().deleteOperationalPolicy(pfDao, "IDontExist", "0"); + }).hasMessage("no policy found for policy: IDontExist:0"); createPolicyTypes(); |