Add missing test cases for s3 IAM checks

ShouldUseIAMCredentials checks if any of the fields are empty if one of
them is empty it will return true.

Most test cases are missing, the only thing tested is when all fields
are empty.

In
!1365 (comment 183850614)
a change was made that would have broken the check but CI did not catch
this.
41 jobs for add-test-cases-for-s3 in 77 minutes and 49 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Prebuild
passed #237371956
check feature flags docs

00:01:49

passed #237371947
clone test repo

00:01:48

passed #237371955
dep check

00:01:31

passed #237371945
docker
helper images

00:06:02

manual #237371949
allowed to fail manual
review-docs-deploy
passed #237371953
gitlab-org
tests definitions

00:03:08

 
  Test
passed #237371959
code_quality

00:01:06

passed #237371988
docs check links

00:01:02

passed #237372002
git 1.7.1

00:03:20

passed #237371958
allowed to fail
license_management

00:04:12

passed #237371961
docker
unit test 1/5

00:07:57

passed #237371965
docker
unit test 2/5

00:16:25

passed #237371968
docker
unit test 3/5

00:11:19

passed #237371971
docker
unit test 4/5

00:04:20

passed #237371972
docker
unit test 5/5

00:05:57

passed #237371976
docker allowed to fail
unit test with race 1/5

00:12:48

failed #237371978
docker allowed to fail
unit test with race 2/5

00:17:43

failed #237371981
docker allowed to fail
unit test with race 3/5

00:12:48

passed #237371983
docker allowed to fail
unit test with race 4/5

00:05:32

passed #237371985
docker allowed to fail
unit test with race 5/5

00:05:35

failed #237371989
shell windows-1803 allowed to fail
windows 1803 tests 1/3

00:33:42

failed #237371991
shell windows-1803 allowed to fail
windows 1803 tests 2/3

00:43:05

failed #237371994
shell windows-1803 allowed to fail
windows 1803 tests 3/3

00:09:36

failed #237371995
shell windows-1809 allowed to fail
windows 1809 tests 1/3

00:23:58

failed #237371997
shell windows-1809 allowed to fail
windows 1809 tests 2/3

00:49:39

failed #237372000
shell windows-1809 allowed to fail
windows 1809 tests 3/3

00:10:58

 
  Coverage
passed #237372007
race conditions detector

00:01:00

passed #237372005
test coverage report

00:00:56

62.4%
passed #237372008
test junit report

00:01:19

 
  Build
passed #237372011
gitlab-org
binaries darwin/386 darwin/amd64

00:03:48

passed #237372013
gitlab-org
binaries freebsd/386 freebsd/amd64 freebsd/arm

00:04:55

passed #237372015
gitlab-org
binaries linux/386 linux/amd64 linux/arm

00:04:51

passed #237372018
gitlab-org
binaries windows/386 windows/amd64

00:03:45

 
  Package
passed #237372019
gitlab-org
package-deb

00:02:03

passed #237372020
gitlab-org
package-rpm

00:02:06

 
  Release
passed #237372021
release
development S3

00:02:01

passed #237372022
docker
development docker images

00:03:21

passed #237372024
shell windows-1803
development servercore1803 helper docker image

00:04:30

passed #237372025
shell windows-1809
development servercore1809 helper docker image

00:02:19

passed #237372026
static QA

00:00:42

 
  Cleanup
manual #237372027
allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
windows 1803 tests 2/3 Test
gitlab.com/gitlab-org/gitlab-runner/executors/shell-2

gitlab.com/gitlab-org/gitlab-runner/executors/shell-3
gitlab.com/gitlab-org/gitlab-runner/helpers/archives-0
gitlab.com/gitlab-org/gitlab-runner/helpers/archives-1


Running after script...
$ if (Test-Path $PKG_BUILD_DIR) { $(Get-Item $PKG_BUILD_DIR).Delete() }
ERROR: Job failed: exit status 1
failed
windows 1809 tests 2/3 Test
gitlab.com/gitlab-org/gitlab-runner/executors/shell-2

gitlab.com/gitlab-org/gitlab-runner/executors/shell-3
gitlab.com/gitlab-org/gitlab-runner/helpers/archives-0
gitlab.com/gitlab-org/gitlab-runner/helpers/archives-1


Running after script...
$ if (Test-Path $PKG_BUILD_DIR) { $(Get-Item $PKG_BUILD_DIR).Delete() }
ERROR: Job failed: exit status 1
failed
windows 1803 tests 3/3 Test
ok  	gitlab.com/gitlab-org/gitlab-runner/shells	4.101s

WARNING: Failed packages:
WARNING: gitlab.com/gitlab-org/gitlab-runner/helpers/docker-0


Running after script...
$ if (Test-Path $PKG_BUILD_DIR) { $(Get-Item $PKG_BUILD_DIR).Delete() }
ERROR: Job failed: exit status 1
failed
windows 1809 tests 3/3 Test
ok  	gitlab.com/gitlab-org/gitlab-runner/shells	5.480s

WARNING: Failed packages:
WARNING: gitlab.com/gitlab-org/gitlab-runner/helpers/docker-0


Running after script...
$ if (Test-Path $PKG_BUILD_DIR) { $(Get-Item $PKG_BUILD_DIR).Delete() }
ERROR: Job failed: exit status 1
failed
windows 1809 tests 1/3 Test
gitlab.com/gitlab-org/gitlab-runner/executors/docker-2

gitlab.com/gitlab-org/gitlab-runner/executors/docker-4
gitlab.com/gitlab-org/gitlab-runner/executors/docker-5
gitlab.com/gitlab-org/gitlab-runner/executors/docker-6


Running after script...
$ if (Test-Path $PKG_BUILD_DIR) { $(Get-Item $PKG_BUILD_DIR).Delete() }
ERROR: Job failed: exit status 1
failed
windows 1803 tests 1/3 Test
gitlab.com/gitlab-org/gitlab-runner/executors/docker-2

gitlab.com/gitlab-org/gitlab-runner/executors/docker-4
gitlab.com/gitlab-org/gitlab-runner/executors/docker-5
gitlab.com/gitlab-org/gitlab-runner/executors/docker-6


Running after script...
$ if (Test-Path $PKG_BUILD_DIR) { $(Get-Item $PKG_BUILD_DIR).Delete() }
ERROR: Job failed: exit status 1
failed
unit test with race 2/5 Test
exit status 1
FAIL gitlab.com/gitlab-org/gitlab-runner/executors/docker/machine 0.133s
Makefile:134: recipe for target 'parallel_test_execute' failed
make: *** [parallel_test_execute] Error 1
Uploading artifacts...
.cover/*: found 14 matching files
.testoutput/*: found 14 matching files

Uploading artifacts to coordinator... ok
id=237371978 responseStatus=201 Created token=D2n94koJ
ERROR: Job failed: exit code 1
failed
unit test with race 3/5 Test
=== RUN   TestExtractZipFileNotFound
--- PASS: TestExtractZipFileNotFound (0.00s)
PASS
coverage: 62.4% of statements
ok gitlab.com/gitlab-org/gitlab-runner/helpers/archives 1.034s
Makefile:134: recipe for target 'parallel_test_execute' failed
make: *** [parallel_test_execute] Error 1
Uploading artifacts...
.cover/*: found 14 matching files
.testoutput/*: found 14 matching files