Dduvall has uploaded a new change for review.
https://gerrit.wikimedia.org/r/196492
Change subject: plugin: Role settings feature description
......................................................................
plugin: Role settings feature description
Trying my hand at a little ATTD here.
Bug: T92549
Change-Id: I56caacba910d027846a63ff4507247c70446c980
---
A features/role_settings.feature
1 file changed, 66 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant
refs/changes/92/196492/1
diff --git a/features/role_settings.feature b/features/role_settings.feature
new file mode 100644
index 0000000..db5918e
--- /dev/null
+++ b/features/role_settings.feature
@@ -0,0 +1,66 @@
+@wip
+Feature: Role settings
+
+ Roles should be able to define changes to the core environment settings to
+ better accommodate services requiring more memory, forwarded ports, etc.
+ Such changes should be communicated to the user both when viewing
+ documentation and upon enabling new roles. Enabling and disabling a role with
+ settings should trigger a reload before the next provision and warn the user.
+
+ Background:
+ Given the following roles are defined:
+ | foo |
+ | bar |
+
+ Scenario: Running `vagrant roles info <role>` displays the role's settings
+ Given the settings for the "foo" role are:
+ """
+ vagrant_ram: 200
+ """
+ When I run `vagrant roles info foo`
+ Then the command should have completed successfully
+ And the output should contain:
+ """
+ Enabling this role will adjust the following settings:
+
+ Amount of RAM (in MB) allocated to the guest VM
+ vagrant_ram: +200
+ """
+
+ Scenario: Running `vagrant roles enable <role>` warns of changes to settings
+ Given my current settings are:
+ """
+ vagrant_ram: 1536
+ forward_ports:
+ 123: 321
+ """
+ And the settings for the "foo" role are:
+ """
+ vagrant_ram: 200
+ forward_ports:
+ 234: 432
+ """
+ When I run `vagrant roles enable foo`
+ Then the command should have completed successfully
+ And the output should contain:
+ """
+ Ok. Run `vagrant provision` to apply your changes.
+
+ Note the following settings have changed and your environment will be
reloaded.
+ vagrant_ram: 1536 -> 1736
+ forward_ports: { 123: 321 } -> { 123: 321, 234: 432 }
+ """
+
+ Scenario: Running `vagrant provision` after enabling a role with settings
reloads
+ Given the environment is up
+ And the settings for the "foo" role are:
+ """
+ vagrant_ram: 200
+ """
+ When I enable the "foo" role
+ And I run `vagrant provision`
+ Then the command should have completed successfully
+ And the output should contain:
+ """
+ Reloading vagrant...
+ """
--
To view, visit https://gerrit.wikimedia.org/r/196492
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56caacba910d027846a63ff4507247c70446c980
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Dduvall <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits