-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run all integration test in parallel #1912
Changes from all commits
fbdb5bf
e9149cc
0855013
e2f6e5c
c2c976e
f04e72c
982a6a7
66c1632
ca0b9ef
fab19d1
3f9eaa4
78faa87
0efcd0f
c129b97
0909b8b
25be32f
499952c
9202ea9
922d9e2
4309755
6979970
e705819
ebc4639
82e078d
44053e9
36fd8f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,6 +268,10 @@ $ make test-source-e2e | |
|
||
* To run the tests sequentially or on single ginkgo test node use enviornment variable `TEST_EXEC_NODES`: | ||
+ | ||
|
||
NOTE: However the env variable `TEST_EXEC_NODES` can be used to increase or decrease any number of test node for parallel run depending on the resource allocated to the OpenShift cluster. Make sure that the `TEST_EXEC_NODES` value cannot be `0` or any `negative` value. | ||
+ | ||
|
||
Run component command integration tests | ||
+ | ||
---- | ||
|
@@ -354,14 +358,33 @@ $ make test-odo-login-e2e | |
|
||
NOTE: `make test-odo-login-e2e` doesn't honour environment variable `TEST_EXEC_NODES`. So by default it runs login and logout command integration test suite on a single ginkgo test node sequentially to avoid race conditions in a parallel run. | ||
|
||
* For the entire integration test suite: | ||
Entire integration tests suite can be run in parallel and sequentially separately: | ||
|
||
* To run entire integration tests spec in parallel (default: 2 ginkgo test node), on a test cluster: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also mention how someone can set the value to something other than 2 if it's relevant for their environment? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, i can put a note or a place where it fits better in the doc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
+ | ||
---- | ||
$ make test-integration-service-catalog | ||
---- | ||
+ | ||
|
||
---- | ||
$ make test-integration | ||
---- | ||
+ | ||
|
||
NOTE: `make test-integration` doesn't honour enviornment variable `TEST_EXEC_NODES`. So by default it runs the entire integration test suite on a single ginkgo test node sequentially. | ||
* To run entire integration tests spec sequentially or on single ginkgo test node use enviornment variable `TEST_EXEC_NODES`: | ||
+ | ||
---- | ||
$ TEST_EXEC_NODES=1 make test-integration-service-catalog | ||
---- | ||
+ | ||
|
||
---- | ||
$ TEST_EXEC_NODES=1 make test-integration | ||
---- | ||
+ | ||
|
||
NOTE: `make test-integration-service-catalog` includes only service and link tests and can be successfully validated only if the cluster has service catalog enabled. Whereas `make test-integration` includes tests except service, link, login tests and runs rest of the tests irrespective of service catalog status in the cluster. | ||
|
||
Similarly e2e (end to end) tests can be run in parallel and sequentially separately. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,18 +112,18 @@ func NewPreference() Preference { | |
// NewPreferenceInfo gets the PreferenceInfo from preference file and creates the preference file in case it's | ||
// not present | ||
func NewPreferenceInfo() (*PreferenceInfo, error) { | ||
configFile, err := getPreferenceFile() | ||
glog.V(4).Infof("The configFile is %+v", configFile) | ||
preferenceFile, err := getPreferenceFile() | ||
glog.V(4).Infof("The preference file is %+v", preferenceFile) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for fixing this! No more |
||
if err != nil { | ||
return nil, errors.Wrap(err, "unable to get odo config file") | ||
return nil, errors.Wrap(err, "unable to get odo preference file") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we also change https://github.com/openshift/odo/pull/1912/files#diff-5f21db40ee2e66f00f206912f4dddc2fR116 to write There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1, I am going to update it in the next commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
} | ||
|
||
c := PreferenceInfo{ | ||
Preference: NewPreference(), | ||
Filename: configFile, | ||
Filename: preferenceFile, | ||
} | ||
// if the config file doesn't exist then we dont worry about it and return | ||
if _, err = os.Stat(configFile); os.IsNotExist(err) { | ||
// if the preference file doesn't exist then we dont worry about it and return | ||
if _, err = os.Stat(preferenceFile); os.IsNotExist(err) { | ||
return &c, nil | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,9 @@ var _ = Describe("Core beta flow", func() { | |
oc = helper.NewOcRunner("oc") | ||
odo = "odo" | ||
|
||
project = helper.CreateRandProject() | ||
context = helper.CreateNewContext() | ||
os.Setenv("GLOBALODOCONFIG", filepath.Join(context, "config.yaml")) | ||
project = helper.CreateRandProject() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, what impact does this have whether we create a project earlier or later? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is just to make sure that the set global preference path is used in the project creation step though there is no validation done for it. But if you keep the project create step as it was then project creation step picks the default preference path (~/.odo/preference.yaml) and then the very next odo command start picking the preference path from newly set path. So i cleaned up this in all test file and later i will create some fresh spec where the validation will be done including all possible cases without duplicating the scenario. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for another discussion, but I think that |
||
}) | ||
|
||
AfterEach(func() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for explicitly adding this. Thanks!