Skip to content
Snippets Groups Projects
Select Git revision
  • cadbe7d81deb872467bccd8b02b503c995442c4d
  • master default protected
  • bugfix/error-on-not-found-network
  • 5.0.2
  • 5.0.1
  • 5.0.0
  • 4.1.2
  • 4.1.1
  • 4.1.0
  • 4.0.0
  • 3.13.0
  • 3.12.2
  • 3.12.1
  • 3.12.0
  • 3.11.0
  • 3.10.1
  • 3.10.0
  • 3.9.2
  • 3.9.0
  • 3.8.1
  • 3.8.0
  • 3.7.1
  • 3.7.0
23 results

driver.go

Blame
  • test.sh 862 B
    #!/usr/bin/env bash
    set -e
    # only exit with zero if all commands of the pipeline exit successfully
    set -o pipefail
    
    # Make sure to use project tooling
    PATH="$(pwd)/tmp/bin:${PATH}"
    TESTFILE="$(pwd)/tmp/test.jsonnet"
    mkdir -p "$(pwd)/tmp"
    
    for i in examples/jsonnet-snippets/*.jsonnet; do
        [ -f "$i" ] || break
        echo "Testing: ${i}"
        echo ""
        fileContent=$(<"$i")
        snippet="local kp = $fileContent;
    
    $(<examples/jsonnet-build-snippet/build-snippet.jsonnet)"
        echo "${snippet}" > "${TESTFILE}"
        echo "\`\`\`"
        echo "${snippet}"
        echo "\`\`\`"
        echo ""
        jsonnet -J vendor "${TESTFILE}" > /dev/null
        rm -rf "${TESTFILE}"
    done
    
    for i in examples/*.jsonnet; do
        [ -f "$i" ] || break
        echo "Testing: ${i}"
        echo ""
        echo "\`\`\`"
        cat "${i}"
        echo "\`\`\`"
        echo ""
        jsonnet -J vendor "${i}" > /dev/null
    done