Skip to content

Commit

Permalink
Merge branch 'ginkgo_removal' into fix_skip_cli_print
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontesi committed Dec 22, 2023
2 parents e8ba1b0 + f842869 commit 1e6904b
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 210 deletions.
88 changes: 44 additions & 44 deletions .github/workflows/pre-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,28 +249,28 @@ jobs:
- name: Remove tarball(s) to save disk space.
run: rm -f cnf-certification-test/*.tar.gz

- name: Run gradetool on the claim.json.
run: |
docker run \
--rm \
--volume "${GITHUB_WORKSPACE}"/generated_policy.json:/policy.json \
--volume "${GITHUB_WORKSPACE}"/cnf-certification-test/claim.json:/claim.json \
${REGISTRY}/${GRADETOOL_IMAGE_NAME}:${GRADETOOL_IMAGE_TAG} \
--OutputPath results.txt \
--policy /policy.json \
--results /claim.json \
>"${GITHUB_WORKSPACE}"/results.txt
docker system prune --volumes -f
- name: Check that their are 0 failed tests in the gradetool results
run: |
if $(jq '.[] | .Fail | length' "${GITHUB_WORKSPACE}"/results.txt | grep -q 0); then
echo OK
else
echo "Gradetool has found failing tests in the following:"
jq '.[] | .Fail | .[].id' "${GITHUB_WORKSPACE}"/results.txt
exit 1
fi
# - name: Run gradetool on the claim.json.
# run: |
# docker run \
# --rm \
# --volume "${GITHUB_WORKSPACE}"/generated_policy.json:/policy.json \
# --volume "${GITHUB_WORKSPACE}"/cnf-certification-test/claim.json:/claim.json \
# ${REGISTRY}/${GRADETOOL_IMAGE_NAME}:${GRADETOOL_IMAGE_TAG} \
# --OutputPath results.txt \
# --policy /policy.json \
# --results /claim.json \
# >"${GITHUB_WORKSPACE}"/results.txt
# docker system prune --volumes -f

# - name: Check that their are 0 failed tests in the gradetool results
# run: |
# if $(jq '.[] | .Fail | length' "${GITHUB_WORKSPACE}"/results.txt | grep -q 0); then
# echo OK
# else
# echo "Gradetool has found failing tests in the following:"
# jq '.[] | .Fail | .[].id' "${GITHUB_WORKSPACE}"/results.txt
# exit 1
# fi

- name: 'Test: Run preflight specific test suite'
run: TNF_LOG_LEVEL=${TNF_SMOKE_TESTS_LOG_LEVEL} ./run-cnf-suites.sh -l "preflight"
Expand Down Expand Up @@ -404,28 +404,28 @@ jobs:
- name: Remove tarball(s) to save disk space.
run: rm -f ${{ env.TNF_OUTPUT_DIR }}/*.tar.gz

- name: Run gradetool on the claim.json.
run: |
docker run \
--rm \
--volume "${GITHUB_WORKSPACE}"/generated_policy.json:/policy.json \
--volume "${TNF_OUTPUT_DIR}"/claim.json:/claim.json \
${REGISTRY}/${GRADETOOL_IMAGE_NAME}:${GRADETOOL_IMAGE_TAG} \
--OutputPath results.txt \
--policy /policy.json \
--results /claim.json \
>"${GITHUB_WORKSPACE}"/results.txt
docker system prune --volumes -f
- name: Check that their are 0 failed tests in the gradetool results
run: |
if $(jq '.[] | .Fail | length' "${GITHUB_WORKSPACE}"/results.txt | grep -q 0); then
echo OK
else
echo "Gradetool has found failing tests in the following:"
jq '.[] | .Fail | .[].id' "${GITHUB_WORKSPACE}"/results.txt
exit 1
fi
# - name: Run gradetool on the claim.json.
# run: |
# docker run \
# --rm \
# --volume "${GITHUB_WORKSPACE}"/generated_policy.json:/policy.json \
# --volume "${TNF_OUTPUT_DIR}"/claim.json:/claim.json \
# ${REGISTRY}/${GRADETOOL_IMAGE_NAME}:${GRADETOOL_IMAGE_TAG} \
# --OutputPath results.txt \
# --policy /policy.json \
# --results /claim.json \
# >"${GITHUB_WORKSPACE}"/results.txt
# docker system prune --volumes -f

# - name: Check that their are 0 failed tests in the gradetool results
# run: |
# if $(jq '.[] | .Fail | length' "${GITHUB_WORKSPACE}"/results.txt | grep -q 0); then
# echo OK
# else
# echo "Gradetool has found failing tests in the following:"
# jq '.[] | .Fail | .[].id' "${GITHUB_WORKSPACE}"/results.txt
# exit 1
# fi

- name: 'Test: Run Preflight Specific Smoke Tests in a TNF container'
run: TNF_LOG_LEVEL=${TNF_SMOKE_TESTS_LOG_LEVEL} ./run-tnf-container.sh ${{ env.TESTING_CMD_PARAMS }} -l "preflight"
Expand Down
112 changes: 0 additions & 112 deletions cmd/tnf/claim/add/add.go

This file was deleted.

49 changes: 0 additions & 49 deletions cmd/tnf/claim/add/add_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions cmd/tnf/claim/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package claim

import (
"github.com/spf13/cobra"
"github.com/test-network-function/cnf-certification-test/cmd/tnf/claim/add"
"github.com/test-network-function/cnf-certification-test/cmd/tnf/claim/compare"
"github.com/test-network-function/cnf-certification-test/cmd/tnf/claim/show"
)
Expand All @@ -15,7 +14,6 @@ var (
)

func NewCommand() *cobra.Command {
claimCommand.AddCommand(add.NewCommand())
claimCommand.AddCommand(compare.NewCommand())
claimCommand.AddCommand(show.NewCommand())

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
github.com/test-network-function/test-network-function-claim v1.0.32
github.com/test-network-function/test-network-function-claim v1.0.33
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
gopkg.in/yaml.v2 v2.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,8 @@ github.com/test-network-function/oct v0.0.4 h1:rU4kps/gbAHkR0rc5WzVtTOcJt/NBcse8
github.com/test-network-function/oct v0.0.4/go.mod h1:oOPuUMnX6YR+cl3usBJfwCllsv7Hphw9jVi7VtniAzo=
github.com/test-network-function/privileged-daemonset v1.0.18 h1:BFGAz5A77VxJCfHx6YEI+QehEINfCHm7KB+35QebsWs=
github.com/test-network-function/privileged-daemonset v1.0.18/go.mod h1:zIxnKlnvftN62+38OCu/H7bLDjW3fzkpTY+lhyfxlPM=
github.com/test-network-function/test-network-function-claim v1.0.32 h1:GeUwbHYaXL5Yx785NmbuSQbqby8LVPEWHeW3bFEpQ9g=
github.com/test-network-function/test-network-function-claim v1.0.32/go.mod h1:+0c6DMF/ycFmEH3EB5mJ9rSQ+3T/d48NuqmY2aXjrqQ=
github.com/test-network-function/test-network-function-claim v1.0.33 h1:thLfqtzpXMNlmA8ZGpee3BUN+OfhRiFoTuEHWsE3d7Y=
github.com/test-network-function/test-network-function-claim v1.0.33/go.mod h1:+0c6DMF/ycFmEH3EB5mJ9rSQ+3T/d48NuqmY2aXjrqQ=
github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8=
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
Expand Down

0 comments on commit 1e6904b

Please sign in to comment.