From 29061ec0f83a6517492ccd856fb5305f04887f69 Mon Sep 17 00:00:00 2001 From: Chris Wolfe Date: Mon, 19 Feb 2018 09:10:52 -0600 Subject: [PATCH] add a basic test to start --- tests/test_ssm/test_ssm_boto3.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_ssm/test_ssm_boto3.py b/tests/test_ssm/test_ssm_boto3.py index ff8e5e8a..c9be673a 100644 --- a/tests/test_ssm/test_ssm_boto3.py +++ b/tests/test_ssm/test_ssm_boto3.py @@ -458,3 +458,20 @@ def test_add_remove_list_tags_for_resource(): ResourceType='Parameter' ) len(response['TagList']).should.equal(0) + + +@mock_ssm +def test_send_command(): + ssm_document = 'AWS-RunShellScript' + script = '#!/bin/bash\necho \'hello world\'' + + client = boto3.client('ssm', region_name='us-east-1') + response = client.send_command( + InstanceIds=['i-123456'], + DocumentName=ssm_document, + TimeoutSeconds=60, + Parameters={'commands': [script]}, + OutputS3BucketName='the-bucket' + ) + + assert response['Command']