Fix typos for kaasutils.parseTextForTestSchemas
PRODX-24628
Change-Id: Ice6422f6e1d0ebe273bc3ed6b164d3ad2a6cfda8
diff --git a/src/com/mirantis/mk/KaasUtils.groovy b/src/com/mirantis/mk/KaasUtils.groovy
index cd19a0a..26f0414 100644
--- a/src/com/mirantis/mk/KaasUtils.groovy
+++ b/src/com/mirantis/mk/KaasUtils.groovy
@@ -1007,11 +1007,11 @@
['KAAS_RELEASES_REFSPEC': '', 'KEY' : 'VAL']
**/
def parseTextForTestSchemas(Map opts) {
- String text = opts.get('text', '')
+ String text = opts.getOrDefault('text', '')
String keyLine = opts.getOrDefault('keyLine', '')
Map testScheme = [:]
if (!text || !keyLine) {
- return [:]
+ return testScheme
}
if (text =~ /\n$keyLine\n.*/) {
def common = new com.mirantis.mk.Common()
@@ -1027,4 +1027,5 @@
throw e
}
}
+ return testScheme
}
\ No newline at end of file