aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2018-08-28 11:39:58 +0800
committerLianhao Lu <lianhao.lu@intel.com>2018-08-28 11:46:01 +0800
commitf8d0bfddb5e9b5c0b8c949fe012da1aa5076cb42 (patch)
treee37b970b6a595f2718492b0730384e976b5f01bb /test/csit/tests
parentbfb3ea4aed9d1727338f475fab5349f07723aca5 (diff)
CSIT: new test cases for vnfsdk pkgtools
Added new test case for the new functionalities of vnfsdk pkgtools: - digest - signing with certificate Change-Id: I9eeee461ee6ee98053938e1213ac1796574b8fae Issue-ID: INT-638 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'test/csit/tests')
-rw-r--r--test/csit/tests/vnfsdk-pkgtools/tosca-metadata/create_validate_digest_signing.robot21
-rw-r--r--test/csit/tests/vnfsdk-pkgtools/tosca-metadata/csar/test.crt19
-rw-r--r--test/csit/tests/vnfsdk-pkgtools/tosca-metadata/test.key27
3 files changed, 67 insertions, 0 deletions
diff --git a/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/create_validate_digest_signing.robot b/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/create_validate_digest_signing.robot
new file mode 100644
index 000000000..470b7c31d
--- /dev/null
+++ b/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/create_validate_digest_signing.robot
@@ -0,0 +1,21 @@
+*** settings ***
+Library OperatingSystem
+
+
+*** Variables ***
+${csarpath} ${SCRIPTS}/../tests/vnfsdk-pkgtools/tosca-metadata/csar
+${keyfile} ${SCRIPTS}/../tests/vnfsdk-pkgtools/tosca-metadata/test.key
+${create_output} ${OUTPUT DIR}/test_signing.csar
+
+*** Test Cases ***
+Create CSAR package
+ [Documentation] Create CSAR package
+ ${output}= Run vnfsdk csar-create -d ${create_output} --manifest test_entry.mf --history ChangeLog.txt --tests Tests --licenses Licenses --certificate test.crt --privkey ${keyfile} ${csarpath} test_entry.yaml
+ Log ${output}
+ File Should Exist ${create_output}
+
+Validate CSAR package
+ [Documentation] Validate CSAR package
+ ${rc} ${output}= Run and Return RC And Output vnfsdk csar-validate ${create_output}
+ Should Be Equal As Integers ${rc} 0
+ Log ${output}
diff --git a/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/csar/test.crt b/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/csar/test.crt
new file mode 100644
index 000000000..63c85d4b4
--- /dev/null
+++ b/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/csar/test.crt
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAggCCQDrDujRIFtRTDANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJQ
+VDEPMA0GA1UECAwGTGlzYm9hMQ8wDQYDVQQHDAZMaXNib2ExFDASBgNVBAoMC0V4
+YW1wbGUgT3JnMCAXDTE4MDgyNDA2MjY1OVoYDzIxMTYwMjEyMDYyNjU5WjBdMQsw
+CQYDVQQGEwJQVDEPMA0GA1UECAwGTGlzYm9hMQ8wDQYDVQQHDAZMaXNib2ExFDAS
+BgNVBAoMC0V4YW1wbGUgT3JnMRYwFAYDVQQDDA0qLmV4YW1wbGUub3JnMIIBIjAN
+BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwVDDqoO+C5dxgi1nnky+D4qqVdFG
+mX3H4q6zFPUAkve3gElfttuDfbmN+OYCWhvKcjUN1Y2xjt+0aeRJVuQ+eumEX/1F
+76i2t9c66fWPtdZ0V8IuDc2ajNxbKiAwYrwVl3AS2tJ32psHRLvpmLoOVz9UXY0J
+rDwr274Z38wIqEGrUQ9hdOebEggeVu6Mv3pZUBYGGo9VX1/PTZguOaP85nC193Ux
+SJe2+KV6aoc0odiokFmWK2JJrNb8bMjrQcQqp86JMW1DHyon5sF6edTIilxgC+SH
+gapT5hZeoNnh3rAgHiWXF8ZOvho341s+7I78pbEtqCXNbF3VqikFlWmStQIDAQAB
+MA0GCSqGSIb3DQEBCwUAA4IBAQCh8CffE1amceKSb7USEfkpsDbNYo+IWMDyVo9g
+WQOYVIqIFGS8RMzs43Y6nIYJ/9pJUG10Qc4Yq1ZEqsV771Fz6WHx3zlJakVww/Ph
+CxbakjO3EzIHVjEWIu3sUfMdyOeF0ZDHDnfQZYWC17d2jE+s8rH2epl2h1jhi8fS
+i+eT2QDv8lHAM2mdM4jSwoCSsN7FImRxcYPoCxYwVkjVkmHhEMaUdqa1LKY/0YBf
+PFm0pVDCBJZZvKGql44eKiaY/GNW9IyzQFprT8V1rhD1fbTBFXghVGVaUi2Am3JD
++eZYMzd4rzFLZm8bjNm0Oler1UJSR1K91lOEig3M8FTN6JRE
+-----END CERTIFICATE-----
diff --git a/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/test.key b/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/test.key
new file mode 100644
index 000000000..06781d17e
--- /dev/null
+++ b/test/csit/tests/vnfsdk-pkgtools/tosca-metadata/test.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAwVDDqoO+C5dxgi1nnky+D4qqVdFGmX3H4q6zFPUAkve3gElf
+ttuDfbmN+OYCWhvKcjUN1Y2xjt+0aeRJVuQ+eumEX/1F76i2t9c66fWPtdZ0V8Iu
+Dc2ajNxbKiAwYrwVl3AS2tJ32psHRLvpmLoOVz9UXY0JrDwr274Z38wIqEGrUQ9h
+dOebEggeVu6Mv3pZUBYGGo9VX1/PTZguOaP85nC193UxSJe2+KV6aoc0odiokFmW
+K2JJrNb8bMjrQcQqp86JMW1DHyon5sF6edTIilxgC+SHgapT5hZeoNnh3rAgHiWX
+F8ZOvho341s+7I78pbEtqCXNbF3VqikFlWmStQIDAQABAoIBAEWZ+pjuDgLGaAvi
+pSgNoXCfEG0NiEnDS7CGDdxByg8gOWVrBZckudcOc9tllPs0flNYXr7A4Wj7ik2F
+8BHk48oFQa/91KxRJlhSmdeanj9uEz11oHc/y6FjxT8Jj+I8r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