Skip to content

Commit

Permalink
Test for getting-started repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed May 19, 2018
1 parent e3667fe commit d17ce10
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/journeys/dockerfile-gen/zz-getting-started.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

cat <<DOCKERFILE
from alpine:latest
run apk -U --no-cache add git bash
DOCKERFILE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
wget: unrecognized option: show-progress
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.

Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

--spider Only check URL existence: $? is 0 if exists
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-T SEC Network read timeout is SEC seconds
-O FILE Save to FILE ('-' for stdout)
-U STR Use STR for User-Agent header
-Y on/off Use proxy
{
"a": 42
}
31 changes: 31 additions & 0 deletions tests/journeys/zz-getting-started.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -eu

root="$(cd "${0%/*}" && pwd)"
# shellcheck source=./tests/utilities.sh
source "$root/../utilities.sh"

SUCCESSFULLY=0

fixture="$root/fixtures"
snapshot="$fixture/snapshots/getting-started"

(sandbox
title "getting started"
(with "a standard alpine image"
(with "a clone of the getting-started repository"
{
git clone https://github.com/share-secrets-safely/getting-started /getting-started
cd /getting-started/
} > /dev/null

(when "executing one of the wrappers"
it "succeeds" && {
WITH_SNAPSHOT="$snapshot/syv-output-on-alpine" \
expect_run $SUCCESSFULLY ./syp a=42
}
)
)
)
)

0 comments on commit d17ce10

Please sign in to comment.