Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Storage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
System
Storage
Commits
e128f4cf
Commit
e128f4cf
authored
5 months ago
by
Marc Burnie [AWS]
Browse files
Options
Downloads
Patches
Plain Diff
adding AWS acceptance test job definition and making corrections to documentation
parent
4c297849
No related branches found
No related tags found
2 merge requests
!957
adding AWS acceptance test job definition and making corrections to documentation
,
!952
Acceptance Testing for the One CI/CD Pipeline (New module)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
.gitlab-ci.yml
+20
-6
20 additions, 6 deletions
.gitlab-ci.yml
storage-acceptance-test/docs/README.md
+3
-3
3 additions, 3 deletions
storage-acceptance-test/docs/README.md
with
24 additions
and
9 deletions
.gitignore
+
1
−
0
View file @
e128f4cf
...
...
@@ -37,6 +37,7 @@ build/
### Integration tests ###
.gradle
**/allure-results/
### Environment Configuration ###
*.env
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
20
−
6
View file @
e128f4cf
...
...
@@ -34,6 +34,7 @@ variables:
IBM_HELM_DEPLOY_PATH
:
devops/ibm/ibm-storage-deploy
CORE_BUILD_SUBDIR
:
storage-core
ACCEPTANCE_TEST_DIR
:
"
storage-acceptance-test"
CORE_COVERAGE_THRESHOLD
:
"
80"
include
:
-
project
:
"
osdu/platform/ci-cd-pipelines"
...
...
@@ -253,15 +254,12 @@ core-acceptance-test:
needs
:
[
"
core-test"
]
variables
:
OPA_INTEGRATION_ENABLED
:
"
true"
CORE_TESTING_DIR
:
"
storage-acceptance-test"
CORE_TEST_PROJECT
:
"
storage-acceptance-test"
CORE_TEST_SUBDIR
:
"
storage-acceptance-test"
script
:
-
>
$MAVEN_BUILD . test-results.log
verify -DdisableXmlReport=true
--quiet
--file $
COR
E_TEST
ING
_DIR/pom.xml
--file $
ACCEPTANC
E_TEST_DIR/pom.xml
--update-snapshots
aws-acceptance-test
:
...
...
@@ -277,9 +275,25 @@ aws-acceptance-test:
-
!reference
[
.maven
,
before_script
]
-
!reference
[
.aws
,
before_script
]
-
!reference
[
.aws_variables
,
before_script
]
variables
:
OPA_INTEGRATION_ENABLED
:
"
true"
script
:
-
echo "This job is expected to fail"
-
exit
1
-
export GROUP_ID=$DOMAIN
-
export COGNITO_AUTH_TOKEN_URI=$(aws ssm get-parameter --name "/osdu/cognito/${COGNITO_NAME}/oauth/token-uri" --query Parameter.Value --output text --region $AWS_REGION)
-
export COGNITO_ALLOWED_SCOPES=$(aws ssm get-parameter --name "/osdu/cognito/${COGNITO_NAME}/oauth/allowed-scopes" --query Parameter.Value --output text --region $AWS_REGION)
-
export AWS_CLIENT_CREDENTIALS_CLIENT_ID=$(aws ssm get-parameter --name "/osdu/cognito/${COGNITO_NAME}/client/client-credentials/id" --query Parameter.Value --output text --region $AWS_REGION)
-
export AWS_CLIENT_CREDENTIALS_CLIENT_SECRET=$(aws secretsmanager get-secret-value --secret-id /osdu/cognito/${COGNITO_NAME}/client-credentials-secret --query SecretString --output json --region $AWS_REGION | sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' | jq -r '.client_credentials_client_secret')
-
export AWS_SERVICE_PRINCIPAL_AUTHORIZATION=$(echo -n "${AWS_CLIENT_CREDENTIALS_CLIENT_ID}:${AWS_CLIENT_CREDENTIALS_CLIENT_SECRET}" | base64)
-
export INTEGRATION_TESTER_TOKEN=$(aws cognito-idp initiate-auth --region ${AWS_REGION} --auth-flow ${AWS_COGNITO_AUTH_FLOW} --client-id ${AWS_COGNITO_CLIENT_ID} --auth-parameters USERNAME=${AWS_COGNITO_AUTH_PARAMS_USER},PASSWORD=${AWS_COGNITO_AUTH_PARAMS_PASSWORD} --query AuthenticationResult.AccessToken --output text)
-
export DATA_ROOT_TOKEN=$(curl --location ${COGNITO_AUTH_TOKEN_URI} --header "Content-Type:application/x-www-form-urlencoded" --header "Authorization:Basic ${AWS_SERVICE_PRINCIPAL_AUTHORIZATION}" --data-urlencode "grant_type=client_credentials" --data-urlencode ${COGNITO_ALLOWED_SCOPES} --http1.1 | jq -r '.access_token')
-
export NO_DATA_ACCESS_TOKEN=$(aws cognito-idp initiate-auth --region ${AWS_REGION} --auth-flow ${AWS_COGNITO_AUTH_FLOW} --client-id ${AWS_COGNITO_CLIENT_ID} --auth-parameters USERNAME=${AWS_COGNITO_AUTH_PARAMS_USER_NO_ACCESS},PASSWORD=${AWS_COGNITO_AUTH_PARAMS_PASSWORD} --query AuthenticationResult.AccessToken --output text)
-
>
$MAVEN_BUILD . test-results.log
verify -DdisableXmlReport=true
--quiet
--file $ACCEPTANCE_TEST_DIR/pom.xml
--update-snapshots
allow_failure
:
true
only
:
variables
:
...
...
This diff is collapsed.
Click to expand it.
storage-acceptance-test/docs/README.md
+
3
−
3
View file @
e128f4cf
...
...
@@ -5,7 +5,7 @@ You will need to have the following environment variables defined.
| name | value | description | sensitive? | source |
|---------------------------|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|------------|--------------------------------------------------------------|
|
`GROUP_ID`
| ex
`opendes-gc.projects.com`
| OSDU R2 to run tests under | no | - |
|
`LEGAL_URL`
| ex
`http://localh
s
ot:8080/api/legal/v1/`
| Legal API endpoint | no | - |
|
`LEGAL_URL`
| ex
`http://localho
s
t:8080/api/legal/v1/`
| Legal API endpoint | no | - |
|
`STORAGE_URL`
| ex
`http://localhost:8080/api/storage/v2/`
| Endpoint of storage service | no | - |
|
`TENANT_NAME`
| ex
`opendes`
| OSDU tenant used for testing | no | -- |
|
`ENTITLEMENTS_URL`
| ex
`http://localhost:8080/api/entitlements/v2/`
| Endpoint of entitlements service | no | - |
...
...
@@ -36,7 +36,7 @@ Feature testing is controlled with the following environment variables:
| name | value | description |
|---------------------------|-------------------|---------------------------------------------------------------------------|
|
`TEST_REPLAY_ENABLED`
|
`true`
OR
`false`
| Controls Replay API tests. |
|
`COLABORATION_ENABLED`
|
`true`
OR
`false`
| Controls collaboration feature tests. |
|
`COL
L
ABORATION_ENABLED`
|
`true`
OR
`false`
| Controls collaboration feature tests. |
|
`OPA_INTEGRATION_ENABLED`
|
`true`
OR
`false`
| Used to adjust assertions if integration with OPA
\P
olicy enabled
\d
isabled |
...
...
@@ -62,7 +62,7 @@ Execute following command to build code and run all the integration tests:
# Note: this assumes that the environment variables for integration tests as outlined
# above are already exported in your environment.
# build + install integration test core
$
(
cd
testing/storage-test-core/
&&
mvn clean
test
)
$
(
cd
storage-acceptance-test
&&
mvn clean
test
)
```
## License
...
...
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