This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3670 from alexmay48/alexmay48/new-workflow-metada…
…ta-endpoint New workflow metadata endpoint
- Loading branch information
Showing
13 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,6 +166,36 @@ class CassandraMetadataDAOSpec extends CassandraSpec { | |
|
||
} | ||
|
||
def "Get All WorkflowDef"() { | ||
when: | ||
metadataDAO.removeWorkflowDef("workflow_def_1", 1) | ||
WorkflowDef workflowDef = new WorkflowDef() | ||
workflowDef.setName("workflow_def_1") | ||
workflowDef.setVersion(1) | ||
workflowDef.setOwnerEmail("[email protected]") | ||
metadataDAO.createWorkflowDef(workflowDef) | ||
|
||
workflowDef.setName("workflow_def_2") | ||
metadataDAO.createWorkflowDef(workflowDef) | ||
workflowDef.setVersion(2) | ||
metadataDAO.createWorkflowDef(workflowDef) | ||
|
||
workflowDef.setName("workflow_def_3") | ||
workflowDef.setVersion(1) | ||
metadataDAO.createWorkflowDef(workflowDef) | ||
workflowDef.setVersion(2) | ||
metadataDAO.createWorkflowDef(workflowDef) | ||
workflowDef.setVersion(3) | ||
metadataDAO.createWorkflowDef(workflowDef) | ||
|
||
then: // fetch the workflow definition | ||
def allDefsLatestVersions = metadataDAO.getAllWorkflowDefsLatestVersions() | ||
Map<String, WorkflowDef> allDefsMap = allDefsLatestVersions.collectEntries {wfDef -> [wfDef.getName(), wfDef]} | ||
allDefsMap.get("workflow_def_1").getVersion() == 1 | ||
allDefsMap.get("workflow_def_2").getVersion() == 2 | ||
allDefsMap.get("workflow_def_3").getVersion() == 3 | ||
} | ||
|
||
def "parse index string"() { | ||
expect: | ||
def pair = metadataDAO.getWorkflowNameAndVersion(nameVersionStr) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters