Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #16772: Add an upgrade scenario in rtf
- Loading branch information
Showing
10 changed files
with
311 additions
and
190 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Scenario: accept_nodes | ||
Run inventory and accept all agents of the platform | ||
""" | ||
from scenario.lib import * | ||
|
||
class Scenario(): | ||
def __init__(self, data): | ||
self.data = data | ||
def run(self): | ||
# test begins, register start time | ||
start(__doc__) | ||
|
||
# Run inventory and accept nodes | ||
for host in scenario.nodes("agent"): | ||
run_on(host, 'run_agent', Err.CONTINUE, PARAMS="inventory") | ||
run_retry_and_dump('localhost', 'agent_accept', 5, RudderLog.APACHE, ACCEPT=host) | ||
|
||
finish() |
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,33 @@ | ||
""" | ||
Scenario: create_user | ||
Create a user directive with the given name and directive_id. | ||
It will triggers the agents run to apply it. | ||
""" | ||
from scenario.lib import * | ||
|
||
class Scenario(): | ||
def __init__(self, data): | ||
self.data = data | ||
|
||
def run(self): | ||
# test begins, register start time | ||
start(__doc__) | ||
|
||
# Add a rule | ||
date0 = host_date('wait', Err.CONTINUE, "server") | ||
run('localhost', 'user_rule', Err.BREAK, NAME="Test User " + self.data['username'], GROUP="special:all", USERNAME=self.data['username'], DIRECTIVE_ID=self.data['directive_id']) | ||
for host in scenario.nodes("agent"): | ||
wait_for_generation('wait', Err.CONTINUE, "server", date0, host, 10) | ||
|
||
# Run agent | ||
run_on("server", 'run_agent', Err.CONTINUE, PARAMS="run") | ||
run_and_dump("agent", 'run_agent', Err.CONTINUE, RudderLog.APACHE, PARAMS="update") | ||
run_on("agent", 'run_agent', Err.CONTINUE, PARAMS="run") | ||
|
||
# Test rule result | ||
run_on("agent", 'user_test', Err.CONTINUE, USERNAME=self.data['username']) | ||
|
||
# test end, print summary | ||
finish() |
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
Oops, something went wrong.