Skip to content

Commit

Permalink
Merge pull request #108 from leapfrogtechnology/fix-test
Browse files Browse the repository at this point in the history
Fix parallel strategy test case and release.sh script
  • Loading branch information
samirsilwal authored Mar 16, 2021
2 parents 88da453 + 6ac6175 commit 26aaee4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
14 changes: 3 additions & 11 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,13 @@ bump() {
}

compare_and_release() {
## Compare the package.json file from two recent commits to master branch and export
## Compare the package.json file from published package to master branch and export
## value to NEXT variable if it differs.

# Get the second last commit from the master branch after merge.
previous_commit_hash=$(git rev-parse @~)

git fetch --all
git checkout ${previous_commit_hash}

old_version=$(cat package.json | jq -r ".version")
old_version=$(npm show @leapfrogtechnology/sync-db version)

printfln "Old package version: ${old_version}"

git checkout master

new_version=$(cat package.json | jq -r ".version")

printfln "New package version: ${new_version}"
Expand All @@ -76,7 +68,7 @@ compare_and_release() {
git config --global user.name "Travis CI"

git add CHANGELOG.md
git commit -v --edit -m "${NEXT} Release :tada: :fireworks: :bell:" -m "[skip ci]"
git commit -v -m "${NEXT} Release :tada: :fireworks: :bell:" -m "[skip ci]"

git remote rm origin
# Add new "origin" with access token in the git URL for authentication
Expand Down
4 changes: 2 additions & 2 deletions test/unit/service/execution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ describe('SERVICE: execution', () => {
execution: 'parallel'
} as Configuration);

expect(result).to.deep.equal(['Task A', 'Task B', 'Task C', 'Task D']);
expect(tracker).to.deep.equal(['Task C', 'Task D', 'Task A', 'Task B']);
expect(result).to.include.members(['Task A', 'Task B', 'Task C', 'Task D']);
expect(tracker).to.include.members(['Task C', 'Task D', 'Task A', 'Task B']);
});

it('should throw an error if unknown strategy is provided.', () => {
Expand Down

0 comments on commit 26aaee4

Please sign in to comment.