File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
samples/terraform-local-exec
test/WebApi.IntegrationTests/Resources Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 11# Terraform with local-exec
22
3- ## Run the sample
3+ ## Setup
4+
5+ Run the application, from the command line or the IDE.
6+
7+ [ Terraform binary] ( https://developer.hashicorp.com/terraform/install ) is the only other tool required on the machine.
8+
9+ ## Workflow
410
511Go to the sample directory:
612
Original file line number Diff line number Diff line change @@ -23,20 +23,21 @@ public async Task StateResource_GetNotExisting_ReturnsNoContent()
2323 }
2424
2525 [ Fact ]
26- public async Task StateResource_CreateNew_ReturnsCreated ( )
26+ public async Task StateResource_CreateFindDelete_IsSuccess ( )
2727 {
2828 // Arrange
2929 var client = CreateClient ( true ) ;
3030 var name = Faker . Random . Word ( ) ;
31- var lockId = Faker . Random . Guid ( ) . ToString ( ) ;
3231 var payload = GeneratePayload ( ) ;
3332
34- // Act
35- var response = await client . PostAsync ( $ "/state/{ name } ?ID={ lockId } ", payload ) ;
36-
37- // Assert
33+ // Act & Assert
34+ var createResponse = await client . PostAsync ( $ "/state/{ name } ", payload ) ;
3835 //TODO: test resource URL in response
39- await response . CheckResponseAndGetContent ( HttpStatusCode . OK , null , string . Empty ) ;
36+ await createResponse . CheckResponseAndGetContent ( HttpStatusCode . OK , null , string . Empty ) ;
37+ var findResponse = await client . GetAsync ( $ "/state/{ name } ") ;
38+ await findResponse . CheckResponseAndGetContent ( HttpStatusCode . OK , "text/plain; charset=utf-8" ) ;
39+ var deleteResponse = await client . DeleteAsync ( $ "/state/{ name } ") ;
40+ await deleteResponse . CheckResponseAndGetContent ( HttpStatusCode . OK , null ) ;
4041 }
4142
4243 [ Fact ]
You can’t perform that action at this time.
0 commit comments