Parametrize e2e tests to also check AWS environments.

- Fix destroy runner after timeout.
- Add file deletion
This commit is contained in:
Maximilian Paß
2022-02-03 14:32:05 +01:00
parent 13eaa61f3b
commit 4ffbb712ed
13 changed files with 505 additions and 342 deletions

View File

@ -66,7 +66,7 @@ func TestAWSEnvironmentManager_Get(t *testing.T) {
})
t.Run("Returns environment when it was added before", func(t *testing.T) {
expectedEnvironment := NewAWSEnvironment()
expectedEnvironment := NewAWSEnvironment(nil)
expectedEnvironment.SetID(tests.DefaultEnvironmentIDAsInteger)
runnerManager.StoreEnvironment(expectedEnvironment)
@ -82,7 +82,7 @@ func TestAWSEnvironmentManager_List(t *testing.T) {
t.Run("returs also environments of the rest of the manager chain", func(t *testing.T) {
nextHandler := &ManagerHandlerMock{}
existingEnvironment := NewAWSEnvironment()
existingEnvironment := NewAWSEnvironment(nil)
nextHandler.On("List", mock.AnythingOfType("bool")).
Return([]runner.ExecutionEnvironment{existingEnvironment}, nil)
m.SetNextHandler(nextHandler)
@ -95,7 +95,7 @@ func TestAWSEnvironmentManager_List(t *testing.T) {
m.SetNextHandler(nil)
t.Run("Returns added environment", func(t *testing.T) {
localEnvironment := NewAWSEnvironment()
localEnvironment := NewAWSEnvironment(nil)
localEnvironment.SetID(tests.DefaultEnvironmentIDAsInteger)
runnerManager.StoreEnvironment(localEnvironment)