3
0

Fix store test codegen

This commit is contained in:
Denis Arh
2020-08-28 07:04:59 +02:00
parent e8049fe7aa
commit 68525e823b
3 changed files with 28 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ package tests
// This file is auto-generated.
//
// Template: pkg/codegen/assets/store_test_all.gen.go
// Template: pkg/codegen/assets/store_test_all.gen.go.tpl
// Definitions:
{{ range . }}
{{- if .Exported -}}
@@ -20,11 +20,9 @@ import (
func testAllGenerated(t *testing.T, s store.Storable) {
{{- range . }}
{{- if .Exported }}
// Run generated tests for {{ .Types.Base }}
t.Run({{ printf "%q" .Types.Base }}, func(t *testing.T) {
test{{ export .Types.Base }}(t, s)
})
{{ end -}}
// Run generated tests for {{ .Types.Base }}
t.Run({{ printf "%q" .Types.Base }}, func(t *testing.T) {
test{{ export .Types.Base }}(t, s)
})
{{ end -}}
}

View File

@@ -0,0 +1,12 @@
package tests
import (
"github.com/cortezaproject/corteza-server/store"
"testing"
)
func testComposeRecordValues(t *testing.T, s store.ComposeRecordValues) {
t.Run("RefLookup", func(t *testing.T) {
t.Skip("not implemented")
})
}

View File

@@ -2,7 +2,7 @@ package tests
// This file is auto-generated.
//
// Template: pkg/codegen/assets/store_test_all.gen.go
// Template: pkg/codegen/assets/store_test_all.gen.go.tpl
// Definitions:
// - store/actionlog.yaml
// - store/applications.yaml
@@ -77,6 +77,16 @@ func testAllGenerated(t *testing.T, s store.Storable) {
testComposePages(t, s)
})
// Run generated tests for ComposeRecordValues
t.Run("ComposeRecordValues", func(t *testing.T) {
testComposeRecordValues(t, s)
})
// Run generated tests for ComposeRecords
t.Run("ComposeRecords", func(t *testing.T) {
testComposeRecords(t, s)
})
// Run generated tests for Credentials
t.Run("Credentials", func(t *testing.T) {
testCredentials(t, s)