Assert.assertEquals("14", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
Assert.assertEquals("pdf,zip,xml,pdf,tgz,xls", outputMap.get(ConfigTestConstant.ARTIFACT_EXT));
Assert.assertEquals("Base64,MD5", outputMap.get(ConfigTestConstant.ARTIFACT_ENC));
- Assert.assertEquals("@" + System.getenv("Path") + "/myschema.json",
+ Assert.assertEquals("@" + TestUtil.getenv(ConfigTestConstant.PATH) + "/myschema.json",
outputMap.get(ConfigTestConstant.ARTIFACT_XML_SCHEMA));
Assert.assertEquals("a-zA-Z_0-9", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_UPPER));
Assert.assertEquals("/opt/spool," + System.getProperty("user.home") + "/asdc",
List<String> locList = config.getAsStringValues(NAMESPACE, ConfigTestConstant.ARTIFACT_LOC);
Assert.assertEquals(expectedLocList, locList);
- Assert.assertEquals("@"+System.getenv("Path")+"/myschema.json",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_XML_SCHEMA));
+ Assert.assertEquals("@"+TestUtil.getenv(ConfigTestConstant.PATH)+"/myschema.json",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_XML_SCHEMA));
List<String> artifactConsumer = config.getAsStringValues(NAMESPACE, ConfigTestConstant.ARTIFACT_CONSUMER );
Assert.assertEquals(config.getAsStringValues(NAMESPACE, ConfigTestConstant.ARTIFACT_CONSUMER_APPC ), artifactConsumer);
public static final String ARTIFACT_NAME_MINLENGTH = "artifact.name.minlength";
public static final String ARTIFACT_ENCODED = "artifact.encoded";
+ public static final String PATH = "PATH";
public static final String ONBOARDING_NAMESPACE = "onboarding";
}
Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_JSON_SCHEMA ), "@GeneratorList.json");
- Assert.assertEquals("@"+System.getenv("Path")+"/myschema.json",config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_XML_SCHEMA));
+ Assert.assertEquals("@"+getenv(ConfigTestConstant.PATH)+"/myschema.json",config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_XML_SCHEMA));
List<String> artifactConsumer = config.getAsStringValues(nameSpace, ConfigTestConstant.ARTIFACT_CONSUMER );
Assert.assertEquals(config.getAsStringValues(nameSpace, ConfigTestConstant.ARTIFACT_CONSUMER_APPC ), artifactConsumer);
Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_MANDATORY_NAME ), "true");
Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_ENCODED ), "true");
}
+
+ /**
+ * This to make the behavior of tests consistent with "env:X" in configuration files
+ * when environment variable X is not defined.
+ */
+ public static String getenv(String name) {
+ String value = System.getenv(name);
+ return value == null ? "" : value;
+ }
}
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@${sys:user.home}/TestResources/GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=OPENECOMP:CLI
\ No newline at end of file
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@${sys:user.home}/TestResources/GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=OPENECOMP:CLIFallback
\ No newline at end of file
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=FallbackToGlobalNS
\ No newline at end of file
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=GlobalAndNSConfig
\ No newline at end of file
],
"persistLocation": "/opt/spool,${sys:user.home}/asdc",
"jsonSchema": "@GeneratorList.json",
- "xmlSchema": "@${env:path}/myschema.json",
+ "xmlSchema": "@${env:PATH}/myschema.json",
"consumerAPPC": "${artifact.consumer}"
},
"_config": {
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=LoadOrderConfiguration
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@${sys:user.home}/TestResources/GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=ModeAsConfigProp
\ No newline at end of file
artifact.name.allowedChar=a-zA-Z
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=NodeCLI
\ No newline at end of file
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=SourceLocation
\ No newline at end of file
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=UnregisterNotification
\ No newline at end of file
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=ValidateNodeConfig
\ No newline at end of file
<status>Deleted</status>
<persistLocation>/opt/spool,${sys:user.home}/asdc</persistLocation>
<jsonSchema>@GeneratorList.json</jsonSchema>
- <xmlSchema>@${env:path}/myschema.json</xmlSchema>
+ <xmlSchema>@${env:PATH}/myschema.json</xmlSchema>
<consumerAPPC>${artifact.consumer}</consumerAPPC>
</artifact>
<_config>
Deleted
persistLocation: "/opt/spool,${sys:user.home}/asdc"
jsonSchema: "@GeneratorList.json"
- xmlSchema: "@${env:path}/myschema.json"
+ xmlSchema: "@${env:PATH}/myschema.json"
consumerAPPC: "${artifact.consumer}"
_config:
namespace: YAMLConfig
\ No newline at end of file
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=javaProperties
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=OPENECOMP:tenancy
artifact.name.allowedChar=a-zA-Z
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=Telefonica:tenancy
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=Vodafone:tenancy
artifact.status=Deleted
artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
artifact.jsonSchema=@GeneratorList.json
-artifact.xmlSchema=@${env:path}/myschema.json
+artifact.xmlSchema=@${env:PATH}/myschema.json
artifact.consumerAPPC=${artifact.consumer}
_config.namespace=tenancy