Skip to content

Commit

Permalink
Use yaml for test data
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Abdelrahman <[email protected]>
  • Loading branch information
MustafaSaber committed Aug 1, 2023
1 parent a3075d3 commit 8250265
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 44 deletions.
6 changes: 3 additions & 3 deletions dataclients/kubernetes/definitions/definitions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ func TestRouteGroupValidation(t *testing.T) {
kubernetestest.FixturesToTest(t, "testdata/validation")
}

func TestRouteGroupsValidationErrorWrapping(t *testing.T) {
data, err := os.ReadFile("testdata/errorwrapdata/routegroups.json")
func TestValidateRouteGroups(t *testing.T) {
data, err := os.ReadFile("testdata/errorwrapdata/routegroups.yaml")
require.NoError(t, err)

rgl, err := definitions.ParseRouteGroupsJSON(data)
rgl, err := definitions.ParseRouteGroupsYAML(data)
require.NoError(t, err)

err = definitions.ValidateRouteGroups(&rgl)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
items:
- apiVersion: zalando.org/v1
kind: RouteGroup
spec:
hosts:
- test.example.com
routes:
- filters:
- inlineContent("/foo")
- path: /foo
- apiVersion: zalando.org/v1
kind: RouteGroup
metadata:
name: rg1
spec:
hosts:
- test.example.com
routes:
- filters:
- inlineContent("/foo")
- path: /foo

0 comments on commit 8250265

Please sign in to comment.