Skip to content

Commit

Permalink
Added command execution
Browse files Browse the repository at this point in the history
  • Loading branch information
DeanDoyle1502 committed Aug 28, 2024
1 parent e226ff8 commit 9f3e886
Show file tree
Hide file tree
Showing 576 changed files with 272,513 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/tests/ossm/operator/version_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package operator

func TestVersion(t *testing.T) {
NewTest(t).Run(func(t TestHelper) {
t.Log("Test to verify helm chart version matches expected version")

operatorPod := pod.MatchingSelector("name=istio-operator", env.GetOperatorNamespace())

cmd := exec.Command("sh", "-c", "kubectl exec deploy/istio-operator -n "+env.GetOperatorNamespace()+" -- cat /usr/local/share/istio-operator/helm/v2.5/istio-control/istio-discovery/templates/deployment.yaml | grep maistra-version")
outputBytes, err := cmd.Output()
if err != nil{
t.Fatalf("Failed to execture command: %v", err)
}

output := string(outputBytes)

}

//kubectl exec deploy/istio-operator -- cat /usr/local/share/istio-operator/helm/v2.5/istio-control/istio-discovery/templates/deployment.yaml | grep maistra-version
4 changes: 4 additions & 0 deletions pkg/util/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,7 @@ func GetOutputDir() string {
func IsMetalLBInternalIPEnabled() bool {
return getenv("METALLB_INTERNAL_IP_ENABLED", "false") == "true"
}

func GetExpectedVersion() string {
return getenv("EXPECTED_VERSION", "")
}
3 changes: 3 additions & 0 deletions vendor/github.com/golang/protobuf/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/golang/protobuf/CONTRIBUTORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions vendor/github.com/golang/protobuf/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

324 changes: 324 additions & 0 deletions vendor/github.com/golang/protobuf/proto/buffer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9f3e886

Please sign in to comment.