Skip to content

Commit

Permalink
Move configmap testdata into zip
Browse files Browse the repository at this point in the history
Paths names starting with '..' are triggering errors when using Go
modules in Go >= 1.11 (1). To work around this we move the testdata
into an archive which is unzipped as part of the test.

(1) See: golang/go#24573
  • Loading branch information
Helcaraxan committed Mar 22, 2019
1 parent 46696ef commit ea24174
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 10 deletions.
Binary file added configmap/testdata.zip
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion configmap/testdata/..data

This file was deleted.

1 change: 0 additions & 1 deletion configmap/testdata/some_dynint

This file was deleted.

1 change: 0 additions & 1 deletion configmap/testdata/some_int

This file was deleted.

2 changes: 1 addition & 1 deletion configmap/updater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (s *updaterTestSuite) TearDownTest() {
}

func (s *updaterTestSuite) copyTestDataToDir() {
copyCmd := exec.Command("cp", "--archive", "testdata", s.tempDir)
copyCmd := exec.Command("unzip", "testdata.zip", "-d", s.tempDir)
require.NoError(s.T(), copyCmd.Run(), "copying testdata directory to tempdir must not fail")
}

Expand Down

0 comments on commit ea24174

Please sign in to comment.