$ istio-config-validator -t tests/ manifests/virtualservices/
Test summary:
- 3 testfiles, 3 configfiles
- 3 testcases with 24 inputs passed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main_test | |
import ( | |
"bytes" | |
"fmt" | |
"os" | |
"testing" | |
"github.com/stretchr/testify/require" | |
"github.com/vmware-labs/yaml-jsonpath/pkg/yamlpath" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/base64" | |
"fmt" | |
"log" | |
"log/slog" | |
"os" | |
"os/exec" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: auto-approve | |
on: pull_request | |
permissions: | |
pull-requests: write | |
jobs: | |
renovate-auto-approve: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor == 'renovate[bot]'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"constraints": { | |
"go": "1.20" | |
}, | |
"extends": [ | |
"config:base" | |
], | |
"enabledManagers": [ | |
"gomod" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"path/filepath" | |
policyv1 "k8s.io/api/policy/v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"context" | |
"fmt" | |
"log" | |
"os" | |
"strings" | |
"time" |
$ istio-config-validator -t tests/ manifests/virtualservices/
running test: customers endpoints pointing to users service
PASS input:[{awesome-api.getyourguide.com GET /customers/1 map[]}]
PASS input:[{awesome-api.getyourguide.com GET /customers map[]}]
PASS input:[{awesome-api.getyourguide.com OPTIONS /customers/1 map[]}]
PASS input:[{awesome-api.getyourguide.com OPTIONS /customers map[]}]
PASS input:[{awesome-api.getyourguide.com PUT /customers/1 map[]}]
PASS input:[{awesome-api.getyourguide.com PUT /customers map[]}]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: awesome-api | |
namespace: awesome-api | |
spec: | |
gateways: | |
- external/ingress-gateway | |
- mesh | |
hosts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testCases: | |
- description: customers endpoints pointing to users service | |
wantMatch: true | |
request: | |
authority: ["awesome-api.getyourguide.com"] | |
method: ["GET", "OPTIONS", "PUT"] | |
uri: ["/customers/1", "/customers"] | |
route: | |
- destination: | |
host: users.users.svc.cluster.local |
NewerOlder