AWSI Gems Automation Update Jenkins configuration (Windows Only) (#923)

AWS Automation test fixes to run on AR.

* Enable AWS automation tests

* Testing by making test part of main suite

* Fix tests target path

* Adding __init__.py for CLI to work

* Revert "Merge pull request #868 from aws-lumberyard-dev/LYN-3974"

This reverts commit 7c2051ae54, reversing
changes made to d8bd6ef407.

* Using absolute path in resource mappings

* Rexporting client auth automation tests level

* Adding null renderer param to AWS automation tests launchers

* Adding rhi null flag to run null renderer

* Remove extra hyphen from rhi param

* Updating rhi param

* Adding rhi param to launcher

* Fix rhi param and reexport client auth levels

* Disable AWS automation tests and remove client auth levels'
main
amzn-hdoke 5 years ago committed by GitHub
parent 35f09b0c3a
commit a1514eb0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,16 +16,16 @@
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
# Enable after installing NodeJS and CDK on jenkins Windows AMI. # Enable after installing NodeJS and CDK on jenkins Windows AMI.
#ly_add_pytest( ly_add_pytest(
# NAME AutomatedTesting::AWSTests NAME AutomatedTesting::AWSTests
# TEST_SUITE periodic TEST_SUITE periodic
# TEST_SERIAL TEST_SERIAL
# PATH ${CMAKE_CURRENT_LIST_DIR}/AWS/${PAL_PLATFORM_NAME}/ PATH ${CMAKE_CURRENT_LIST_DIR}/${PAL_PLATFORM_NAME}/
# RUNTIME_DEPENDENCIES RUNTIME_DEPENDENCIES
# Legacy::Editor Legacy::Editor
# AZ::AssetProcessor AZ::AssetProcessor
# AutomatedTesting.Assets AutomatedTesting.Assets
# COMPONENT COMPONENT
# AWS AWS
#) )
endif() endif()

@ -0,0 +1,11 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""

@ -0,0 +1,11 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""

@ -0,0 +1,11 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""

@ -68,6 +68,7 @@ class TestAWSClientAuthAnonymousCredentials(object):
log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor)
launcher.args = ['+LoadLevel', level] launcher.args = ['+LoadLevel', level]
launcher.args.extend(['-rhi=null'])
with launcher.start(launch_ap=False): with launcher.start(launch_ap=False):
result = log_monitor.monitor_log_for_lines( result = log_monitor.monitor_log_for_lines(

@ -67,6 +67,7 @@ class TestAWSClientAuthPasswordSignIn(object):
log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor)
launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignUp'] launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignUp']
launcher.args.extend(['-rhi=null'])
with launcher.start(launch_ap=False): with launcher.start(launch_ap=False):
result = log_monitor.monitor_log_for_lines( result = log_monitor.monitor_log_for_lines(
@ -87,6 +88,7 @@ class TestAWSClientAuthPasswordSignIn(object):
) )
launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignIn'] launcher.args = ['+LoadLevel', 'AWS/ClientAuthPasswordSignIn']
launcher.args.extend(['-rhi=null'])
with launcher.start(launch_ap=False): with launcher.start(launch_ap=False):
result = log_monitor.monitor_log_for_lines( result = log_monitor.monitor_log_for_lines(

@ -10,8 +10,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
""" """
import os import os
from os.path import abspath
import pytest import pytest
import json import json
import logging
logger = logging.getLogger(__name__)
AWS_RESOURCE_MAPPINGS_KEY = 'AWSResourceMappings' AWS_RESOURCE_MAPPINGS_KEY = 'AWSResourceMappings'
AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY = 'AccountId' AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY = 'AccountId'
@ -57,9 +61,9 @@ class ResourceMappings:
stacks = response.get('Stacks', []) stacks = response.get('Stacks', [])
assert len(stacks) == 1, f'{stack_name} is invalid.' assert len(stacks) == 1, f'{stack_name} is invalid.'
self.__write_resource_mappings(stacks[0].get('Outputs', [])) self._write_resource_mappings(stacks[0].get('Outputs', []))
def __write_resource_mappings(self, outputs, append_feature_name = True) -> None: def _write_resource_mappings(self, outputs, append_feature_name = True) -> None:
with open(self._resource_mapping_file_path) as file_content: with open(self._resource_mapping_file_path) as file_content:
resource_mappings = json.load(file_content) resource_mappings = json.load(file_content)
@ -129,8 +133,10 @@ def resource_mappings(
:return: ResourceMappings class object. :return: ResourceMappings class object.
""" """
path = f'{workspace.paths.engine_root()}\\{project}\\Config\\{resource_mappings_filename}' path = f'{workspace.paths.engine_root()}/{project}/Config/{resource_mappings_filename}'
resource_mappings_obj = ResourceMappings(path, aws_utils.assume_session().region_name, feature_name, logger.info(f'Resource mapping path : {path}')
logger.info(f'Resource mapping resolved path : {abspath(path)}')
resource_mappings_obj = ResourceMappings(abspath(path), aws_utils.assume_session().region_name, feature_name,
aws_utils.assume_account_id(), workspace, aws_utils.assume_account_id(), workspace,
aws_utils.client('cloudformation')) aws_utils.client('cloudformation'))

@ -0,0 +1,11 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
Loading…
Cancel
Save