Skip to content

Commit

Permalink
Fix scenario test
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i committed Nov 12, 2024
1 parent 59a7706 commit 3daa286
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/grafana_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def __init__(self, *args):

for rules in [self.loki_rules_paths, self.dashboard_paths]:
if not os.path.isdir(rules.dest):
rules.src.mkdir(parents=True, exist_ok=True)
shutil.copytree(rules.src, rules.dest, dirs_exist_ok=True)

self._remote_write = PrometheusRemoteWriteConsumer(
Expand Down
4 changes: 2 additions & 2 deletions tests/scenario/test_config_reporting_enabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def test_reporting_enabled(ctx):
out = ctx.run(ctx.on.config_changed(), state)

# THEN the service layer does NOT include the "-disable-reporting" arg
assert "-disable-reporting" not in out.get_container("agent").layers.services["agent"].to_dict().command
assert "-disable-reporting" not in out.get_container("agent").layers["agent"].services["agent"].command


def test_reporting_disabled(ctx):
Expand All @@ -25,4 +25,4 @@ def test_reporting_disabled(ctx):
out = ctx.run(ctx.on.config_changed(), state)

# THEN the service layer INCLUDES the "-disable-reporting" arg
assert "-disable-reporting" in out.get_container("agent").layers.services["agent"].to_dict().command
assert "-disable-reporting" in out.get_container("agent").layers["agent"].services["agent"].command

0 comments on commit 3daa286

Please sign in to comment.