Skip to content

Commit

Permalink
added test to verify issue 169 is also fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Mitchell authored and geofffranks committed Jul 7, 2017
1 parent 34a3cc1 commit 84c949d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
17 changes: 17 additions & 0 deletions assets/cartesian-product/can-be-grabbed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
meta:
fast-tests:
- isolation
slow-tests:
- integration
master-fast-tests:
(( cartesian-product "master-" meta.fast-tests "-tests" ))
master-slow-tests:
- (( concat "master-" meta.slow-tests.0 "-tests" ))

groups:
- name: master
jobs: (( grab
meta.master-fast-tests
meta.master-slow-tests
"master-dependencies-test"
"master-docker-build" ))
26 changes: 26 additions & 0 deletions cmd/spruce/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,32 @@ ips_with_port:
- 2.2.3.4:80
join_ips_with_port: 1.2.3.4:80,2.2.3.4:80
`)
})

Convey("Issue #169 - Cartesian Product should produce a []interface{}", func() {
os.Args = []string{"spruce", "merge", "../../assets/cartesian-product/can-be-grabbed.yml"}
stdout = ""
stderr = ""
main()
So(stderr, ShouldEqual, "")
So(stdout, ShouldEqual, `groups:
- jobs:
- master-isolation-tests
- master-integration-tests
- master-dependencies-test
- master-docker-build
name: master
meta:
fast-tests:
- isolation
master-fast-tests:
- master-isolation-tests
master-slow-tests:
- master-integration-tests
slow-tests:
- integration
`)
})
})
Expand Down

0 comments on commit 84c949d

Please sign in to comment.