Skip to content

Commit

Permalink
move to pkg and fix test paths
Browse files Browse the repository at this point in the history
Signed-off-by: Zahari Dichev <[email protected]>
  • Loading branch information
zaharidichev committed Apr 1, 2024
1 parent 194719b commit dcb5582
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM --platform=$BUILDPLATFORM golang:1.22-alpine as go
WORKDIR /build
COPY --link go.mod go.sum .
COPY --link ./proxy-init ./proxy-init
COPY --link ./internal ./internal
COPY --link ./pkg ./pkg
RUN go mod download
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH GO111MODULE=on \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-cni-plugin
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /build
COPY --link go.mod go.sum ./
COPY --link ./cni-plugin ./cni-plugin
COPY --link ./proxy-init ./proxy-init
COPY --link ./internal ./internal
COPY --link ./pkg ./pkg
RUN go mod download
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH GO111MODULE=on \
Expand Down
2 changes: 1 addition & 1 deletion cni-plugin/integration/Dockerfile-tester
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ ENV GOCACHE=/tmp/
WORKDIR /src
COPY --link go.mod go.sum .
COPY --link cni-plugin cni-plugin
COPY --link internal internal
COPY --link pkg pkg
COPY --link proxy-init proxy-init
RUN go mod tidy && go mod download
2 changes: 1 addition & 1 deletion cni-plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/containernetworking/cni/pkg/types"
cniv1 "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/cni/pkg/version"
"github.com/linkerd/linkerd2-proxy-init/iptables"
"github.com/linkerd/linkerd2-proxy-init/pkg/iptables"
"github.com/linkerd/linkerd2-proxy-init/proxy-init/cmd"

"github.com/sirupsen/logrus"
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ proxy-init-lint *flags:
# Run proxy-init unit tests
proxy-init-test-unit:
go test -v ./proxy-init/...
go test -v ./internal/...
go test -v ./pkg/...

# Run proxy-init integration tests after preparing dependencies
proxy-init-test-integration: proxy-init-test-integration-deps proxy-init-test-integration-run
Expand Down Expand Up @@ -161,7 +161,7 @@ build-cni-plugin-test-image *args='--load':

##
## CNI plugin integration
##
##


# Run cni-plugin integration tests after preparing dependencies By default,
Expand Down
2 changes: 1 addition & 1 deletion iptables/iptables.go → pkg/iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

log "github.com/sirupsen/logrus"

util "github.com/linkerd/linkerd2-proxy-init/util"
util "github.com/linkerd/linkerd2-proxy-init/pkg/util"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions proxy-init/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/linkerd/linkerd2-proxy-init/iptables"
"github.com/linkerd/linkerd2-proxy-init/util"
"github.com/linkerd/linkerd2-proxy-init/pkg/iptables"
"github.com/linkerd/linkerd2-proxy-init/pkg/util"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion proxy-init/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/linkerd/linkerd2-proxy-init/iptables"
"github.com/linkerd/linkerd2-proxy-init/pkg/iptables"
)

func TestBuildFirewallConfiguration(t *testing.T) {
Expand Down

0 comments on commit dcb5582

Please sign in to comment.