Skip to content
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

GPII-3832 Modify universal's production tests so they are suitable to run in the cloud #814

Merged
merged 13 commits into from Sep 20, 2019

Conversation

@klown
Copy link
Contributor

commented Sep 3, 2019

Modifications to universal of its production configuration tests replacing all hard-coded host and/or port specifications with the environment variables defined in the vagrantCloudBasedContainers.sh script.

These changes are required for running the tests in GCP -- associated PR #347

JIRA: https://issues.gpii.net/browse/GPII-3832

@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 3, 2019

@klown klown changed the title GPII-3832 Run productions tests in the cloud GPII-3832 Modify universal's production tests so they are suitable to run in the cloud Sep 3, 2019
@@ -47,12 +47,14 @@ gpii.tests.productionConfigTesting.testDefs = fluid.transform(gpii.tests.develop
var testDef = fluid.extend(true, {}, testDefIn, {
name: "Flow Manager production tests",
config: gpii.tests.productionConfigTesting.config,
/* expect: 4,*/

This comment has been minimized.

Copy link
@cindyli

cindyli Sep 4, 2019

Contributor

This commented line can be removed.

@@ -75,6 +78,8 @@ gpii.tests.productionConfigTesting.testDefs = fluid.transform(gpii.tests.develop
return testDef;
});

fluid.log("gpii.tests.productionConfigTesting.testDefs[0].components = '" + JSON.stringify(gpii.tests.productionConfigTesting.testDefs[0].components, null, "\t") + "'");

This comment has been minimized.

Copy link
@cindyli

cindyli Sep 4, 2019

Contributor

Please remove this line for debugging.

This comment has been minimized.

Copy link
@klown

klown Sep 4, 2019

Author Contributor

Thanks for catching that.

Due to debugging these tests in GCP, I temporarily removed the login/logout tests. It looks like I only put those tests back in but didn't completely revert the expect property.

@@ -64,7 +64,7 @@ gpii.tests.productionConfigTesting.getPrefsSafeDoc = function (prefsSafeRequest,
prefsSafeRequest.options.path = "/gpii/prefsSafe-" + prefsSafeRequest.options.gpiiKey;
fluid.log("No Prefs Safe to retrieve for GPII key " + prefsSafeRequest.options.gpiiKey);
}
prefsSafeRequest.send(null, { port: 5984 });
prefsSafeRequest.send(null, { port: gpii.tests.productionConfigTesting.couchdbUrl.port });

This comment has been minimized.

Copy link
@cindyli

cindyli Sep 4, 2019

Contributor

As port: gpii.tests.productionConfigTesting.couchdbUrl.port has been specified in the definition of requests, such as here, is it still necessary to pass it at calling send()?

This comment has been minimized.

Copy link
@klown

klown Sep 5, 2019

Author Contributor

Yes, it is necessary. This issue came up previously for GPII-3333 and was discussed in that JIRA's related pull request.

@@ -96,7 +96,7 @@ fluid.defaults("gpii.tests.productionConfigTesting.deleteUserSettings", {
{
// remove the loaded GPII key "os_gnome" and its prefs safe
func: "{getOsGnomeKey}.send",
args: [null, { port: "5984" }]
args: [null, { port: gpii.tests.productionConfigTesting.couchdbUrl.port }]

This comment has been minimized.

Copy link
@cindyli

cindyli Sep 4, 2019

Contributor

Same as above. The same comment applies to changes below at line 114, 129, 136, 143, 150, 158, 165, 172, 179, 187, 202.

@@ -237,8 +237,9 @@ gpii.tests.productionConfigTesting.deleteTestRecordsFromDatabaseTests = [{
getOsGnomeKey: {
type: "kettle.test.request.http",
options: {
port: "5984",
hostname: "couchdb",
port: gpii.tests.productionConfigTesting.couchdbUrl.port,

This comment has been minimized.

Copy link
@cindyli

cindyli Sep 4, 2019

Contributor

It's probably worthwhile to create a base grade with options at line 240-242 and have all test requests based off this base grade as these options are repeated for all request definitions.

// Access token deletion requests
fluid.defaults("gpii.tests.cloud.oauth2.accessTokensDeleteRequests", {
gradeNames: ["fluid.component"],
components: {
getAccessTokensRequest: {
type: "kettle.test.request.http",
options: {
port: "5984",
hostname: "couchdb",
port: gpii.tests.productionConfigTesting.couchdbUrl.port,

This comment has been minimized.

Copy link
@cindyli

cindyli Sep 4, 2019

Contributor

Same as above. The base grade with couchdbUrl options probably can be shared by multiple production tests.

This comment has been minimized.

Copy link
@klown

klown Sep 5, 2019

Author Contributor

Okay done.
I also added a similar base cloudStatusRequest grade for CloudStatusProductionTests.js

@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 5, 2019

@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 5, 2019

@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 5, 2019

@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 18, 2019

@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 18, 2019

Modified the environment variables for the production tests to allow
different port values for local and cloud based flowmanagers.
@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 19, 2019

@gpii-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 20, 2019

@klown

This comment has been minimized.

Copy link
Contributor Author

commented Sep 20, 2019

Ready for review, @cindyli

@cindyli cindyli merged commit fbf2fa4 into GPII:master Sep 20, 2019
1 check passed
1 check passed
default Build finished.
Details
@cindyli

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2019

Merged at c3cc79b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.