Initial commit

This commit is contained in:
Alexis Vanier
2020-01-09 17:06:03 -05:00
committed by Alexis Vanier
commit ebbf79ce68
23 changed files with 1443 additions and 0 deletions

20
test-bins/pr/test-check.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
version="${version:=0}"
read -r -d '' payload <<EOF
{
"source": {
"api_token": "",
"repo": "test-repo",
"owner": "${USER}",
"hostname": "127.0.0.1",
"port": "3000",
"insecure": true,
"skip_ssl_verification": true
},
"version": { "number": "${version}" }
}
EOF
go run main.go --action check pr <<< "${payload}"

28
test-bins/pr/test-get.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
workdir="$(mktemp -d)"
function finish {
rm -rf "${workdir}"
}
trap finish EXIT
version="${version:=1}"
read -r -d '' payload <<EOF
{
"source": {
"api_token": "",
"repo": "test-repo",
"owner": "${USER}",
"hostname": "127.0.0.1",
"port": "3000",
"insecure": true,
"skip_ssl_verification": true
},
"version": { "number": "${version}" }
}
EOF
go run main.go --action get pr --destination "${workdir}" <<< "${payload}"
cat "${workdir}"/*