Commit Graph

30 Commits

Author SHA1 Message Date
Imran Iqbal
2b38c9e402
test: standardise use of share suite & _mapdata state [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/302
2021-03-23 21:32:19 +00:00
Imran Iqbal
c9cfdfd9e1
fix(pillar): fix OverflowError: Range too big -- MAX_RANGE (100000)
https://gitlab.com/myii/prometheus-formula/-/jobs/1077740890#L779

```
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/salt/utils/templates.py", line 501, in render_jinja_tmpl
    output = template.render(**decoded_context)
  File "/usr/local/lib/python3.8/dist-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/dist-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/dist-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 212, in top-level template code
  File "/usr/local/lib/python3.8/dist-packages/jinja2/sandbox.py", line 462, in call
    return __context.call(__obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/jinja2/sandbox.py", line 173, in safe_range
    raise OverflowError(
OverflowError: Range too big. The sandbox blocks ranges larger than MAX_RANGE (100000).

; line 212

---
[...]
   skip_verify: true

  linux:
    # 'Alternatives system' priority: zero disables (default)
    # yamllint disable-line rule:braces
    altpriority: {{ range(1, 9100000) | random }}    <======================
```
2021-03-07 22:04:39 +00:00
Imran Iqbal
e283bfb188
ci(kitchen+gitlab-ci): use latest pre-salted images [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/293
2021-02-27 22:23:38 +00:00
Imran Iqbal
83efb0b434
test(pillar/repo): avoid alertmanager config where newer than package
* `smtp_hello` (v0.8.0):
  - a566036015
* `http_config` (v0.15.0-rc.0):
  - d678022fea
2021-02-27 22:03:07 +00:00
lagooj
018e759183 test(archive): add env vars tests 2021-01-06 22:40:14 +01:00
lagooj
43053a6e59 test(archive): add unofficial exporter test 2020-11-17 15:47:00 +01:00
lagooj
34a9805886 test(archive): update test according to defaults.yaml changes 2020-11-12 09:53:16 +01:00
Imran Iqbal
f6eb546174
chore: standardise structure [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/261
2020-10-02 23:02:49 +01:00
Javier Bértoli
a5b44c812b fix(archive): add config file to service only if defined 2020-08-29 18:26:02 -03:00
Javier Bértoli
a5d4d03f8d test(archive): add tests to check service names
this commit makes `service name` to consider pillar provided values,
fallback to a consistent `service name` when {archive|package} is available
for the component, or to `service name == name` when no other value
is provided
2020-08-25 14:10:02 -03:00
Javier Bértoli
7c1cdb8fdf test(services): fix path for debian family 2020-08-24 19:55:09 -03:00
Nicolas Rodriguez
49e6fa5671 fix(test): fix tests for RedHat OSes in repo mode 2020-08-25 00:03:10 +02:00
Nicolas Rodriguez
910a06df5f fix(test): fix test pillars 2020-08-24 22:48:53 +02:00
Nicolas Rodriguez
41da7cc697 fix(test): fix alertmanager service name in repo mode test 2020-08-24 18:07:51 +02:00
Nicolas Rodriguez
461ce4ffcd style(test): improve Ruby style 2020-08-24 17:51:59 +02:00
Nicolas Rodriguez
6010cc32b8 fix(test): add tests on prometheus-node-exporter 2020-08-24 17:51:21 +02:00
Nicolas Rodriguez
4e8c69f72b fix(test): add tests on node_exporter service 2020-08-24 17:13:03 +02:00
Javier Bértoli
c5ad857590 test(packages): check when using repo or archives 2020-08-21 10:34:29 -03:00
noelmcloughlin
d65858a154 fix(permissions): correct basedir user/group 2020-08-18 21:50:52 +01:00
N
ce5b7712c9 refactor(all): align to template-formula; add clientlibs feature
BREAKING CHANGE: The data dictionary is simplified and expanded.
Retest your states and update pillar data accordingly.
For developer convenience, clientlibs states were introduced.
See pillar.example, defaults.yaml, and docs/README.
2020-05-15 11:12:28 +01:00
Alexander Weidinger
d73130972a feat(textfile_collectors): added IPMI textfile collector 2019-10-17 08:21:16 +02:00
Alexander Weidinger
0a3384222c fix(config): cope with aberrant service names 2019-10-04 22:56:17 +02:00
Imran Iqbal
62218882a0 ci(platform): add arch-base-latest (commented out for now) [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/50
2019-10-01 16:23:07 +01:00
Imran Iqbal
07dbfc8d63
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix errors shown below:

```bash
prometheus-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./prometheus/osfamilymap.yaml
  1:89      error    line too long (116 > 88 characters)  (line-length)
  1:24      error    trailing spaces  (trailing-spaces)
  13:2      error    syntax error: found character '%' that cannot start any token
  24:89     error    line too long (90 > 88 characters)  (line-length)
  25:89     error    line too long (167 > 88 characters)  (line-length)

./prometheus/defaults.yaml
  6:13      error    too many spaces inside braces  (braces)
  6:35      error    too many spaces inside braces  (braces)
  7:11      error    too many spaces inside braces  (braces)
  7:25      error    too many spaces inside braces  (braces)
  8:22      warning  truthy value should be one of [false, true]  (truthy)
  9:25      warning  truthy value should be one of [false, true]  (truthy)
  49:85     error    trailing spaces  (trailing-spaces)
  103:20    warning  truthy value should be one of [false, true]  (truthy)
  104:25    warning  truthy value should be one of [false, true]  (truthy)
  108:16    warning  truthy value should be one of [false, true]  (truthy)
  113:24    warning  missing starting space in comment  (comments)

pillar.example
  31:6      warning  missing starting space in comment  (comments)
  32:8      warning  missing starting space in comment  (comments)
  32:7      warning  comment not indented like content  (comments-indentation)
  51:5      warning  comment not indented like content  (comments-indentation)
  65:89     error    line too long (110 > 88 characters)  (line-length)
  68:29     error    too many spaces after colon  (colons)
  68:34     warning  too few spaces before comment  (comments)
  68:89     error    line too long (106 > 88 characters)  (line-length)
  69:34     warning  too few spaces before comment  (comments)
  69:89     error    line too long (98 > 88 characters)  (line-length)
  75:9      error    wrong indentation: expected 10 but found 8  (indentation)
  76:11     error    wrong indentation: expected 12 but found 10  (indentation)
  77:13     warning  comment not indented like content  (comments-indentation)
  79:89     error    line too long (101 > 88 characters)  (line-length)
  81:9      warning  comment not indented like content  (comments-indentation)
  86:89     error    line too long (103 > 88 characters)  (line-length)
  91:11     error    wrong indentation: expected 12 but found 10  (indentation)
  106:15    error    wrong indentation: expected 16 but found 14  (indentation)
  108:41    warning  too few spaces before comment  (comments)
  118:89    error    line too long (96 > 88 characters)  (line-length)
  139:13    error    wrong indentation: expected 14 but found 12  (indentation)
  143:7     error    wrong indentation: expected 8 but found 6  (indentation)
  145:9     error    wrong indentation: expected 10 but found 8  (indentation)
  157:6     warning  missing starting space in comment  (comments)
  158:20    error    too many spaces inside braces  (braces)
  158:47    error    too many spaces inside braces  (braces)
```
2019-08-16 17:42:04 +01:00
Imran Iqbal
090e77bafb chore: use semantic-release cross-formula standard structure
* Automated using `ssf-formula` (v0.1.0-rc.1)
2019-07-19 12:34:16 +01:00
N
4092fb4192
test(inspec): fix tests 2019-06-23 17:33:48 +01:00
N
36b3e62678
feat(linux): alternatives support & updated unit tests 2019-06-17 19:36:07 +01:00
N
b074bd3dee
test(inspec): expand unittests for archive format 2019-06-16 01:23:52 +01:00
Alexander Weidinger
34ada49bf7 feat(exporters): added node_exporter 2019-04-29 13:54:40 +02:00
Alexander Weidinger
88d3f3e2f8 ci(travis): use structure of template-formula 2019-04-25 22:14:39 +02:00