Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion configmap/testdata/..data

This file was deleted.

9 changes: 9 additions & 0 deletions configmap/updater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package configmap_test

import (
"path/filepath"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -67,6 +69,13 @@ func (s *updaterTestSuite) TearDownTest() {
func (s *updaterTestSuite) copyTestDataToDir() {
copyCmd := exec.Command("cp", "--archive", "testdata", s.tempDir)
require.NoError(s.T(), copyCmd.Run(), "copying testdata directory to tempdir must not fail")
// We are storing file testdata/9989_09_09_07_32_32.099817316 and renaming it to testdata/..9989_09_09_07_32_32.099817316,
// because go modules don't allow repos with files with .. in their filename. See https://github.com/golang/go/issues/27299.
for _, p := range []string{firstGoodDir, secondGoodDir, badStaticDir} {
pOld := filepath.Join(s.tempDir, "testdata", strings.TrimPrefix(p, ".."))
pNew := filepath.Join(s.tempDir, "testdata", p)
require.NoError(s.T(), os.Rename(pOld, pNew), "renaming %q to %q failed", pOld, pNew)
}
}

func (s *updaterTestSuite) linkDataDirTo(newDataDir string) {
Expand Down
14 changes: 14 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module github.com/mwitkow/go-flagz

require (
github.com/coreos/etcd v3.3.12+incompatible
github.com/coreos/go-semver v0.3.0 // indirect
github.com/fsnotify/fsnotify v1.4.7
github.com/golang/protobuf v1.3.1
github.com/prometheus/client_golang v0.9.2
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.3.0
github.com/ugorji/go v1.1.4 // indirect
golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6
golang.org/x/sys v0.0.0-20190425145619-16072639606e // indirect
)