moto/.github/workflows/tests_sdk_dotnet.yml
Demetrios Tsillas c6b3e5a370
EBS: Some fixes to snapshot uploading (#6520)
* Two fixes to support Citrix AWS hypervisor plugin: ebs responses for putting a block and completing a snapshot should be 201 and 202 respectively rather than 200; If the body cannot be utf-8 decoded, try base64.Z

* Update responses.py

* Update responses.py

* Update responses.py

* Add EBS snapshot unit test

* EBS: put_snapshot_block() should support raw bytes

---------

Co-authored-by: Demetrios Tsillas <Demetrios.Tsillas@citrix.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2023-09-15 07:42:40 +00:00

36 lines
1.3 KiB
YAML

name: .NET SDK test
on: [workflow_call]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Start MotoServer
run: |
pip install build
python -m build
docker run --rm -t --name motoserver -e TEST_SERVER_MODE=true -e AWS_SECRET_ACCESS_KEY=server_secret -e AWS_ACCESS_KEY_ID=server_key -v `pwd`:/moto -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock python:3.7-buster /moto/scripts/ci_moto_server.sh &
python scripts/ci_wait_for_server.py
- uses: actions/setup-dotnet@v3
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget
restore-keys: |
${{ runner.os }}-nuget
- name: Install dependencies
run: cd other_langs/tests_dotnet && dotnet restore ExampleTestProject/ && dotnet restore ebs
- name: Run tests
run: |
mkdir ~/.aws && touch ~/.aws/credentials && echo -e "[default]\naws_access_key_id = test\naws_secret_access_key = test" > ~/.aws/credentials
cd other_langs/tests_dotnet && dotnet test ExampleTestProject/ && dotnet restore ebs