11package tfgen
22
33import (
4- "github.com/stretchr/testify/require"
54 "testing"
5+
6+ "github.com/stretchr/testify/require"
67)
78
9+ //nolint:lll
810func TestPlainDocsParser (t * testing.T ) {
911 t .Parallel ()
1012
@@ -13,7 +15,6 @@ func TestPlainDocsParser(t *testing.T) {
1315 name string
1416 docFile DocFile
1517 expected []byte
16- g * Generator
1718 }
1819
1920 tests := []testCase {
@@ -47,13 +48,13 @@ func TestPlainDocsParser(t *testing.T) {
4748 }
4849}
4950
51+ //nolint:lll
5052func TestWriteInstallationInstructions (t * testing.T ) {
5153 t .Parallel ()
5254
5355 type testCase struct {
5456 // The name of the test case.
5557 name string
56- docFile DocFile
5758 goImportBasePath string
5859 packageName string
5960 expected string
@@ -65,9 +66,9 @@ func TestWriteInstallationInstructions(t *testing.T) {
6566 expected : "## Installation\n \n " +
6667 "The testcase provider is available as a package in all Pulumi languages:\n \n " +
6768 "* JavaScript/TypeScript: [`@pulumi/testcase`](https://www.npmjs.com/package/@pulumi/testcase)\n " +
68- "* Python: [`pulumi-testcase`](https://pypi.org/project/pulumi-testcase/)\n " + //TODO: get the Go mod version somehow :blood_sob:
69+ "* Python: [`pulumi-testcase`](https://pypi.org/project/pulumi-testcase/)\n " +
6970 "* Go: [`github.com/pulumi/pulumi-testcase/sdk/v3/go/pulumi-testcase`](https://github.com/pulumi/pulumi-testcase)\n " +
70- "* .NET: [`Pulumi.Testcase`](https://www.nuget.org/packages/Pulumi.Testcase)\n " + //TODO: use capitalized
71+ "* .NET: [`Pulumi.Testcase`](https://www.nuget.org/packages/Pulumi.Testcase)\n " +
7172 "* Java: [`com.pulumi/testcase`](https://central.sonatype.com/artifact/com.pulumi/testcase)\n \n " ,
7273 goImportBasePath : "github.com/pulumi/pulumi-testcase/sdk/v3/go/pulumi-testcase" ,
7374 packageName : "testcase" ,
@@ -76,7 +77,7 @@ func TestWriteInstallationInstructions(t *testing.T) {
7677 t .Run (tc .name , func (t * testing.T ) {
7778 t .Parallel ()
7879 actual := writeInstallationInstructions (tc .goImportBasePath , tc .packageName )
79- require .Equal (t , string ( tc .expected ) , actual )
80+ require .Equal (t , tc .expected , actual )
8081 })
8182}
8283
@@ -86,7 +87,6 @@ func TestWriteFrontMatter(t *testing.T) {
8687 type testCase struct {
8788 // The name of the test case.
8889 name string
89- docFile DocFile
9090 title string
9191 expected string
9292 }
@@ -115,7 +115,6 @@ func TestWriteIndexFrontMatter(t *testing.T) {
115115 type testCase struct {
116116 // The name of the test case.
117117 name string
118- docFile DocFile
119118 displayName string
120119 expected string
121120 }
@@ -125,7 +124,8 @@ func TestWriteIndexFrontMatter(t *testing.T) {
125124 displayName : "Testcase" ,
126125 expected : delimiter +
127126 "title: Testcase\n " +
128- "meta_desc: The Testcase provider for Pulumi can be used to provision any of the cloud resources available in Testcase.\n " +
127+ "meta_desc: The Testcase provider for Pulumi " +
128+ "can be used to provision any of the cloud resources available in Testcase.\n " +
129129 "layout: package\n " +
130130 delimiter ,
131131 }
0 commit comments