aboutsummaryrefslogtreecommitdiffstats
path: root/profiles/http/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/http/src/test')
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoaderTest.java32
-rw-r--r--profiles/http/src/test/resources/sample-test-schema-http.yaml2
2 files changed, 34 insertions, 0 deletions
diff --git a/profiles/http/src/test/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoaderTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoaderTest.java
new file mode 100644
index 00000000..a6fbe9ab
--- /dev/null
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoaderTest.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2020 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+
+package org.onap.cli.fw.http.schema;
+
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class OnapCommandSchemaHttpLoaderTest {
+ @Test
+ public void validateHttpSccessCodesTest(){
+ List<String> errorList= new ArrayList<>();
+ List<Object> requestSuccessCodes=new ArrayList<>();
+ requestSuccessCodes.add("101");
+ OnapCommandSchemaHttpLoader.validateHttpSccessCodes(errorList,requestSuccessCodes);
+ }
+}
diff --git a/profiles/http/src/test/resources/sample-test-schema-http.yaml b/profiles/http/src/test/resources/sample-test-schema-http.yaml
index c78dcea4..ad25c155 100644
--- a/profiles/http/src/test/resources/sample-test-schema-http.yaml
+++ b/profiles/http/src/test/resources/sample-test-schema-http.yaml
@@ -89,6 +89,8 @@ http:
method: POST
body: '{"serviceName":"${service-name}","version":"${service-version}","url":"${service-url}","protocol":"REST","visualRange":"1","lb_policy":"hash","nodes":[{"ip":"${node-ip}","port":"${node-port}","ttl":0}]}'
headers:
+ context:
+ remove_empty_node: true
queries:
createOrUpdate: ${create-or-update}
success_codes: