Navigation Menu

Skip to content

Commit

Permalink
Update unit tests for consistency with operator (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
jthomperoo committed Nov 16, 2019
1 parent 01444ae commit 4185afd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.repository == 'jthomperoo/custom-pod-autoscaler'
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
file: ./unit_cover.out
flags: unittests
name: custom-pod-autoscaler-unittests
- name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,3 +1,3 @@
/vendor/
/dist/
coverage.txt
*.out
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -9,7 +9,7 @@ default: vendor

unittest: vendor
@echo "=============Running unit tests============="
go test ./... -cover -covermode atomic -coverprofile coverage.txt --tags=unit
go test ./... -cover -covermode atomic -coverprofile unit_cover.out --tags=unit

lint: vendor
@echo "=============Linting============="
Expand Down
12 changes: 7 additions & 5 deletions README.md
@@ -1,6 +1,8 @@
[![Build](https://github.com/jthomperoo/custom-pod-autoscaler/workflows/main/badge.svg)](https://github.com/jthomperoo/custom-pod-autoscaler/actions)
[![codecov](https://codecov.io/gh/jthomperoo/custom-pod-autoscaler/branch/master/graph/badge.svg)](https://codecov.io/gh/jthomperoo/custom-pod-autoscaler)
[![GoDoc](https://godoc.org/github.com/jthomperoo/custom-pod-autoscaler?status.svg)](https://godoc.org/github.com/jthomperoo/custom-pod-autoscaler)
[![Go Report Card](https://goreportcard.com/badge/github.com/jthomperoo/custom-pod-autoscaler)](https://goreportcard.com/report/github.com/jthomperoo/custom-pod-autoscaler)
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
# Custom Pod Autoscaler

This is the Custom Pod Autoscaler (CPA) code and base images.
Expand Down Expand Up @@ -39,8 +41,8 @@ Developing this project requires these dependencies:

### Commands

* make - builds the CPA binary.
* make docker - builds the CPA base images.
* make lint - lints the code.
* make unittest - runs the unit tests.
* make vendor - generates a vendor folder.
* `make` - builds the CPA binary.
* `make docker` - builds the CPA base images.
* `make lint` - lints the code.
* `make unittest` - runs the unit tests.
* `make vendor` - generates a vendor folder.
7 changes: 6 additions & 1 deletion example/python/cpa.yaml
Expand Up @@ -3,7 +3,12 @@ kind: CustomPodAutoscaler
metadata:
name: player-count-scaler
spec:
image: example-python-custom-pod-autoscaler:latest
template:
spec:
containers:
- name: example-python-custom-pod-autoscaler
image: example-python-custom-pod-autoscaler:latest
imagePullPolicy: IfNotPresent
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
Expand Down

0 comments on commit 4185afd

Please sign in to comment.