mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
# Motivation We have quite a lot of shell scripts in our repo and want to make sure that they all pass `shellcheck`. # Modification This PR adds a GH action workflow to the soundness script for `shellcheck` and fixes up all errors and warnings. # Result No more shell/bash discussions
26 lines
913 B
Bash
26 lines
913 B
Bash
#!/bin/bash
|
|
##===----------------------------------------------------------------------===##
|
|
##
|
|
## This source file is part of the SwiftNIO open source project
|
|
##
|
|
## Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
|
|
## Licensed under Apache License v2.0
|
|
##
|
|
## See LICENSE.txt for license information
|
|
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
##
|
|
## SPDX-License-Identifier: Apache-2.0
|
|
##
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
# shellcheck source=IntegrationTests/tests_01_http/defines.sh
|
|
source defines.sh
|
|
|
|
token=$(create_token)
|
|
start_server "$token"
|
|
dd if=/dev/urandom of="${tmp:?"tmp variable not set"}/random.bytes" bs=$((64*1024)) count=1
|
|
do_curl "$token" --data-binary "@$tmp/random.bytes" \
|
|
"http://foobar.com/dynamic/echo" > "$tmp/random.bytes.out"
|
|
cmp "$tmp/random.bytes" "$tmp/random.bytes.out"
|
|
stop_server "$token"
|