From 5524f17c724bddb498877dd7dad7be912278e40b Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 8 Oct 2019 22:54:39 -0700 Subject: [PATCH] added generic type. ensure it'll be created correctly. --- pkg/engine/factory_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/engine/factory_test.go b/pkg/engine/factory_test.go index de6622d..db7e936 100644 --- a/pkg/engine/factory_test.go +++ b/pkg/engine/factory_test.go @@ -110,6 +110,19 @@ func (suite *FactoryTestSuite) TestCreate_Ruby() { require.NotNil(suite.T(), testEngine) } +func (suite *FactoryTestSuite) TestCreate_Generic() { + //setup + suite.Config.EXPECT().SetDefault(gomock.Any(), gomock.Any()).MinTimes(1) + + //test + testEngine, cerr := engine.Create("generic", suite.PipelineData, suite.Config, suite.Scm) + + //assert + require.NoError(suite.T(), cerr) + require.NotNil(suite.T(), testEngine) +} + + // In order for 'go test' to run this suite, we need to create // a normal test function and pass our suite to suite.Run func TestFactoryTestSuite(t *testing.T) {