Skip to content

Commit

Permalink
V2 bdd (#285)
Browse files Browse the repository at this point in the history
* #2122: bdd changes for v2

Signed-off-by: sbadla1 <[email protected]>

* #2122: added makefile for test-bdd module

Signed-off-by: sbadla1 <[email protected]>

* #2122: added makefile for test-bdd module

Signed-off-by: sbadla1 <[email protected]>

* #2122: update rolling-update template

Signed-off-by: sbadla1 <[email protected]>

* #2122: bdd changes for v2

Signed-off-by: sbadla1 <[email protected]>

* #2122: bdd changes for v2

Signed-off-by: sbadla1 <[email protected]>
  • Loading branch information
sahilbadla authored Aug 2, 2021
1 parent 3841cc7 commit 998de0d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ on:
jobs:
build:
name: CI # Lint, Test, Codecov, Docker build & Push
if: github.repository == 'keikoproj/upgrade-manager'
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Golangci-lint
uses: golangci/golangci-lint-action@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ test: generate fmt vet manifests
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.0/hack/setup-envtest.sh
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile coverage.txt
go tool cover -html=./coverage.txt -o cover.html
$(MAKE) -C test-bdd/ test


# Build manager binary
manager: generate fmt vet
Expand Down
12 changes: 12 additions & 0 deletions test-bdd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test: fmt vet
go test ./... -coverprofile coverage.txt
go tool cover -html=./coverage.txt -o cover.html


# Run go fmt against code
fmt:
go fmt ./...

# Run go vet against code
vet:
go vet ./...
21 changes: 10 additions & 11 deletions test-bdd/templates/rolling-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ metadata:
namespace: upgrade-manager-system
spec:
asgName: upgrademgr-eks-nightly-ASG
nodeIntervalSeconds: 90
postDrain: {}
postDrainDelaySeconds: 30
postDrainScript: |
echo "Hello, postDrain!"
postDrainWaitScript: |
echo "Hello, postDrainWait!"
postTerminate: {}
postTerminateScript: |
echo "Hello, postTerminate!"
preDrain: {}
nodeIntervalSeconds: 300
postDrainDelaySeconds: 90
postDrain:
script: |
echo "Hello, postDrain!"
postWaitScript: |
echo "Hello, postDrainWait!"
postTerminate:
script: |
echo "Hello, postTerminate!"
strategy:
mode: eager
drainTimeout: 600
Expand Down

0 comments on commit 998de0d

Please sign in to comment.