Add check for "FIt" script (#2435)

**What kind of PR is this?**
<!--
DELETE the kind(s) which are not applicable before opening the PR.
-->

/kind enhancement

**What does does this PR do / why we need it**:

Adds a small script to check for instances of `FIt(` being in the code.
This helps with regards to not merging in tests with FIt in integration.

**Which issue(s) this PR fixes**:

N/A

**How to test changes / Special notes to the reviewer**:

N/A

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
This commit is contained in:
Charlie Drage
2019-12-10 07:12:45 -05:00
committed by OpenShift Merge Robot
parent 25694950b1
commit 29937f6931
2 changed files with 15 additions and 1 deletions

View File

@@ -50,7 +50,7 @@ install:
# run all validation tests
.PHONY: validate
validate: gofmt check-vendor vet validate-vendor-licenses sec #lint
validate: gofmt check-fit check-vendor vet validate-vendor-licenses sec #lint
.PHONY: gofmt
gofmt:
@@ -60,6 +60,10 @@ gofmt:
check-vendor:
./scripts/check-vendor.sh
.PHONY: check-fit
check-fit:
./scripts/check-fit.sh
.PHONY: validate-vendor-licenses
validate-vendor-licenses:
wwhrd check -q

10
scripts/check-fit.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -e
if grep -nr "FIt(" tests/; then
echo "Not OK. FIt exists somewhere in the testing code. Please remove it."
exit 1
else
echo "OK"
fi