Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DescribeTest = func(g generator.Generator, box packr.Box) func() { return func() { ginkgo.It("should render correctly", func() { expectedCloudInit, err := box.Find("cloud-init") gomega.Expect(err).NotTo(gomega.HaveOccurred()) cloudInit, _, err := g.Generate(&generator.OperatingSystemConfig{ Files: []*generator.File{ { Path: "/foo", Content: []byte("bar"), Permissions: &onlyOwnerPerm, }, }, Units: []*generator.Unit{ { Name: "docker.service", Content: []byte("unit"), DropIns: []*generator.DropIn{ { Name: "10-docker-opts.conf", Content: []byte("override"), }, }, }, }, Bootstrap: true, }) gomega.Expect(err).NotTo(gomega.HaveOccurred()) gomega.Expect(cloudInit).To(gomega.Equal(expectedCloudInit)) }) } }
DescribeTest returns a function which can be used in tests for the template generator implementation. It receives an instance of a template generator and a packr Box with the test files to be used in the tests.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.