Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][cmd/builder] Test for unreleased versions #10030

Merged
merged 11 commits into from
May 9, 2024
30 changes: 30 additions & 0 deletions cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,36 @@ func TestVersioning(t *testing.T) {
},
expectedErr: nil,
},
{
// Check that these tests won't break during a release,
// where the local version of these packages will not
// yet exist on the Go package repository.
description: "unreleased otel version",
cfgBuilder: func() Config {
cfg := NewDefaultConfig()
cfg.Verbose = true
cfg.Distribution.Go = "go"
cfg.Distribution.OtelColVersion = "1.9999.9999"
var err error
cfg.Exporters, err = parseModules([]Module{
{
GoMod: "go.opentelemetry.io/collector/exporter/otlpexporter v1.9999.9999",
},
})
require.NoError(t, err)
cfg.Receivers, err = parseModules([]Module{
{
GoMod: "go.opentelemetry.io/collector/receiver/otlpreceiver v1.9999.9999",
},
})
require.NoError(t, err)

cfg.Replaces = append(cfg.Replaces, replaces...)

return cfg
},
expectedErr: nil,
},
{
description: "old component version",
cfgBuilder: func() Config {
Expand Down
Loading