Skip to content

Commit 3984c03

Browse files
authored
Create data sources during tests. (#30)
This change adds the creation of data sources. It does not handle their deletion, as the project gets deleted at the end of the run anyway, dropping data sources in the process.
1 parent e6500b9 commit 3984c03

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

minder-tests/api-history.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Test Teardown Default Teardown
1515
Default Setup
1616
Set Project as Environment Variable with Test Name
1717
Ruletypes are ready
18+
Datasources are created
1819
Ruletypes are created
1920
${MINDER_TEST_ORG}= Get Environment Variable MINDER_TEST_ORG
2021
Set Suite Variable $MINDER_TEST_ORG

minder-tests/api-profiles.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Test Teardown Default Teardown
2323
Default Setup
2424
Set Project as Environment Variable with Test Name
2525
Ruletypes are ready
26+
Datasources are created
2627
Ruletypes are created
2728

2829
Default Teardown

resources/keywords.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Create Ruletypes
2626
2727
Given I Am Logged Into Minder
2828
Given Ruletypes Are Ready
29+
When Datasources Are Created
2930
When Ruletypes Are Created
3031

3132
Delete Ruletypes

resources/ruletypes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ def all_ruletypes_are_deleted(self):
4141
"""
4242
logger.info(minder.ruletype.delete("--all", "--yes"))
4343

44+
@keyword
45+
def datasources_are_created(self):
46+
"""
47+
Ensure that we have the datasources repository.
48+
"""
49+
datasources = os.path.join(self.path, "data-sources")
50+
minder.datasource.create(f=datasources)
51+
4452
def _clone_ruletypes_from_github(self):
4553
"""
4654
Clone the ruletypes repository from GitHub.

0 commit comments

Comments
 (0)