Skip to content

Commit befbf6e

Browse files
PauloGoncalvesBHPaulo Gonçalves
authored andcommitted
test(infra): avoid test caching
1 parent 7683cd0 commit befbf6e

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ go mod tidy
136136

137137
3. Execute os testes:
138138
```sh
139-
go test -v -timeout 10m
139+
go test -count=1 -v -timeout 5m
140140
```
141141

142142
> Para saber mais sobre teste de infraestrutura recomendo o texto [What Is Infrastructure Testing And Why Is It Needed](https://www.softwaretestinghelp.com/infrastructure-testing-tutorial/).

.github/workflows/continuous_delivery.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
- name: Install dependencies
130130
run: cd test/infra && go mod tidy
131131
- name: Run infra test
132-
run: cd test/infra && go test -v -timeout 10m
132+
run: cd test/infra && go test -count=1 -v -timeout 5m
133133

134134
test-contract:
135135

.github/workflows/continuous_integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
- name: Install dependencies
132132
run: cd test/infra && go mod tidy
133133
- name: Run infra test
134-
run: cd test/infra && go test -v -timeout 10m
134+
run: cd test/infra && go test -count=1 -v -timeout 5m
135135

136136
test-contract:
137137

test/infra/docker_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ func packageJsonVersion() string {
2525

2626
func TestDockerWithHelpFlag(t *testing.T) {
2727
// Configure the tag to use on the Docker image.
28-
tag := "paulogoncalvesbh/serverest"
28+
tag := "serverest-terratest"
2929
buildOptions := &docker.BuildOptions{
3030
Tags: []string{tag},
31-
Target: "prod",
31+
OtherOptions: []string{
32+
"--no-cache",
33+
},
3234
}
3335

3436
// Build the Docker image.

0 commit comments

Comments
 (0)