chore: remove go generate from CI tests (#10977)

This commit is contained in:
Joshua Powers 2022-04-12 13:49:10 -06:00 committed by GitHub
parent bed3b4b01b
commit ad2a0e52a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 14 deletions

View File

@ -78,7 +78,6 @@ commands:
key: windows-go-<< parameters.cache_version >>-{{ checksum "go.sum" }}
- run: 'sh ./scripts/installgo_windows.sh'
- run: choco install mingw
- run: 'make generate'
- run: mkdir -p test-results
- run: ./scripts/install_gotestsum.sh << parameters.os >> << parameters.gotestsum >>
- unless:
@ -121,7 +120,6 @@ commands:
paths:
- 'C:\Go'
- 'C:\Users\circleci\project\gotestsum.exe'
- run: 'make generate-clean'
package-build:
parameters:
type:

View File

@ -5,13 +5,11 @@ import (
"crypto/tls"
"fmt"
"os"
"regexp"
"strings"
"testing"
"time"
"unsafe"
"github.com/influxdata/toml"
"github.com/stretchr/testify/require"
"github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/simulator"
@ -222,16 +220,6 @@ func TestAlignMetrics(t *testing.T) {
}
}
func TestParseConfig(t *testing.T) {
v := VSphere{}
c := v.SampleConfig()
p := regexp.MustCompile("\n#")
c = configHeader + "\n[[inputs.vsphere]]\n" + p.ReplaceAllLiteralString(c, "\n")
tab, err := toml.Parse([]byte(c))
require.NoError(t, err)
require.NotNil(t, tab)
}
func TestConfigDurationParsing(t *testing.T) {
v := defaultVSphere()
require.Equal(t, int32(300), int32(time.Duration(v.HistoricalInterval).Seconds()), "HistoricalInterval.Seconds() with default duration should resolve 300")