Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
klaus_wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eteri
klaus_wendelin
Commits
50845fea
Commit
50845fea
authored
Apr 14, 2020
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up and extend test.
parent
0b457521
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
22 deletions
+8
-22
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.py
...Item/portal_components/test.erp5.testDataLakeIngestion.py
+5
-19
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.xml
...tem/portal_components/test.erp5.testDataLakeIngestion.xml
+3
-3
No files found.
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.py
View file @
50845fea
...
...
@@ -58,21 +58,6 @@ class TestDataIngestion(SecurityTestCase):
for
i
in
xrange
(
0
,
len
(
l
),
n
):
yield
l
[
i
:
i
+
n
]
def
getIngestionPolicy
(
self
,
reference
,
ingestion_script
):
ingestion_policy
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Ingestion Policy'
,
reference
=
reference
)
if
ingestion_policy
!=
None
:
return
ingestion_policy
ingestion_policy
=
self
.
portal
.
portal_ingestion_policies
.
newContent
(
\
id
=
reference
,
portal_type
=
'Ingestion Policy'
,
reference
=
reference
,
version
=
'001'
,
script_id
=
ingestion_script
)
ingestion_policy
.
validate
()
self
.
tic
()
return
ingestion_policy
def
getDataIngestion
(
self
,
reference
):
data_ingestion
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Data Ingestion'
,
...
...
@@ -142,14 +127,15 @@ class TestDataIngestion(SecurityTestCase):
data_stream_data
=
data_stream
.
getData
()
self
.
assertEqual
(
data_chunk
,
data_stream_data
)
# check Data Stream and Data Set
self
.
assertEqual
(
'validated'
,
data_stream
.
getValidationState
())
def
test_01_DefaultEbulkIngestion
(
self
):
"""
Test default ingestion with ebulk too.
"""
delimiter
=
","
extension
=
self
.
CSV
self
.
stepIngest
(
extension
,
delimiter
)
self
.
stepIngest
(
self
.
CSV
,
","
)
def
test_02_DefaultSplitIngestion
(
self
):
"""
...
...
@@ -191,4 +177,4 @@ class TestDataIngestion(SecurityTestCase):
# check resulting Data Stream
data_stream
=
self
.
getDataStream
(
ingestion_reference
)
self
.
assertEqual
(
data_chunk
,
data_stream
.
getData
())
\ No newline at end of file
self
.
assertEqual
(
data_chunk
,
data_stream
.
getData
())
bt5/erp5_wendelin_data_lake_ingestion/TestTemplateItem/portal_components/test.erp5.testDataLakeIngestion.xml
View file @
50845fea
...
...
@@ -46,9 +46,9 @@
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W:
108
, 4: Unused variable \'ingestion_id\' (unused-variable)
</string>
<string>
W:1
15
, 34: Unused variable \'i\' (unused-variable)
</string>
<string>
W:1
15
, 76: Unused variable \'j\' (unused-variable)
</string>
<string>
W:
93
, 4: Unused variable \'ingestion_id\' (unused-variable)
</string>
<string>
W:1
00
, 34: Unused variable \'i\' (unused-variable)
</string>
<string>
W:1
00
, 76: Unused variable \'j\' (unused-variable)
</string>
</tuple>
</value>
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment