Skip to content

Commit

Permalink
Add instructions for installing pact for tests (#345)
Browse files Browse the repository at this point in the history
* Add instructions for installing pact for tests

* Update README.md

Co-authored-by: Michael Valdron <[email protected]>

---------

Co-authored-by: Michael Valdron <[email protected]>
  • Loading branch information
johnmcollier and Michael Valdron authored Jun 14, 2023
1 parent 7eebefb commit 75e622d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

A Kubernetes operator to create and manage applications and control the lifecycle of applications.


## Building & Testing
This operator provides a `Makefile` to run all the usual development tasks. If you simply run `make` without any arguments, you'll get a list of available "targets".

Expand All @@ -21,6 +20,8 @@ To test the code:
make test
```

**Note:** In order for the controller tests to run, follow the instructions for [installing the Pact tools](#installing-pact-tools)

To build the docker image of the operator one can run:

```
Expand All @@ -44,6 +45,16 @@ The image being pushed can again be modified using the environment variable:
IMG=quay.io/user/hasoperator:next make docker-push
```

## Installing Pact Tools

The Pact tests in the controller package require pact tooling to be installed and on your path. Follow these instructions to do so:

1. Change directory to an appropriate folder (e.g. `/usr/local`)
2. Run `curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-ruby-standalone/master/install.sh | bash`
3. Add the pact tools' bin folder (e.g. `/usr/local/pact/bin`) to your path to your shell PATH. Ensure all binary files within the `bin/` folder has executable permissions
4. Run `go install github.com/pact-foundation/pact-go@v1` to install the `pact-go` tool
5. Run `pact-go install` to validate that all of the necessary Pact tools are installed

## Deploying the Operator

The following section outlines the steps to deploy HAS on a physical Kubernetes cluster.
Expand Down

0 comments on commit 75e622d

Please sign in to comment.