Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rearranged code in the repo for easier management
We don't want the root of repo to be cluttered so we moved most of the scripts to bin/ folder and test runners to test/ folders.
- Loading branch information
Showing
16 changed files
with
73 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,3 @@ test-unit: | |
artifacts: | ||
paths: | ||
- output/junit.xml | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM golang:1.11.4-alpine | ||
|
||
MAINTAINER Conjur Inc | ||
|
||
|
||
RUN apk add --no-cache bash \ | ||
build-base \ | ||
curl \ | ||
git \ | ||
jq \ | ||
less && \ | ||
go get -u github.com/jstemmer/go-junit-report && \ | ||
go get -u github.com/smartystreets/goconvey && \ | ||
mkdir -p /summon-conjur/output | ||
|
||
WORKDIR /summon-conjur | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
COPY . . | ||
RUN go build -o summon-conjur cmd/main.go | ||
|
||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash -eo pipefail | ||
|
||
export PATH="$(pwd):$PATH" | ||
echo "Path: $PATH" | ||
|
||
echo "Running tests..." | ||
|
||
# Type of Conjur to test against, 'all', 'oss' or 'enterprise' | ||
CONJUR_TYPE="${CONJUR_TYPE:-all}" | ||
echo "Test coverage: $CONJUR_TYPE" | ||
|
||
TEST_PARAMS="-run TestPackage*" | ||
|
||
if [[ "${CONJUR_TYPE}" == "enterprise" ]]; then | ||
TEST_PARAMS="-run TestPackageEnterprise" | ||
fi | ||
|
||
if [[ "${CONJUR_TYPE}" == "oss" ]]; then | ||
TEST_PARAMS="-run TestPackageOSS" | ||
fi | ||
|
||
echo "Running go tests: $TEST_PARAMS" | ||
echo "Current dir: $(pwd)" | ||
|
||
set -x | ||
go test -v ./test/... $TEST_PARAMS | tee output/junit.output | ||
|
||
go-junit-report < output/junit.output > output/junit.xml | ||
|
||
rm output/junit.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
// +build all enterprise | ||
|
||
package main | ||
package test | ||
|
||
import ( | ||
"os" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
// +build all oss | ||
|
||
package main | ||
package test | ||
|
||
import ( | ||
"fmt" | ||
|