Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/integration/diagnostic_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func Test_RenderDiagnosticSeverityOverrides_RouteRegexWarningAsError(t *testing.T) {
skipWhenKonnect(t)
_, err := render(
"testdata/render/005-diagnostics/route-regex.yaml",
"-E", "route-regex-path-format",
Expand All @@ -17,6 +18,7 @@ func Test_RenderDiagnosticSeverityOverrides_RouteRegexWarningAsError(t *testing.
}

func Test_RenderDiagnosticSeverityOverrides_OIDCSeverityOverrides(t *testing.T) {
skipWhenKonnect(t)
t.Run("defaults to hard error", func(t *testing.T) {
_, err := render("testdata/render/005-diagnostics/oidc-missing-config.yaml")
require.Error(t, err)
Expand Down Expand Up @@ -44,12 +46,14 @@ func Test_RenderDiagnosticSeverityOverrides_OIDCSeverityOverrides(t *testing.T)
}

func Test_RenderDiagnosticSeverityOverrides_DefaultWarningsRemainWarnings(t *testing.T) {
skipWhenKonnect(t)
output, err := render("testdata/render/005-diagnostics/route-regex.yaml")
require.NoError(t, err)
assert.Contains(t, output, "svc-route-regex")
}

func Test_RenderDiagnosticSeverityOverrides_InvalidCode(t *testing.T) {
skipWhenKonnect(t)
_, err := render(
"testdata/render/005-diagnostics/route-regex.yaml",
"-E", "not-a-real-code",
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/file_convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
)

func Test_FileConvert(t *testing.T) {
skipWhenKonnect(t)
tests := []struct {
name string
convertCmdSourceFormat string
Expand Down Expand Up @@ -75,6 +76,7 @@ func Test_FileConvert(t *testing.T) {
}

func Test_FileConvert_NoExpandEnvVars(t *testing.T) {
skipWhenKonnect(t)
tests := []struct {
name string
additionalArgs []string
Expand Down Expand Up @@ -124,6 +126,7 @@ func Test_FileConvert_NoExpandEnvVars(t *testing.T) {
}

func Test_FileConvert_28xTo34x(t *testing.T) {
skipWhenKonnect(t)
originalCwd, err := os.Getwd()
require.NoError(t, err)
defer func() {
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
)

func Test_LintPlain(t *testing.T) {
skipWhenKonnect(t)
tests := []struct {
name string
stateFile string
Expand Down Expand Up @@ -50,6 +51,7 @@ type lintErrors struct {
}

func Test_LintStructured(t *testing.T) {
skipWhenKonnect(t)
tests := []struct {
name string
stateFile string
Expand Down
1 change: 1 addition & 0 deletions tests/integration/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func Test_RenderPlain(t *testing.T) {
skipWhenKonnect(t)
tests := []struct {
name string
stateFile string
Expand Down
1 change: 1 addition & 0 deletions tests/integration/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func Test_Validate_Konnect(t *testing.T) {
}

func Test_Validate_File(t *testing.T) {
skipWhenKonnect(t)
setup(t)

tests := []struct {
Expand Down