diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2022-03-01 10:54:33 -0600 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2022-03-01 16:19:18 -0600 |
commit | 515147480c8807219dc4cdff1cd7e178757196ba (patch) | |
tree | 3595a6c86e0757b85e7b820cc7a78a323ad66500 /feature-healthcheck/src/test/resources | |
parent | 4a9a11e170ebcc47ef20f7055184ce66f7994415 (diff) |
Add controllers and remote servers healthchecks
Issue-ID: POLICY-3977
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I4fd4db29f99989a2ef11b08f66f28535bfd15a36
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'feature-healthcheck/src/test/resources')
4 files changed, 147 insertions, 0 deletions
diff --git a/feature-healthcheck/src/test/resources/echo.drl b/feature-healthcheck/src/test/resources/echo.drl new file mode 100644 index 00000000..54847da9 --- /dev/null +++ b/feature-healthcheck/src/test/resources/echo.drl @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP + * ================================================================================ + * Copyright (C) 2022 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.drools.healthcheck; + +rule "INIT" +lock-on-active +when +then + insert(new String("I am up")); +end + +rule "ECHO" +when + $o : Object(); +then + System.out.println("ECHO: " + $o.toString()); +end diff --git a/feature-healthcheck/src/test/resources/echo.kmodule b/feature-healthcheck/src/test/resources/echo.kmodule new file mode 100644 index 00000000..7a1acc70 --- /dev/null +++ b/feature-healthcheck/src/test/resources/echo.kmodule @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + ONAP + ================================================================================ + Copyright (C) 2022 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> + <kbase name="onap.policies.drools.healthcheck"> + <ksession name="echo"/> + </kbase> +</kmodule> diff --git a/feature-healthcheck/src/test/resources/echo.pom b/feature-healthcheck/src/test/resources/echo.pom new file mode 100644 index 00000000..2f84f4bd --- /dev/null +++ b/feature-healthcheck/src/test/resources/echo.pom @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + ONAP + ================================================================================ + Copyright (C) 2022 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <groupId>org.onap.policy.drools.healthcheck</groupId> + <artifactId>echo</artifactId> + <!-- the version below is irrelevant --> + <version>1.0.0</version> +</project> diff --git a/feature-healthcheck/src/test/resources/feature-healthcheck.properties b/feature-healthcheck/src/test/resources/feature-healthcheck.properties new file mode 100644 index 00000000..63a71b6e --- /dev/null +++ b/feature-healthcheck/src/test/resources/feature-healthcheck.properties @@ -0,0 +1,55 @@ +# +# ============LICENSE_START======================================================= +# ONAP +# ================================================================================ +# Copyright (C) 2022 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +# + +http.server.services=HEALTHCHECK,LIVENESS + +http.server.services.HEALTHCHECK.host=localhost +http.server.services.HEALTHCHECK.userName=username +http.server.services.HEALTHCHECK.password=password +http.server.services.HEALTHCHECK.restClasses=org.onap.policy.drools.healthcheck.RestMockHealthCheck +http.server.services.HEALTHCHECK.filterClasses=org.onap.policy.drools.healthcheck.TestAafHealthCheckFilter +http.server.services.HEALTHCHECK.port=7777 + +http.server.services.LIVENESS.host=localhost +http.server.services.LIVENESS.port=7776 +http.server.services.LIVENESS.restClasses=org.onap.policy.drools.healthcheck.RestMockHealthCheck + +http.client.services=HEALTHCHECK,LIVENESS,UNAUTH,STUCK + +http.client.services.HEALTHCHECK.host=localhost +http.client.services.HEALTHCHECK.port=7777 +http.client.services.HEALTHCHECK.contextUriPath=healthcheck/test +http.client.services.HEALTHCHECK.userName=username +http.client.services.HEALTHCHECK.password=password + +http.client.services.LIVENESS.host=localhost +http.client.services.LIVENESS.port=7776 +http.client.services.LIVENESS.contextUriPath=healthcheck/test + +http.client.services.UNAUTH.host=localhost +http.client.services.UNAUTH.port=7777 +http.client.services.UNAUTH.contextUriPath=healthcheck/test + +http.client.services.STUCK.host=localhost +http.client.services.STUCK.port=7776 +http.client.services.STUCK.contextUriPath=healthcheck/stuck + +liveness.controllers=* +liveness.controllers.timeout=5 |