1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16-
1716# This script performs the following actions:
1817#
1918# 1) Generates the resource typename to use for the e2e test. Note: we cannot use the default typeName as it will affect other cfn stacks/tests
@@ -26,6 +25,7 @@ set -eu
2625set -eux
2726
2827resource_directory=$RESOURCE_DIRECTORY_NAME
28+ e2e_test_directory=" ${E2E_TEST_DIRECTORY_NAME:- $resource_directory } "
2929
3030echo " Updating .rpdk-config with the E2E resource type $RESOURCE_TYPE_NAME_FOR_E2E "
3131rpdk_file=" ../../../$RESOURCE_DIRECTORY_NAME /.rpdk-config"
@@ -36,7 +36,6 @@ jq --arg type_name "$RESOURCE_TYPE_NAME_FOR_E2E" \
3636rm " ${rpdk_file} "
3737mv " ${tmp_rpdk_file} " " ${rpdk_file} "
3838
39-
4039echo " Creating a new resource schema"
4140schema_file_name=" ${resource_directory// -/ } "
4241echo " New schema file name: ${schema_file_name} "
@@ -50,8 +49,7 @@ echo "Releasing the resource to private registry $RESOURCE_TYPE_NAME_FOR_E2E"
5049cd ../../../" $resource_directory "
5150
5251make build && cfn submit --set-default
53- cd ../test/e2e/" $resource_directory "
54-
52+ cd ../test/e2e/" $e2e_test_directory "
5553
5654echo " Reverting .rpdk-config with the original resource typeName $RESOURCE_TYPE_NAME "
5755jq --arg type_name " $RESOURCE_TYPE_NAME " \
@@ -60,7 +58,6 @@ jq --arg type_name "$RESOURCE_TYPE_NAME" \
6058rm " ${rpdk_file} "
6159mv " ${tmp_rpdk_file} " " ${rpdk_file} "
6260
63-
6461echo " Deleting resource JSON schema used for the E2E test"
6562rm " ${tmp_resource_schema_file} "
6663
0 commit comments