Skip to content

Commit

Permalink
Changing to new schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
pubudu538 committed Sep 27, 2023
1 parent 637bdb9 commit 5e8eb26
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
38 changes: 19 additions & 19 deletions adapter/internal/oasparser/envoyconf/routes_with_clusters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ func TestCreateRoutesWithClustersWithExactAndRegularExpressionRules(t *testing.T
Name: "test-api-2",
},
Spec: v1alpha1.APISpec{
APIName: "test-api-2",
APIVersion: "2.0.0",
BasePath: "/test-api/2.0.0",
APIName: "test-api-2",
APIVersion: "2.0.0",
BasePath: "/test-api/2.0.0",
Production: []v1alpha1.EnvConfig{
{
HTTPRouteRefs: []string{
Expand Down Expand Up @@ -179,7 +179,7 @@ func TestGenerateAdapterInternalAPIForSpecificEnvironment(t *testing.T) {
assert.Equal(t, "dev", adapterInternalAPI.GetEnvironment(), "Environment is incorrect.")
}

func generateSampleAPI(apiName string, apiVersion string, apiContext string) synchronizer.APIState {
func generateSampleAPI(apiName string, apiVersion string, basePath string) synchronizer.APIState {

apiState := synchronizer.APIState{}
apiDefinition := v1alpha1.API{
Expand All @@ -188,9 +188,9 @@ func generateSampleAPI(apiName string, apiVersion string, apiContext string) syn
Name: apiName,
},
Spec: v1alpha1.APISpec{
APIDisplayName: apiName,
APIVersion: apiVersion,
Context: apiContext,
APIName: apiName,
APIVersion: apiVersion,
BasePath: basePath,
Production: []v1alpha1.EnvConfig{
{
HTTPRouteRefs: []string{
Expand Down Expand Up @@ -251,9 +251,9 @@ func TestCreateRoutesWithClustersWithMultiplePathPrefixRules(t *testing.T) {
Name: "test-api-1",
},
Spec: v1alpha1.APISpec{
APIName: "test-api",
APIVersion: "1.0.0",
BasePath: "/test-api/1.0.0",
APIName: "test-api",
APIVersion: "1.0.0",
BasePath: "/test-api/1.0.0",
Production: []v1alpha1.EnvConfig{
{
HTTPRouteRefs: []string{
Expand Down Expand Up @@ -398,9 +398,9 @@ func TestCreateRoutesWithClustersWithBackendTLSConfigs(t *testing.T) {
Name: "test-api-3",
},
Spec: v1alpha1.APISpec{
APIName: "test-api-3",
APIVersion: "1.0.0",
BasePath: "/test-api-3/1.0.0",
APIName: "test-api-3",
APIVersion: "1.0.0",
BasePath: "/test-api-3/1.0.0",
Production: []v1alpha1.EnvConfig{
{
HTTPRouteRefs: []string{
Expand Down Expand Up @@ -704,9 +704,9 @@ func TestCreateRoutesWithClustersDifferentBackendRefs(t *testing.T) {
Name: "test-api-different-backendrefs",
},
Spec: v1alpha1.APISpec{
APIName: "test-api-different-backendrefs",
APIVersion: "1.0.0",
BasePath: "/test-api-different-backendrefs/1.0.0",
APIName: "test-api-different-backendrefs",
APIVersion: "1.0.0",
BasePath: "/test-api-different-backendrefs/1.0.0",
Production: []v1alpha1.EnvConfig{
{
HTTPRouteRefs: []string{
Expand Down Expand Up @@ -794,9 +794,9 @@ func TestCreateRoutesWithClustersSameBackendRefs(t *testing.T) {
Name: "test-api-same-backendrefs",
},
Spec: v1alpha1.APISpec{
APIName: "test-api-same-backendrefs",
APIVersion: "1.0.0",
BasePath: "/test-api-same-backendrefs/1.0.0",
APIName: "test-api-same-backendrefs",
APIVersion: "1.0.0",
BasePath: "/test-api-same-backendrefs/1.0.0",
Production: []v1alpha1.EnvConfig{
{
HTTPRouteRefs: []string{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: api1
version: 1.0.0
context: /api1/1.0.0
basePath: /api1/1.0.0
type: REST
endpointConfigurations:
production:
Expand All @@ -10,6 +10,6 @@ endpointConfigurations:
operations:
- target: /get
verb: GET
authTypeEnabled: false
secured: false
- target: /get
verb: POST
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: api1
version: 1.0.0
context: /api1/1.0.0
basePath: /api1/1.0.0
type: REST
defaultVersion: true
environment: dev
Expand All @@ -12,6 +12,6 @@ endpointConfigurations:
operations:
- target: /get
verb: GET
authTypeEnabled: false
secured: false
- target: /get
verb: POST

0 comments on commit 5e8eb26

Please sign in to comment.