summaryrefslogtreecommitdiffstats
path: root/sms-service/src
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-05-14 21:59:23 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2018-05-14 22:07:17 -0700
commit6c0bbee611e9e7ac0bdcfe5c95300de19f2b0b56 (patch)
tree008f3589b80a52147b817285df3c4709fdc8ad27 /sms-service/src
parent30cd384dd2ea48ad3be9c6595cc1b43fe2318e4a (diff)
fixing auth test
fixing auth test for auth.go auth is failing unit tests because of updated use of gettlsconfig Issue-ID: AAF-285 Change-Id: I96ec74adcce042aa411d834811881755f00b7ac7 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'sms-service/src')
-rw-r--r--sms-service/src/sms/auth/auth_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/sms-service/src/sms/auth/auth_test.go b/sms-service/src/sms/auth/auth_test.go
index cd11f85..dc9745b 100644
--- a/sms-service/src/sms/auth/auth_test.go
+++ b/sms-service/src/sms/auth/auth_test.go
@@ -24,11 +24,16 @@ import (
//Unit test to varify GetTLSconfig func and varify the tls config min version to be 771
//Assuming cert file name as auth_test.cert
func TestGetTLSConfig(t *testing.T) {
- _, err := GetTLSConfig("filedoesnotexist.cert")
+ _, err := GetTLSConfig("filedoesnotexist.cert", "filedoesnotexist.cert", "filedoesnotexist.cert")
if err == nil {
t.Errorf("Test failed, expected error but got none")
}
- tlsConfig, err := GetTLSConfig("../test/auth_test.cert")
+ tlsConfig, err := GetTLSConfig("../test/auth_test_certificate.pem",
+ "../test/auth_test_certificate.pem",
+ "../test/auth_test_key.pem")
+ if err != nil {
+ t.Fatal("Test Failed as GetTLSConfig returned error: " + err.Error())
+ }
expected := tls.VersionTLS12
actual := tlsConfig.MinVersion
if tlsConfig != nil {