Skip to content

Commit

Permalink
dev work update tests (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
8naama authored Jul 21, 2024
1 parent 483f0dc commit c9b3553
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
name: Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.22
- name: Test
# We exclude kibana_objects tests
run: go test $(go list ./... | grep -v kibana_objects)
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
name: Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.22
- name: Before install
run: |
go get golang.org/x/tools/cmd/cover
Expand Down
9 changes: 7 additions & 2 deletions metrics_accounts/metrics_account_create_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ func TestIntegrationMetricsAccount_CreateMetricsAccountNoAccountName(t *testing.
createMetricsAccount.AccountName = ""
metricsAccount, err := underTest.CreateMetricsAccount(createMetricsAccount)

assert.Error(t, err)
assert.Nil(t, metricsAccount)
if assert.NoError(t, err) && assert.NotNil(t, metricsAccount) {
time.Sleep(4 * time.Second)
defer underTest.DeleteMetricsAccount(int64(metricsAccount.Id))
assert.NotEmpty(t, metricsAccount.Token)
assert.NotEmpty(t, metricsAccount.Id)
assert.Equal(t, metricsAccount.AccountName, "IntegrationsTeamTesting_metrics")
}
}
}

0 comments on commit c9b3553

Please sign in to comment.