forked from Azure/aks-engine-azurestack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Openshift e2e tests * Make distro configurable * avoid patch version checks * make route test re-entrant * infer TENANT_ID from circleci env * enable openshift-3.9-rhel-e2e
- Loading branch information
1 parent
6f5c9a3
commit cbfabdb
Showing
14 changed files
with
416 additions
and
15 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
approvers: | ||
- jim-minter | ||
- kargakis | ||
- pweil- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package node | ||
|
||
import ( | ||
"errors" | ||
"fmt" | ||
"log" | ||
"os/exec" | ||
"regexp" | ||
"strings" | ||
) | ||
|
||
// Version returns the version of an OpenShift cluster. | ||
func Version() (string, error) { | ||
cmd := exec.Command("oc", "version") | ||
fmt.Printf("\n$ %s\n", strings.Join(cmd.Args, " ")) | ||
out, err := cmd.CombinedOutput() | ||
if err != nil { | ||
log.Printf("Error trying to run 'oc version':%s", string(out)) | ||
return "", err | ||
} | ||
exp := regexp.MustCompile(`(openshift\s)+(v\d+.\d+.\d+)+`) | ||
for _, line := range strings.Split(string(out), "\n") { | ||
if strings.HasPrefix(line, "openshift") { | ||
s := exp.FindStringSubmatch(line) | ||
return s[2], nil | ||
} | ||
} | ||
return "", errors.New("cannot find openshift version") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package openshift_test | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
|
||
"testing" | ||
) | ||
|
||
func TestOpenShift(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "OpenShift Suite") | ||
} |
Oops, something went wrong.