#!/bin/bash eval "$(curl -q -s https://raw.githubusercontent.com/coryb/osht/master/osht.sh)" cd $(dirname $0) jira="../jira" . env.sh PLAN 43 # reset login RUNS $jira logout RUNS $jira login # cleanup from previous failed test executions ($jira ls --project BASIC | awk -F: '{print $1}' | while read issue; do ../jira done $issue; done) | sed 's/^/# CLEANUP: /g' ############################################################################### ## Create an issue ############################################################################### RUNS $jira create --project BASIC -o summary="Attach To Me" -o description=description --noedit --saveFile issue.props issue=$(awk '/issue/{print $2}' issue.props) DIFF < attach1.txt" # verify no diffs RUNS diff -q README.md attach1.txt ############################################################################### ## Fetch text attachment as same name ############################################################################### RUNS $jira attach get $attach1 DIFF < binary.out" # verify no diffs RUNS diff -q garbage.bin binary.out ############################################################################### ## Fetch binary attachment ############################################################################### RUNS $jira attach get $attach3 DIFF < binary.out" # verify no diffs RUNS diff -q garbage.bin binary.out ############################################################################### ## Delete attachment ############################################################################### RUNS $jira attach remove $attach1 DIFF <