Skip to content

Commit 0bc28f7

Browse files
committed
testserver: move from internal to pkg
1 parent f2cd4c2 commit 0bc28f7

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

controllers/gitrepository_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"k8s.io/apimachinery/pkg/types"
4040

4141
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
42-
"github.com/fluxcd/source-controller/internal/testserver"
42+
"github.com/fluxcd/source-controller/pkg/testserver"
4343
)
4444

4545
var _ = Describe("GitRepositoryReconciler", func() {

controllers/helmchart_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"k8s.io/apimachinery/pkg/types"
3232

3333
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
34-
"github.com/fluxcd/source-controller/internal/testserver"
34+
"github.com/fluxcd/source-controller/pkg/testserver"
3535
)
3636

3737
var _ = Describe("HelmChartReconciler", func() {

controllers/helmrepository_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"k8s.io/apimachinery/pkg/types"
3232

3333
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
34-
"github.com/fluxcd/source-controller/internal/testserver"
34+
"github.com/fluxcd/source-controller/pkg/testserver"
3535
)
3636

3737
var _ = Describe("HelmRepositoryReconciler", func() {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,23 @@ func (s *ArtifactServer) ArtifactFromBytes(files []File) (string, error) {
6262
tw := tar.NewWriter(gw)
6363
defer tw.Close()
6464

65-
for _, file := range files {
65+
for _, f := range files {
6666
hdr := &tar.Header{
67-
Name: file.Name,
67+
Name: f.Name,
6868
Mode: 0600,
69-
Size: int64(len(file.Body)),
69+
Size: int64(len(f.Body)),
7070
}
7171
if err := tw.WriteHeader(hdr); err != nil {
7272
return "", err
7373
}
74-
if _, err := tw.Write([]byte(file.Body)); err != nil {
74+
if _, err := tw.Write([]byte(f.Body)); err != nil {
7575
return "", err
7676
}
7777
}
7878
return fileName, nil
7979
}
8080

81-
// URLForFile returns the URL the given file path can be reached at or
81+
// URLForFile returns the URL the given file can be reached at or
8282
// an error if the server has not been started.
8383
func (s *ArtifactServer) URLForFile(file string) (string, error) {
8484
if s.URL() == "" {

0 commit comments

Comments
 (0)