-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Niladri Halder <[email protected]>
- Loading branch information
Showing
7 changed files
with
26 additions
and
28 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 |
---|---|---|
|
@@ -3,4 +3,3 @@ languages: | |
- go | ||
exclude: | ||
- /pkg/generated/.* | ||
- /vendor/.* |
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 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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
set -e | ||
echo "" > coverage.txt | ||
|
||
for d in $(go list ./... | grep -v 'vendor\|pkg/apis\|pkg/client\|tests'); do | ||
for d in $(go list ./... | grep -v 'pkg/apis\|pkg/client\|tests'); do | ||
#TODO - Include -race while creating the coverage profile. | ||
go test -coverprofile=profile.out -covermode=atomic $d | ||
Check warning on line 22 in buildscripts/test-cov.sh GitHub Actions / lint
|
||
if [ -f profile.out ]; then | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
set -e | ||
|
||
# Create a temp dir and clean it up on exit | ||
TEMPDIR=`mktemp -d -t csi-test.XXX` | ||
TEMPDIR=$(mktemp -d -t csi-test.XXX) | ||
trap "rm -rf $TEMPDIR" EXIT HUP INT QUIT TERM | ||
Check warning on line 21 in buildscripts/test.sh GitHub Actions / lint
|
||
|
||
# Build the Maya binary for the tests | ||
|
@@ -26,7 +26,7 @@ go build -o $TEMPDIR/maya || exit 1 | |
|
||
# Run the tests | ||
echo "--> Running tests" | ||
GOBIN="`which go`" | ||
GOBIN="$(which go)" | ||
PATH=$TEMPDIR:$PATH \ | ||
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s} $($GOBIN list ./... | grep -v 'pkg/apis\|pkg/generated\|tests') | ||
Check warning on line 31 in buildscripts/test.sh GitHub Actions / lint
Check warning on line 31 in buildscripts/test.sh GitHub Actions / lint
|
||
|
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 |
---|---|---|
|
@@ -12,39 +12,40 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# shellcheck disable=SC1128 | ||
#!/usr/bin/env bash | ||
Check failure on line 16 in ci/ci-test.sh GitHub Actions / lint
|
||
|
||
#OPENEBS_OPERATOR=https://raw.githubusercontent.com/openebs/openebs/HEAD/k8s/openebs-operator.yaml | ||
CSTOR_OPERATOR=https://raw.githubusercontent.com/openebs/cstor-operators/HEAD/deploy/cstor-operator.yaml | ||
CSI_OPERATOR="$GOPATH/src/github.com/openebs/cstor-csi/deploy/csi-operator.yaml" | ||
SNAPSHOT_CLASS="$GOPATH/src/github.com/openebs/cstor-csi/deploy/snapshot-class.yaml" | ||
CSTOR_OPERATOR="https://raw.githubusercontent.com/openebs/cstor-operators/HEAD/deploy/cstor-operator.yaml" | ||
#CSI_OPERATOR="$GOPATH/src/github.com/openebs/cstor-csi/deploy/csi-operator.yaml" | ||
#SNAPSHOT_CLASS="$GOPATH/src/github.com/openebs/cstor-csi/deploy/snapshot-class.yaml" | ||
|
||
#DST_PATH="$GOPATH/src/github.com/openebs" | ||
|
||
# Prepare env for runnging BDD tests | ||
# Minikube is already running | ||
kubectl apply -f $CSTOR_RBAC | ||
kubectl apply -f $NDM_OPERATOR | ||
kubectl apply -f $ALL_CRD | ||
kubectl apply -f $CSTOR_OPERATOR | ||
# kubectl apply -f $CSTOR_RBAC | ||
# kubectl apply -f $NDM_OPERATOR | ||
# kubectl apply -f $ALL_CRD | ||
kubectl apply -f "$CSTOR_OPERATOR" | ||
kubectl apply -f ./deploy/csi-operator.yaml | ||
kubectl apply -f ./deploy/snapshot-class.yaml | ||
|
||
function dumpCSINodeLogs() { | ||
LC=$1 | ||
CSINodePOD=$(kubectl get pods -l app=openebs-csi-node -o jsonpath='{.items[0].metadata.name}' -n kube-system) | ||
kubectl describe po $CSINodePOD -n openebs | ||
kubectl describe po "$CSINodePOD" -n openebs | ||
printf "\n\n" | ||
kubectl logs --tail=${LC} $CSINodePOD -n openebs -c openebs-csi-plugin | ||
kubectl logs --tail="${LC}" "$CSINodePOD" -n openebs -c openebs-csi-plugin | ||
printf "\n\n" | ||
} | ||
|
||
function dumpCSIControllerLogs() { | ||
LC=$1 | ||
CSIControllerPOD=$(kubectl get pods -l app=openebs-csi-controller -o jsonpath='{.items[0].metadata.name}' -n kube-system) | ||
kubectl describe po $CSIControllerPOD -n openebs | ||
kubectl describe po "$CSIControllerPOD" -n openebs | ||
printf "\n\n" | ||
kubectl logs --tail=${LC} $CSIControllerPOD -n openebs -c openebs-csi-plugin | ||
kubectl logs --tail="${LC}" "$CSIControllerPOD" -n openebs -c openebs-csi-plugin | ||
printf "\n\n" | ||
} | ||
|
||
|
@@ -53,9 +54,8 @@ kubectl wait --for=condition=Ready --timeout=300s pods/openebs-cstor-csi-control | |
|
||
# Run e2e tests for csi volumes | ||
cd ./tests/e2e | ||
Check warning on line 56 in ci/ci-test.sh GitHub Actions / lint
|
||
make e2e-test | ||
|
||
if [ $? -ne 0 ]; then | ||
if ! make e2e-test; then | ||
echo "******************** CSI Controller logs***************************** " | ||
dumpCSIControllerLogs 1000 | ||
|
||
|