Skip to content

Commit

Permalink
for local testing
Browse files Browse the repository at this point in the history
  • Loading branch information
yktakaha4 committed Dec 28, 2023
1 parent 58d231c commit 2f7755c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Testing
run: |
go mod download
go test ./pkg/...
go test -v ./pkg/...
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
vendor
bin
bin
.config.yml
kube-job
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ linux: mod
windows: mod
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(BUILD_CMD) -o $(OUTPUT).exe
zip $(OUTDIR)/$(OUTPUT)_${VERSION}_windows_amd64.zip $(OUTPUT).exe

test:
go test -cover -v ./pkg/...

e2e: build
which kind ginkgo > /dev/null
kind get kubeconfig > "$(CURDIR)/.config.yml"
KUBECONFIG="$(CURDIR)/.config.yml" ginkgo -r ./e2e
3 changes: 0 additions & 3 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ var (

var _ = BeforeSuite(func() {
configfile := os.Getenv("KUBECONFIG")
if configfile == "" {
configfile = "$HOME/.kube/config"
}
restConfig, err := clientcmd.BuildConfigFromFlags("", os.ExpandEnv(configfile))
Expect(err).ShouldNot(HaveOccurred())

Expand Down

0 comments on commit 2f7755c

Please sign in to comment.