Skip to content

Commit

Permalink
feat: TNL-11060 get local tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
bszabo committed Sep 19, 2023
1 parent 15dfe4d commit 57c2072
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions scripts/aws/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import argparse
import logging
from deploy_common import deploy
from .deploy_common import deploy

if __name__ == '__main__':

Expand Down Expand Up @@ -66,4 +66,3 @@
'burst_limit': cli_args.burst_limit
}
deploy(cli_args, integration_settings, stage_settings)

2 changes: 1 addition & 1 deletion scripts/aws/deploy_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

"""Various functions for day-to-day management of AWS API Gateway instances."""

import argparse
import logging
import botocore.session
import botocore.exceptions
Expand Down Expand Up @@ -97,6 +96,7 @@ def update_stage(client, rest_api_id, stage_name, stage_settings):

return response


def deploy(cli_args, integration_settings, stage_settings):
session = botocore.session.get_session()
apig = session.create_client('apigateway', cli_args.aws_region)
Expand Down
5 changes: 4 additions & 1 deletion scripts/aws/deploy_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import argparse
import logging
from deploy_common import deploy
from .deploy_common import deploy

if __name__ == '__main__':

Expand Down Expand Up @@ -33,6 +33,8 @@
help="Default per-resource maximum rate limit")
parser.add_argument("--landing-page", required=True,
help="Location of landing page for 'root' level requests")
parser.add_argument("--edxapp-host", required=True,
help="Location of edxapp for request routing")
parser.add_argument('--studio-host', required=True,
help="Location of Studio IDA for request routing")

Expand All @@ -41,6 +43,7 @@
integration_settings = {
'id': cli_args.tag,
'landing_page': cli_args.landing_page,
'edxapp_host': cli_args.edxapp_host,
'studio_host': cli_args.studio_host,
}
stage_settings = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
Tests for scripts/aws/deploy.py
Tests for scripts/aws/deploy_common.py
"""
import boto3
import pytest
from moto import mock_apigateway
from unittest import TestCase
from deploy import get_api_id, get_next_stage, deploy_api, update_stage
from deploy_common import get_api_id, get_next_stage, deploy_api, update_stage


class DeployTest(TestCase):
Expand Down

0 comments on commit 57c2072

Please sign in to comment.