New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 629355 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Enterprise Autotest Refactor: Make the two existing base classes have obvious purposes

Project Member Reported by kathrelk...@chromium.org, Jul 19 2016

Issue description

Give enterprise_base.py and enterprise_policy_base.py well defined purposes
    - Move all DMServer functions to enterprise_base.
    - Remove duplicate functions, such as the login function in enterprise_base.py
    - Make enterprise_base.py be a utility class instead of a base class?

Group functions in enterprise_policy_base with similar purpose
    - E.g. setup functions, policy blob functions, implementation functions, etc.

 
Labels: OS-Chrome
Owner: krishna...@chromium.org
Decouple enterprise_base and enterprise_policy base:
Summary: Create a new fake_dm_server.py that will replace the existing enterprise_base.py.

Will be breaking up this effort into the following CLs
1) Create a copy of the enterprise_base.py called fake_dm_server.py 
2) Convert the fake_dm_server.py to an utility class and update the corresponding methods/interfaces for compatibility with the enterprise_policy_base.py.
3) Add a get_dm_server_url method to the new fake_dm_server.py to ensure compatibility with the enterprise_policy_base.py.
4) Update the enterprise_policy_base.py with the following:
Replace the inheritance from the old enterprise_base.py with an import of the new fake_dm_server.py.
Update the corresponding method calls within the enterprise_policy_base.py.
5) Update the enterprise_PowerManagement test to use the new fake_dm_server.py rather than the old enterprise_policy_base.py
6) Delete the old enterprise_base.py.

Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/0861dcbd0f14b5ae750dbc3d2cb5db4230468db4

commit 0861dcbd0f14b5ae750dbc3d2cb5db4230468db4
Author: Krishna Gavini <krishnargv@chromium.org>
Date: Tue Aug 02 02:57:19 2016

Create a fake_dm_server utility class.

Creating a copy of the enterprise_base.py called fake_dm_server.py.
This class contains methods to initialize a fake DM server for
setting and testing Enterprise policies.
Add a get_dm_server_url method that returns the URL of the
DM server instance.

TEST=None
BUG= chromium:629355 
Change-Id: Ib935fa381c838b851dae15497a21461c8a7080be
Reviewed-on: https://chromium-review.googlesource.com/365290
Commit-Ready: Krishna Gavini <krishnargv@chromium.org>
Tested-by: Krishna Gavini <krishnargv@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>

[add] https://crrev.com/0861dcbd0f14b5ae750dbc3d2cb5db4230468db4/client/cros/enterprise_fake_dmserver.py

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/b8711bcc7f506679351368baf835cbc4428ba14a

commit b8711bcc7f506679351368baf835cbc4428ba14a
Author: Krishna Gavini <krishnargv@chromium.org>
Date: Fri Aug 12 22:40:46 2016

Replace enterprise_base with fake_dm_server utility class.

Remove the subclassing of enterprise_base from enterprise_policy_base.
Replace enterprise_base with fake_dm_server utility class and update the
corresponding methods/interfaces.

TEST=Manually ran policy_* client side auto tests.
BUG= chromium:629355 

Change-Id: I9a9cb49b82d2a5f7f1ac6134765a360e7b60c358
Reviewed-on: https://chromium-review.googlesource.com/368870
Commit-Ready: Krishna Gavini <krishnargv@chromium.org>
Tested-by: Krishna Gavini <krishnargv@chromium.org>
Reviewed-by: Katherine Threlkeld <kathrelkeld@chromium.org>

[modify] https://crrev.com/b8711bcc7f506679351368baf835cbc4428ba14a/client/cros/enterprise_policy_base.py

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/5d0d51b60a26ca3d3cff34f67c4bfc58e91d9718

commit 5d0d51b60a26ca3d3cff34f67c4bfc58e91d9718
Author: Krishna Gavini <krishnargv@chromium.org>
Date: Fri Aug 26 23:15:11 2016

Replace enterprise_base in enterprise_PowerManagement test.

Remove the subclassing of enterprise_base from enterprise_PowerManagement.
Replace enterprise_base with fake_dm_server utility class and update the
corresponding methods/interfaces.

TEST=Manually ran enterprise_PowerManagement client side auto tests.
BUG= chromium:629355 

Change-Id: I02ab5321f37777486d50bdfc28431aaa46fb21fd
Reviewed-on: https://chromium-review.googlesource.com/376927
Commit-Ready: Krishna Gavini <krishnargv@chromium.org>
Tested-by: Krishna Gavini <krishnargv@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
Reviewed-by: Katherine Threlkeld <kathrelkeld@chromium.org>

[modify] https://crrev.com/5d0d51b60a26ca3d3cff34f67c4bfc58e91d9718/client/site_tests/enterprise_PowerManagement/enterprise_PowerManagement.py

Status: Verified (was: Started)
Tests running in lab, and being reported correctly in wmatrix.
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/b82713f4b27baf2aac235dd4af06d8f1ca344897

commit b82713f4b27baf2aac235dd4af06d8f1ca344897
Author: Krishna Gavini <krishnargv@chromium.org>
Date: Tue Sep 13 23:34:19 2016

Reorder class methods within enterprise_policy_base

Reordered the class methods grouped by their functionalities.
The various groups being:
 -Class initialization/teardown methods.
 -Policy blob setup and parsing methods.
 -Chrome Browser launch and related methods.

TEST=Manually ran policy_* client side auto tests.
BUG= chromium:629355 

Change-Id: I0a226560af05ed97770f1f00218bddf3f0f0907e
Reviewed-on: https://chromium-review.googlesource.com/385074
Commit-Ready: Krishna Gavini <krishnargv@chromium.org>
Tested-by: Krishna Gavini <krishnargv@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
Reviewed-by: Scott Cunningham <scunningham@chromium.org>

[modify] https://crrev.com/b82713f4b27baf2aac235dd4af06d8f1ca344897/client/cros/enterprise_policy_base.py

Sign in to add a comment