Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
[Telegraf] Simplify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Oct 20, 2020
1 parent 458de17 commit 4af9618
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
48 changes: 24 additions & 24 deletions tests/0200_config.goss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,48 @@ file:
group: root
mode: "0644"
contains:
- "/^\\[global_tags\\]$/"
- "/^foo = \"bar\"$/"
- "/^\\[agent\\]$/"
- "/^hostname = \"test.manala.dev\"$/"
- "/^quiet = true$/"
- "/^metric_batch_size = 1234$/"
- "[global_tags]"
- 'foo = "bar"'
- "[agent]"
- 'hostname = "test.manala.dev"'
- "quiet = true"
- "metric_batch_size = 1234"
tmp/config/default/default_deprecated.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^\\[global_tags\\]$/"
- "/^ foo = \"bar\"$/"
- "/^\\[agent\\]$/"
- "/^ hostname = \"test.manala.dev\"$/"
- "/^ quiet = true$/"
- "/^ metric_batch_size = 1234$/"
- "[global_tags]"
- ' foo = "bar"'
- "[agent]"
- ' hostname = "test.manala.dev"'
- " quiet = true"
- " metric_batch_size = 1234"
tmp/config/default/default_content.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^\\[global_tags\\]$/"
- "/^ foo = \"bar\"$/"
- "/^\\[agent\\]$/"
- "/^ hostname = \"test.manala.dev\"$/"
- "/^ quiet = true$/"
- "/^ metric_batch_size = 1234$/"
- "[global_tags]"
- ' foo = "bar"'
- "[agent]"
- ' hostname = "test.manala.dev"'
- " quiet = true"
- " metric_batch_size = 1234"
tmp/config/default/template.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^\\[global_tags\\]$/"
- "/^ foo = \"bar\"$/"
- "/^\\[agent\\]$/"
- "/^ hostname = \"test.manala.dev\"$/"
- "/^ quiet = true$/"
- "/^ metric_batch_size = 1234$/"
- "[global_tags]"
- ' foo = "bar"'
- "[agent]"
- ' hostname = "test.manala.dev"'
- " quiet = true"
- " metric_batch_size = 1234"
56 changes: 28 additions & 28 deletions tests/0300_configs.goss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,52 +16,52 @@ file:
group: root
mode: "0644"
contains:
- "/^\\[\\[inputs.cpu\\]\\]$/"
- "/^percpu = true$/"
- "/^totalcpu = false$/"
- "/^\\[inputs.cpu.tags\\]$/"
- "/^tag-1 = \"foo\"$/"
- "/^tag-2 = \"bar\"$/"
- "/^\\[inputs.cpu.tagdrop\\]$/"
- "/^cpu = \\[\"cpu6\", \"cpu7\"\\]$/"
- "[[inputs.cpu]]"
- "percpu = true"
- "totalcpu = false"
- "[inputs.cpu.tags]"
- 'tag-1 = "foo"'
- 'tag-2 = "bar"'
- "[inputs.cpu.tagdrop]"
- 'cpu = ["cpu6", "cpu7"]'
tmp/configs/default/default_content.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^\\[\\[inputs.cpu\\]\\]$/"
- "/^ percpu = true$/"
- "/^ totalcpu = false$/"
- "/^ \\[inputs.cpu.tags\\]$/"
- "/^ tag-1 = \"foo\"$/"
- "/^ tag-2 = \"bar\"$/"
- "/^ \\[inputs.cpu.tagdrop\\]$/"
- "/^ cpu = \\[\"cpu6\", \"cpu7\"\\]$/"
- "[[inputs.cpu]]"
- " percpu = true"
- " totalcpu = false"
- " [inputs.cpu.tags]"
- ' tag-1 = "foo"'
- ' tag-2 = "bar"'
- " [inputs.cpu.tagdrop]"
- ' cpu = ["cpu6", "cpu7"]'
tmp/configs/default/template.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^Configs foo$/"
- "Configs foo"
tmp/configs/default/template_deprecated.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^\\[\\[inputs.cpu\\]\\]$/"
- "/^ percpu = true$/"
- "/^ totalcpu = false$/"
- "/^ \\[inputs.cpu.tags\\]$/"
- "/^ tag-1 = \"foo\"$/"
- "/^ tag-2 = \"bar\"$/"
- "/^ \\[inputs.cpu.tagdrop\\]$/"
- "/^ cpu = \\[\"cpu6\", \"cpu7\"\\]$/"
- "[[inputs.cpu]]"
- " percpu = true"
- " totalcpu = false"
- " [inputs.cpu.tags]"
- ' tag-1 = "foo"'
- ' tag-2 = "bar"'
- " [inputs.cpu.tagdrop]"
- ' cpu = ["cpu6", "cpu7"]'
{{ end }}

# State
Expand Down Expand Up @@ -100,23 +100,23 @@ file:
group: root
mode: "0644"
contains:
- "/^Configs foo$/"
- "Configs foo"
tmp/configs/defaults/bar.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^Configs bar$/"
- "Configs bar"
tmp/configs/defaults/baz.conf:
exists: true
filetype: file
owner: root
group: root
mode: "0644"
contains:
- "/^Configs bar$/"
- "Configs bar"
{{ end }}

# Exclusive
Expand Down

0 comments on commit 4af9618

Please sign in to comment.