Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
quant
Commits
39f21c05
Commit
39f21c05
authored
1 year ago
by
Neil-Jocelyn Schark
Browse files
Options
Downloads
Patches
Plain Diff
add other akms-simulator test
parent
c359ef67
No related branches found
No related tags found
3 merge requests
!71
Draft: Resolve "Create DB connection instead of using memory only"
,
!66
Resolve "Enable TLS between KMS"
,
!49
Improve general project repo (Tests, etc.)
Pipeline
#186728
passed
1 year ago
Stage: build
Stage: test
Stage: analyze
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
integration-tests/code/getKSAKeyTest/getKSA_key_test.go
+31
-1
31 additions, 1 deletion
integration-tests/code/getKSAKeyTest/getKSA_key_test.go
with
32 additions
and
1 deletion
.gitlab-ci.yml
+
1
−
0
View file @
39f21c05
...
@@ -73,6 +73,7 @@ integration-test-kms:
...
@@ -73,6 +73,7 @@ integration-test-kms:
INTEGRATION_TEST_KMS1_URL
:
kms_1:7030
INTEGRATION_TEST_KMS1_URL
:
kms_1:7030
INTEGRATION_TEST_KMS2_URL
:
kms_2:7030
INTEGRATION_TEST_KMS2_URL
:
kms_2:7030
INTEGRATION_TEST_KMS1_AKMS_URL
:
kms_1:9696
INTEGRATION_TEST_KMS1_AKMS_URL
:
kms_1:9696
INTEGRATION_TEST_LOG_FILE_URL
:
akms-simulator_1:4444
INTEGRATION_TEST_LOG_FILE_URL
:
akms-simulator_2:4444
INTEGRATION_TEST_LOG_FILE_URL
:
akms-simulator_2:4444
services
:
services
:
-
name
:
$IMAGE_PATH/akms-simulator:$CI_COMMIT_REF_SLUG
-
name
:
$IMAGE_PATH/akms-simulator:$CI_COMMIT_REF_SLUG
...
...
This diff is collapsed.
Click to expand it.
integration-tests/code/getKSAKeyTest/getKSA_key_test.go
+
31
−
1
View file @
39f21c05
...
@@ -44,11 +44,16 @@ func TestGetKSAKey(t *testing.T) {
...
@@ -44,11 +44,16 @@ func TestGetKSAKey(t *testing.T) {
if
kms1AkmsURL_ENV
!=
""
{
if
kms1AkmsURL_ENV
!=
""
{
kms1AkmsURL
=
kms1AkmsURL_ENV
kms1AkmsURL
=
kms1AkmsURL_ENV
}
}
logFileURL
:=
"127.0.0.1:444
5
"
logFileURL
:=
"127.0.0.1:444
4
"
logFileURL_ENV
:=
os
.
Getenv
(
"INTEGRATION_TEST_LOG_FILE_URL"
)
logFileURL_ENV
:=
os
.
Getenv
(
"INTEGRATION_TEST_LOG_FILE_URL"
)
if
logFileURL_ENV
!=
""
{
if
logFileURL_ENV
!=
""
{
logFileURL
=
logFileURL_ENV
logFileURL
=
logFileURL_ENV
}
}
logFileURL2
:=
"127.0.0.1:4445"
logFileURL_ENV2
:=
os
.
Getenv
(
"INTEGRATION_TEST_LOG_FILE_URL"
)
if
logFileURL_ENV2
!=
""
{
logFileURL2
=
logFileURL_ENV2
}
output
,
err
:=
integration_test_utils
.
GnmicCommand
(
kms2URL
,
"set"
,
"--update-path"
,
"key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]"
,
"--update-file"
,
"../../config/kms/kms_2.json"
)
output
,
err
:=
integration_test_utils
.
GnmicCommand
(
kms2URL
,
"set"
,
"--update-path"
,
"key-routing-sessions/routing-sessions[path-id=38e0588b-6a2d-42c9-85a0-887cc877c299]"
,
"--update-file"
,
"../../config/kms/kms_2.json"
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -101,4 +106,29 @@ func TestGetKSAKey(t *testing.T) {
...
@@ -101,4 +106,29 @@ func TestGetKSAKey(t *testing.T) {
assert
.
Equal
(
t
,
1
,
len
(
logFile
.
Body
.
KSAKeys
))
assert
.
Equal
(
t
,
1
,
len
(
logFile
.
Body
.
KSAKeys
))
assert
.
NotNil
(
t
,
logFile
.
Body
.
KSAKeys
[
0
]
.
KeyID
)
assert
.
NotNil
(
t
,
logFile
.
Body
.
KSAKeys
[
0
]
.
KeyID
)
assert
.
NotNil
(
t
,
logFile
.
Body
.
KSAKeys
[
0
]
.
Key
)
assert
.
NotNil
(
t
,
logFile
.
Body
.
KSAKeys
[
0
]
.
Key
)
resp
,
err
=
http
.
Get
(
"http://"
+
logFileURL2
+
"/debug/get_log_file"
)
if
err
!=
nil
{
t
.
Errorf
(
"Error making HTTP request: %s"
,
err
)
return
}
defer
resp
.
Body
.
Close
()
body
,
err
=
ioutil
.
ReadAll
(
resp
.
Body
)
if
err
!=
nil
{
t
.
Errorf
(
"Error reading response body: %s"
,
err
)
return
}
err
=
json
.
Unmarshal
(
body
,
&
logFile
)
if
err
!=
nil
{
t
.
Errorf
(
"Error parsing body into PushKSAKeyRequest: %s"
,
err
)
return
}
assert
.
NotNil
(
t
,
logFile
.
Source
)
assert
.
Equal
(
t
,
"request_ID-1234"
,
logFile
.
Body
.
RequestID
)
assert
.
Equal
(
t
,
"request_ID-1234"
,
logFile
.
Body
.
ProcessID
)
assert
.
Equal
(
t
,
1
,
len
(
logFile
.
Body
.
KSAKeys
))
assert
.
NotNil
(
t
,
logFile
.
Body
.
KSAKeys
[
0
]
.
KeyID
)
assert
.
NotNil
(
t
,
logFile
.
Body
.
KSAKeys
[
0
]
.
Key
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment