Skip to content

Commit

Permalink
Add license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
suizman committed Apr 15, 2019
1 parent c42895d commit ae81013
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/gossip/add.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
#!/bin/bash

# Copyright 2018-2019 Banco Bilbao Vizcaya Argentaria, S.A.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if ! which envsubst
then
echo -e "Please install envsubst. OSX -> brew install gettext ; brew link --force gettext"
exit 1
fi

# client options
CLIENT_CONFIG=()
CLIENT_CONFIG+=("--log debug")
Expand Down
13 changes: 13 additions & 0 deletions tests/gossip/getsnapshot.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/bash

# Copyright 2018-2019 Banco Bilbao Vizcaya Argentaria, S.A.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

raw=$(curl -s "http://localhost:8888/snapshot?v=$1")

history=$(echo $raw | jq -r '.Snapshot.HistoryDigest' | base64 -d | xxd -c64 -g64 | cut -f2 -d' ')
Expand Down
13 changes: 13 additions & 0 deletions tests/gossip/tamperhistory.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/bash

# Copyright 2018-2019 Banco Bilbao Vizcaya Argentaria, S.A.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

curl -X PATCH http://localhost:18800/tamper -H 'Api-Key: blah' -d \
'{"digest":"$1", "value":"$2"}'

13 changes: 13 additions & 0 deletions tests/gossip/tamperhyper.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/bash

# Copyright 2018-2019 Banco Bilbao Vizcaya Argentaria, S.A.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

curl -X DELETE http://localhost:18800/tamper -H 'Api-Key: blah' -d \
'{"digest":"'$1'" , "value": "'$2'"}'

0 comments on commit ae81013

Please sign in to comment.