Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Schema
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
Schema
Commits
1d8c25e7
Commit
1d8c25e7
authored
2 years ago
by
Aleh Shubko [EPAM]
Browse files
Options
Downloads
Plain Diff
Merge branch 'gasatryan/fix_cache_testing' into 'master'
fix integration tests See merge request
!340
parents
5bf7e985
1cb9873c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!340
fix integration tests
Pipeline
#123798
passed
2 years ago
Stage: build
Stage: coverage
Stage: scan
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
provider/schema-aws/src/test/java/org/opengroup/osdu/schema/provider/aws/mongo/util/ParentUtil.java
+9
-0
9 additions, 0 deletions
...group/osdu/schema/provider/aws/mongo/util/ParentUtil.java
with
9 additions
and
0 deletions
provider/schema-aws/src/test/java/org/opengroup/osdu/schema/provider/aws/mongo/util/ParentUtil.java
+
9
−
0
View file @
1d8c25e7
...
...
@@ -5,9 +5,11 @@ import org.junit.Rule;
import
org.junit.rules.ExternalResource
;
import
org.mockito.Mockito
;
import
org.mockito.MockitoAnnotations
;
import
org.opengroup.osdu.core.aws.partition.PartitionInfoAws
;
import
org.opengroup.osdu.core.aws.partition.PartitionServiceClientWithCache
;
import
org.opengroup.osdu.core.common.http.DpsHeaderFactory
;
import
org.opengroup.osdu.core.common.logging.JaxRsDpsLog
;
import
org.opengroup.osdu.core.common.partition.Property
;
import
org.opengroup.osdu.schema.constants.SchemaConstants
;
import
org.opengroup.osdu.schema.provider.interfaces.authorization.IAuthorizationServiceForServiceAdmin
;
import
org.opengroup.osdu.schema.provider.interfaces.schemastore.ISchemaStore
;
...
...
@@ -18,6 +20,8 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import
org.springframework.data.mongodb.core.convert.MappingMongoConverter
;
import
org.springframework.test.annotation.DirtiesContext
;
import
static
org
.
mockito
.
ArgumentMatchers
.
anyString
;
@DirtiesContext
(
classMode
=
DirtiesContext
.
ClassMode
.
AFTER_CLASS
)
public
abstract
class
ParentUtil
{
public
static
final
String
DATA_PARTITION
=
"osdu_schema"
;
...
...
@@ -39,6 +43,11 @@ public abstract class ParentUtil {
public
void
setUpAnyTime
()
{
MockitoAnnotations
.
openMocks
(
this
);
Mockito
.
when
(
headers
.
getPartitionId
()).
thenReturn
(
DATA_PARTITION
);
PartitionInfoAws
partitionInfoAws
=
new
PartitionInfoAws
();
Property
tenantIdProperty
=
new
Property
();
tenantIdProperty
.
setValue
(
DATA_PARTITION
);
partitionInfoAws
.
setTenantIdProperty
(
tenantIdProperty
);
Mockito
.
when
(
partitionServiceClient
.
getPartition
(
anyString
())).
thenReturn
(
partitionInfoAws
);
}
...
...
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