Skip to content

Commit

Permalink
Fix TestGenerateAndCompileDefault on windows
Browse files Browse the repository at this point in the history
Fixes open-telemetry#5403

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu committed Jun 3, 2022
1 parent 8ed9e43 commit 753835a
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
package builder

import (
"io/ioutil"
"log"
"os"
"runtime"
"testing"

"github.com/stretchr/testify/assert"
Expand All @@ -45,19 +41,11 @@ func TestGenerateInvalidOutputPath(t *testing.T) {
}

func TestGenerateAndCompileDefault(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("skipping the test on Windows, see https://github.com/open-telemetry/opentelemetry-collector/issues/5403")
}
dir, err := ioutil.TempDir("", "default")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(dir)
cfg := NewDefaultConfig()
cfg.Distribution.OutputPath = dir
cfg.Distribution.OutputPath = t.TempDir()

// we override this version, otherwise this would break during releases
cfg.Distribution.OtelColVersion = "0.38.0"
cfg.Distribution.OtelColVersion = "0.52.0"

assert.NoError(t, cfg.Validate())
require.NoError(t, GenerateAndCompile(cfg))
Expand Down

0 comments on commit 753835a

Please sign in to comment.