Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/loveholidays/po-test

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/loveholidays/po-test

  • v0.3.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

po-test - prometheus operator test CLI

po-test allows you to run prometheus alert unit tests against prometheus operator manifests. Simply point your unit tests at a prometheus operator PrometheusRule E.g.

rule_files:
  - prometheus-operator-rules.yml

Where prometheus-operator-rules.yml looks something like:

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  labels:
    prometheus: k8s
    role: alert-rules
  name: prometheus-rules
spec:
  groups:
    - name: alerts
...

Then run po-test prometheus-operator-unittest.yml. The CLI will strip the kubernetes metadata from the target, run the unit tests against it, then put it back again.

It is also suitable for running as part of a CI/CD pipeline.

Prerequisites

Promtool

Run this to install prometheus that will also provide promtool brew install prometheus

Install

# go >= 1.17
# Using `go get` to install binaries is deprecated.
# The version suffix is mandatory.
go install github.com/loveholidays/po-test@latest

# go < 1.17
go get github.com/loveholidays/po-test

Homebrew

brew install loveholidays/taps/po-test

Linux

Grab the latest OS/Arch compatible binary from our Releases page.

From source

git clone git@github.com:loveholidays/po-test.git
make build

Usage

po-test test-file1.yaml test-file2.yaml ...

Releasing

Pushing a tag to origin with a version number will run the github actions to release that version.

FAQs

Package last updated on 27 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc