INNER CODE UNIT · Go

TestGetProviderName

dikhan/terraform-provider-openapi · main_test.go:67

func TestGetProviderName(t *testing.T) {
	Convey("Given a valid pluginName with no version", t, func() {
		binaryName := "terraform-provider-goa"
		Convey("When getProviderName method is called", func() {
			providerName, err := getProviderName(binaryName)
			Convey("Then the error returned should be nil", func() {
				So(err, ShouldBeNil)
			})
			Convey("And the error message returned should be", func() {
				So(providerName, ShouldEqual, "goa")
			})
		})
	})
	Convey("Given a valid pluginName with correct version", t, func() {
		binaryName := "terraform-provider-goa_v1.0.0"
		Convey("When getProviderName method is called", func() {
			providerName, err := getProviderName(binaryName)
			Convey("Then the error returned should be nil", func() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…