File: run_list_test.go

package info (click to toggle)
golang-github-go-chef-chef 0.0.1%2Bgit20161023.60.deb8c38-1.2~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 372 kB
  • sloc: sh: 14; makefile: 7
file content (28 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package chef

import (
	. "github.com/smartystreets/goconvey/convey"
	"testing"
)

var (
	rl = RunList{"recipe[foo]", "recipe[baz]", "role[banana]"}
)

func TestNodeRunList(t *testing.T) {
	Convey("Node.RunList() should be a RunList", t, func() {
		So(rl, ShouldHaveSameTypeAs, RunList{})
	})

	Convey("Node.RunList() should be populated", t, func() {
		So(rl, ShouldContain, "recipe[foo]")
		So(rl, ShouldContain, "recipe[baz]")
		So(rl, ShouldContain, "role[banana]")
	})

	rl = RunList{}
	Convey("Empty RunList should be valid", t, func() {
		So(rl, ShouldBeEmpty)
	})

}