1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16+
1617# This script performs the following actions:
1718#
1819# 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
@@ -25,7 +26,6 @@ set -eu
2526set -eux
2627
2728resource_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,6 +36,7 @@ jq --arg type_name "$RESOURCE_TYPE_NAME_FOR_E2E" \
3636rm " ${rpdk_file} "
3737mv " ${tmp_rpdk_file} " " ${rpdk_file} "
3838
39+
3940echo " Creating a new resource schema"
4041schema_file_name=" ${resource_directory// -/ } "
4142echo " New schema file name: ${schema_file_name} "
@@ -49,7 +50,8 @@ echo "Releasing the resource to private registry $RESOURCE_TYPE_NAME_FOR_E2E"
4950cd ../../../" $resource_directory "
5051
5152make build && cfn submit --set-default
52- cd ../test/e2e/" $e2e_test_directory "
53+ cd ../test/e2e/" $resource_directory "
54+
5355
5456echo " Reverting .rpdk-config with the original resource typeName $RESOURCE_TYPE_NAME "
5557jq --arg type_name " $RESOURCE_TYPE_NAME " \
@@ -58,6 +60,7 @@ jq --arg type_name "$RESOURCE_TYPE_NAME" \
5860rm " ${rpdk_file} "
5961mv " ${tmp_rpdk_file} " " ${rpdk_file} "
6062
63+
6164echo " Deleting resource JSON schema used for the E2E test"
6265rm " ${tmp_resource_schema_file} "
6366
0 commit comments