Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
hariso committed Nov 18, 2024
1 parent 2b4394a commit dabaf2e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions specgen/specgen/testdata/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,12 @@ func TestWriteAndCombine(t *testing.T) {

err = specgen.WriteAndCombine(specBytes, "./simple/existing_specs.yaml")
is.NoErr(err)

got, err := os.ReadFile("./simple/existing_specs.yaml")
is.NoErr(err)

want, err := os.ReadFile("./simple/want.yaml")
is.NoErr(err)

is.Equal("", cmp.Diff(got, want))
}
21 changes: 21 additions & 0 deletions specgen/specgen/testdata/simple/want.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "1.0"
specification:
name: "test connector name"
summary: "test connector summary"
description: "test connector description"
version: "v12.34.56"
author: "Acme"
source:
parameters:
- name: myInt
description: |-
MyInt has a block comment.
And it spans multiple lines.
type: int
default: ""
validations: []
- name: myString
description: MyString has a line comment.
type: string
default: ""
validations: []

0 comments on commit dabaf2e

Please sign in to comment.