| 
									
										
										
										
											2022-04-16 10:02:57 +00:00
										 |  |  | #!/bin/bash | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pwd=$PWD | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ( | 
					
						
							|  |  |  | cd terraform-provider-aws || exit | 
					
						
							|  |  |  | echo "Patching the terraform-provider-aws directory..." | 
					
						
							| 
									
										
										
										
											2023-04-08 10:33:09 +00:00
										 |  |  | echo "Patches may fail if the patch was already applied, or if the patch is outdated" | 
					
						
							| 
									
										
										
										
											2022-04-16 10:02:57 +00:00
										 |  |  | PATCH="etc/0001-Patch-Hardcode-endpoints-to-local-server.patch" | 
					
						
							| 
									
										
										
										
											2023-04-08 10:33:09 +00:00
										 |  |  | (git apply $pwd/etc/0001-Patch-Hardcode-endpoints-to-local-server.patch > /dev/null 2>&1 && echo "Patched endpoints") || echo "!! Not able to patch endpoints" | 
					
						
							| 
									
										
										
										
											2023-08-21 20:33:16 +00:00
										 |  |  | #(git apply $pwd/etc/0002-EC2-reduce-wait-times.patch > /dev/null 2>&1 && echo "Patched EC2") || echo "!! Not able to EC2" | 
					
						
							| 
									
										
										
										
											2023-04-08 10:33:09 +00:00
										 |  |  | (git apply $pwd/etc/0003-Patch-IAM-wait-times.patch > /dev/null 2>&1 && echo "Patched IAM") || echo "!! Not able to patch IAM" | 
					
						
							|  |  |  | (git apply $pwd/etc/0005-Route53-Reduce-wait-times.patch > /dev/null 2>&1 && echo "Patched Route53") || echo "!! Not able to patch Route53" | 
					
						
							|  |  |  | (git apply $pwd/etc/0006-CF-Reduce-wait-times.patch > /dev/null 2>&1 && echo "Patched CF") || echo "!! Not able to patch CF" | 
					
						
							|  |  |  | (git apply $pwd/etc/0007-Comprehend-Reduce-wait-times.patch > /dev/null 2>&1 && echo "Patched Comprehend") || echo "!! Not able to patch Comprehend" | 
					
						
							|  |  |  | (git apply $pwd/etc/0008-Patch-RDS-improvements.patch > /dev/null 2>&1 && echo "Patched RDS") || echo "!! Not able to patch RDS" | 
					
						
							| 
									
										
										
										
											2022-04-16 10:02:57 +00:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ( | 
					
						
							|  |  |  | cd terraform-provider-aws || exit | 
					
						
							|  |  |  | echo "Running tests $2 for service $1..." | 
					
						
							|  |  |  | AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test TF_ACC=true go test ./internal/service/$1/ -v -timeout 60m -run $2 | 
					
						
							|  |  |  | ) |