github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/util/manifestparser/manifestparser_suite_test.go (about)

     1  package manifestparser_test
     2  
     3  import (
     4  	"io/ioutil"
     5  	"testing"
     6  
     7  	. "github.com/onsi/ginkgo"
     8  	. "github.com/onsi/gomega"
     9  	yaml "gopkg.in/yaml.v2"
    10  )
    11  
    12  func TestManifestparser(t *testing.T) {
    13  	RegisterFailHandler(Fail)
    14  	RunSpecs(t, "Manifest Parser Suite")
    15  }
    16  
    17  func WriteManifest(path string, manifest map[string]interface{}) {
    18  	body, err := yaml.Marshal(manifest)
    19  	Expect(err).ToNot(HaveOccurred())
    20  	err = ioutil.WriteFile(path, body, 0666)
    21  	Expect(err).ToNot(HaveOccurred())
    22  }